fix(agent-core): skip prepared tool execution after abort#102283
fix(agent-core): skip prepared tool execution after abort#102283HOYALIM wants to merge 1 commit into
Conversation
|
Thanks for the context here. I swept through the related work, and this is now duplicate or superseded. Close as superseded: the same agent-core abort fix is already represented by the open proof-sufficient canonical PR, and this branch has no unique required remainder beyond weaker duplicate test/proof coverage. Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Canonical path: Land #102276 as the canonical proof-positive fix for #102252, then close this duplicate branch. So I’m closing this here and keeping the remaining discussion on #102276 and #102252. Review detailsBest possible solution: Land #102276 as the canonical proof-positive fix for #102252, then close this duplicate branch. Do we have a high-confidence way to reproduce the issue? Yes, at source level. Current main defers prepared parallel tool calls and lacks a pre-execute abort guard, while the linked issue and both candidate tests exercise aborting during Is this the best way to solve the issue? No, this PR is not the best landing path. The runtime fix shape is right, but #102276 carries the same fix with stronger real behavior proof and stronger regression assertions. Security review: Security review cleared: The diff only changes internal agent-core cancellation logic and colocated tests; it adds no dependency, workflow, secret, install, publishing, or supply-chain surface. AGENTS.md: found and applied where relevant. What I checked:
Likely related people:
Codex review notes: model internal, reasoning high; reviewed against 0307deacfac7. |
b1a7838 to
1135276
Compare
Signed-off-by: Ho Lim <[email protected]>
1135276 to
8dab330
Compare
|
Superseded by #102276, now merged as The landed fix places the same abort guard at the centralized prepared-tool execution boundary, preserves Thank you for independently identifying and fixing the race. |
Closes #102252
AI-assisted: yes. I reviewed the change and understand the runtime behavior.
What Problem This Solves
Fixes an issue where a parallel tool batch could still execute a prepared paid or side-effectful tool after the run had already been aborted by another tool preflight.
Why This Change Was Made
The tool loop now checks the abort signal immediately before
executeand recordsexecutionStarted: falsewhen execution is skipped, soafterToolCallis not invoked for work that never started.User Impact
Prevents cancelled runs from starting a prepared paid/side-effectful tool after abort, while preserving normal behavior for tools that already started before cancellation.
Evidence
pnpm exec oxfmt --check packages/agent-core/src/agent-loop.ts packages/agent-core/src/agent-loop.test.ts-> passednode scripts/run-vitest.mjs packages/agent-core/src/agent-loop.test.ts-> 1 file, 23 tests passedgit diff --check-> passedSigned-off-by: Ho Lim [email protected]