Files
codex/codex-rs/core/tests
Charlie Marsh 513577302a Surface Responses stream errors as soon as they arrive (#62356)
## Why

If a provider keeps an SSE connection open after reporting a failure, Codex
can hit the idle timeout and lose the original error and its retry advice.

## What changed

End the SSE stream immediately on `response.failed` or a recognized
`error` event. Classify statusless quota, plan usage, invalid prompt, and
misalignment errors consistently across both event forms. Preserve
`Retry-After` for overload and capacity errors, preferring error-level
headers over event-level headers when both provide valid advice.

## Testing

Add SSE regression tests that hold the connection open and verify immediate
error delivery, terminal error handling, and retry delays. Extend WebSocket
coverage for statusless errors received before the close handshake.

GitOrigin-RevId: 69afd1d3b18ca3139e9b7ad98ae1481a432179f0
2026-11-18 20:28:44 +00:00
..