mirror of
https://github.com/openai/codex.git
synced 2026-10-23 18:08:45 +00:00
## Why Mailbox preemption can discard completed response items and lose the response ID needed for incremental continuation. Buffered tool calls must also wait for queued agent messages to be read. ## What changed - Gracefully interrupt and drain Responses Lite streams, retaining completed items and the response ID for the next request. - Cancel buffered tool calls before dispatch and suppress partial items that may be discarded during the drain. - Keep user steering queued until draining finishes. Include pending mail in follow-up requests after disconnects and preserve content-filter recovery guidance. ## Testing Add WebSocket regression coverage for buffered completion, interrupts without acknowledgement, buffered tools and partial items, user steering during draining, disconnects, and content-filter recovery. GitOrigin-RevId: c9d3fb87a81850e5686e07f28103e2ff4378ddec