mirror of
https://github.com/openai/codex.git
synced 2026-10-20 17:38:45 +00:00
## Why Terminal status previously collapsed completed and failed turns into `idle` and reported blocking prompts without a reason. Blocking detection also depended on terminal title settings. ## What changed - Emit `done` and `error` through OSC 7501 for live turn results, retaining them until deliberate keyboard, paste, or mouse input acknowledges them. Mouse movement does not acknowledge results. - Classify blocking requests with `kind=permission`, `kind=question`, or `kind=auth`, including requests hidden behind another view or delayed while typing, independently of terminal title settings. - Keep pending follow-up work and active goals `working`. Treat interrupted turns and replayed results as `idle` rather than new results. - Preserve the existing iTerm2 OSC 21337 labels and indicators, mapping `done` and `error` to `Idle`. ## Testing Add lifecycle and input-acknowledgment tests covering approvals, completion, failure, interruption, replay, pending follow-ups, and active goals. Extend blocking-request assertions and terminal protocol snapshots for the new states and reasons. GitOrigin-RevId: 90bad1d54d8b3b9e3cec66fbd3bf3df0c42b995b