mirror of
https://github.com/openai/codex.git
synced 2026-10-19 17:28:46 +00:00
## Why Guardian sampling can encounter temporary connection or service failures while opening a WebSocket, starting a request, or consuming its response stream. ## What changed - Retry transient transport, streaming, rate-limit, and server failures up to two times across the full sampling flow. - Recover from unauthorized responses through the configured auth manager and discard pooled connections that may contain stale credentials. - Allow sampler initialization to continue when its initial WebSocket prewarm fails, so the first sample can establish a fresh connection. ## Testing Added coverage for recovery after prewarm failures and `503` responses, and for stopping once the transient retry budget is exhausted. GitOrigin-RevId: af74c2df95c4241184ca641ef4418db6aa4ab695