Skip to content

Commit 882b8b0

Browse files
committed
null stream after aborting
1 parent 09f0ae3 commit 882b8b0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

codex-cli/src/utils/agent/agent-loop.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,6 @@ export class AgentLoop {
119119
return;
120120
}
121121

122-
// Reset the current stream to allow new requests
123-
this.currentStream = null;
124122
log(
125123
`AgentLoop.cancel() invoked – currentStream=${Boolean(
126124
this.currentStream,
@@ -132,6 +130,9 @@ export class AgentLoop {
132130
this.currentStream as { controller?: { abort?: () => void } } | null
133131
)?.controller?.abort?.();
134132

133+
// Reset the current stream to allow new requests
134+
this.currentStream = null;
135+
135136
this.canceled = true;
136137

137138
// Abort any in-progress tool calls

0 commit comments

Comments
 (0)