Files
codex/codex-rs/app-server/tests
jif 090be4df07 Close late command approval items when turns are interrupted (#61841)
## 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
2026-11-16 16:38:13 +00:00
..