mirror of
https://github.com/openai/codex.git
synced 2026-12-02 00:31:03 +00:00
## Why A worker can send a message and ask to stop in the same response. It needs to see any send failure before going idle so it can respond to the error. ## What changed When a V3 worker targets itself with `interrupt_agent`, finish the current tool batch and skip the automatic model follow-up if no `send_message` call in that batch failed. Pending input can still trigger another model request. Scope the stop to the sampling attempt so it cannot carry over to a retry. ## Testing Extend the mailbox integration test to cover a truncated response, a send failure alongside a self-stop, and a subsequent self-stop that runs the `SubagentStop` hook and frees the worker slot. GitOrigin-RevId: 62e377026d32ffc59d1ea5b88030ce9148d414b4