mirror of
https://github.com/openai/codex.git
synced 2026-11-16 22:00:36 +00:00
## Why A background command can request approval after its originating turn has completed. Interrupting a later turn cancels the pending approval but can leave the command item marked as in progress. ## What changed Complete these late command items with `Declined` status when their approval is canceled by a turn transition. Route completion through the thread listener so `item/completed` reaches the thread's current subscribers, preserving the original turn ID and command start timestamp. ## Testing Add regression coverage for interrupting a turn with a pending approval from a completed turn, and for delivering late command completion to a replacement subscriber. GitOrigin-RevId: 8c62fa3302fd3754b84e6fb87b3117f678f55164