Responses WebSocket stalls 300s per retry; opt-out flag removed; HTTPS fallback requires 5 failed retries
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.5k
- PR merge metrics
- PR metrics pending
Description
Environment: ChatGPT desktop 26.810.41047 (macOS, Darwin 25.3.0), bundled codex-cli 0.148.0-alpha.9, model gpt-5.6-sol (high/max reasoning effort), service_tier priority, ChatGPT-plan auth.
Symptom: Sampling over wss://chatgpt.com/backend-api/codex/responses goes silent mid-turn. The client detects the dead stream only via a 300s idle timeout (codex_core::responses_retry: stream disconnected before completion: idle timeout waiting for websocket; sometimes IO error: Connection reset by peer (os error 54)). Each retry cycle is a ~5-minute user-visible stall with frozen token counts.
Evidence (2026-08-14, UTC):
- Thread
01a00079-2445-7f01-a7a1-2764c376afe9: 11 stalls of 301–310s between 13:33–14:35, including four consecutive (13:59 → 14:15). - Turn
01a00191-22f6-79f1-a260-71201ed53982: exhausted retries 5/5 at 19:17. - A prior incident produced 16 five-minute reconnects across three tasks in one day.
Aggravating factors:
responses_websockets/responses_websockets_v2are stageremovedincodex features list— users cannot opt out of the websocket transport.- Built-in provider override is rejected ("model_providers contains reserved built-in provider IDs"), so
supports_websockets/stream_idle_timeout_msare unreachable. - HTTPS fallback only engages after 5 failed retries (~25 minutes of stalling).
The network here has documented upstream packet loss under load, which is presumably the trigger — but SSE-based clients on the same link detect drops and recover in seconds. The websocket transport takes 300s per detection with no user recourse.
Request: websocket-level keepalive/liveness so a dead stream is detected in seconds rather than 300s; and/or restore the transport opt-out; and/or engage the HTTPS fallback on the first idle timeout instead of the fifth.
Related: #27625, #28579
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the codex_core::responses_retry path and the responses WebSocket endpoint described in the report; inspect how the 300s idle timeout, retry count, and HTTPS fallback are connected. Compare the transport behavior with the requested liveness or opt-out changes, then verify that a dead stream is detected in seconds or that fallback occurs without five prolonged retries.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- backend-api-design, cli, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100