mirror of
https://github.com/openai/codex.git
synced 2026-11-18 22:20:48 +00:00
## Why When the Responses API sends a policy rejection in an `error` event without an HTTP status, the SSE client can wait until its idle timeout to report the failure. ## What changed Recognize `bio_policy` and `cyber_policy` in the shared terminal error parser so both SSE and WebSocket clients surface the corresponding policy error. Preserve the provider's message and use a default when it is missing or blank. End the SSE stream as soon as the error arrives. ## Testing Add SSE tests for both error codes, including when the stream stays open, and WebSocket cases that verify both errors surface without a close handshake. GitOrigin-RevId: 1b46b6557a39a61a1bb10bdd0d8ede48ecd6fa13