Files
codex/codex-rs/core/tests
jif 02c6a2d3f1 Drain WebSocket responses on mailbox preemption (#55969)
## 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
2026-10-21 19:29:08 +00:00
..