mirror of
https://github.com/openai/codex.git
synced 2026-11-27 23:50:52 +00:00
## Why Recording a declined command can block on history writes. If turn cancellation waits for that write, sibling commands can keep running. The same write can also delay recording results from commands that already finished. ## What changed Signal cancellation before recording the declined command and publish the decline before `TurnAborted`. Start the task's shutdown grace period after publication so it has time to record completed tool results. ## Testing Add a regression test that blocks publication of the decline, verifies that a running sibling stops while publication is blocked, and checks that another sibling's completed output reaches the next model request. GitOrigin-RevId: c0b2e40e711ffe5ee46b76b110410518d2191041