Skip to content

Commit 64dde7f

Browse files
committed
guard flush
1 parent 882b8b0 commit 64dde7f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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

+4-1
Original file line numberDiff line numberDiff line change
@@ -860,13 +860,16 @@ export class AgentLoop {
860860
this.onItem(item);
861861
}
862862
}
863+
// guarading clear
864+
// because we may still enter this after abort
865+
this.pendingAborts.clear();
863866
}
864867

865868
// At this point the turn finished without the user invoking
866869
// `cancel()`. Any outstanding function‑calls must therefore have been
867870
// satisfied, so we can safely clear the set that tracks pending aborts
868871
// to avoid emitting duplicate synthetic outputs in subsequent runs.
869-
this.pendingAborts.clear();
872+
// this.pendingAborts.clear();
870873
// Now emit system messages recording the per‑turn *and* cumulative
871874
// thinking times so UIs and tests can surface/verify them.
872875
// const thinkingEnd = Date.now();

0 commit comments

Comments
 (0)