mirror of
https://github.com/openai/codex.git
synced 2026-11-24 23:20:47 +00:00
## Why Cancelling a turn or tool call could drop a pending history write or lose an answer the session had already accepted. A missing write leaves Guardian unable to confirm that its review history is complete. ## What changed Let the session finish tracked evidence writes in queue order after the caller is cancelled, and drain those writes on shutdown. Record verified `request_user_input` answers at acceptance before waking the tool. Continue persisting evidence after an earlier write goes unconfirmed, while still reporting the history gap to Guardian. ## Testing Regression tests cover initial and retried reviews waiting for a revocation after caller cancellation, and an accepted answer reaching history before the turn interruption even with an earlier unconfirmed write. GitOrigin-RevId: b8e212d34686bbc793002a34f5a97834a900a342