gpt-6-astra: websocket closed by server before response.completed on every turn, HTTP fallback 5xx, 'Selected model is at capacity' (0.153.4, ChatGPT Pro)
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.4k
- PR merge metrics
- PR metrics pending
Description
What version of Codex CLI is running?
codex-cli 0.153.4 (Homebrew cask). Same binary version bundled in the Codex desktop app (ChatGPT.app). Both affected.
What subscription do you have?
ChatGPT Pro (ChatGPT login)
Which model were you using?
gpt-6-astra (low and medium reasoning). gpt-5.6-sol on the same machine/config works.
What platform is your computer?
macOS 26.6.2, Apple Silicon (aarch64)
What terminal emulator and version are you using (if applicable)?
Warp v0.2026.08.26 (CLI) and the Codex desktop app
Codex doctor report
Codex Doctor v0.153.4 · macos-aarch64
✓ auth auth is configured (stored auth mode: chatgpt)
✓ network no proxy env vars
✓ websocket connected (HTTP 101 Switching Protocols) · 15s timeout
model provider openai
supports websockets true
✓ reachability active provider endpoints are reachable over HTTP
ChatGPT inference URL reachable (HTTP 405)
⚠ threads 3 issues - rollout files are missing from the state DB
What issue are you seeing?
Since 2026-09-07 ~05:00 UTC, turns on gpt-6-astra fail repeatedly. Log pattern (from ~/.codex/logs_2.sqlite, targets codex_api::endpoint::responses_websocket / codex_core::responses_retry):
connecting to websocket: wss://chatgpt.com/backend-api/codex/responses→ handshake OK in <1 s (Cloudflare colo SOF).- 15–20 s later:
unhandled responses event: "error"then
stream disconnected - retrying sampling request (N/5)... sampling_error=stream disconnected before completion: websocket closed by server before response.completed - After 5/5:
falling back to HTTP. HTTP attempt fails with
stream disconnected before completion: An error occurred while processing your request. You can retry your request, or contact us through our help center at help.openai.com if the error persists. Please include the request ID <id> in your message. - One fresh
codex execon gpt-6-astra returned:ERROR: Selected model is at capacity. Please try a different model.
Request IDs / correlation:
06386562-f9b9-4485-81ee-8ee0a42edaac(2026-09-07 16:04:47 UTC)9df8c123-2a11-45e0-90fd-4a65ee2b80be(2026-09-07 16:02:36 UTC)86221eb4-2d74-47c5-8b8a-49326da9ba3a(2026-09-07 ~15:50 UTC)- cf-ray
a37702abe934d0df-SOF(2026-09-07 16:15:08 UTC)
Counts today (2026-09-07, responses_retry rows): gpt-6-astra 44 disconnects across threads 01a059b9… (20) and 01a0760b… (17); gpt-5.6-sol 3. Both failing threads are long-lived (373k tokens context on one). Fresh short threads on gpt-6-astra also hit the "at capacity" error. status.openai.com showed no incident.
Client-side knobs I tried, none change transport: features.responses_websockets=false (flag is "removed"), [model_providers.openai] supports_websockets=false (rejected: built-in provider cannot be overridden), model_catalog_json with prefer_websockets=false on every model (key is read, transport still responses_websocket).
Secondary issue seen on the same thread: after the retries, every rollout append logs failed to project durable rollout for 01a0760b-…: thread-store internal error: thread history projection for 01a0760b-… expected ordinal 1982, got 1981 (348 times today). The JSONL rollout keeps growing (ordinal 2267) but the SQLite projection is stuck at 1982.
What steps can reproduce the bug?
codexwith ChatGPT login, modelgpt-6-astra, macOS.- Send any turn in a long-running thread (or, intermittently, a fresh
codex exec -m gpt-6-astra "Reply with exactly: OK"). - Observe "Reconnecting N/5 … websocket closed by server before response.completed", then HTTP fallback error with a request ID, or "Selected model is at capacity".
Thread ids: 01a059b9-f988-7e72-97e1-6871a4a886dc, 01a0760b-ec86-79e0-ad41-36636842b78d.
What is the expected behavior?
Turn completes, or a clear capacity/rate-limit error is surfaced immediately instead of 5 websocket retries + an HTTP retry (~2 minutes of "Reconnecting") per turn. A supported config to prefer HTTPS/SSE transport would also help when the WS path is flaky.
Additional information
Related: #22156, #15014, #19330. Support ticket also opened via help.openai.com / support@openai.com with the same request IDs.
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 by tracing the responses_websocket endpoint and responses_retry handling mentioned in the logs, then reproduce with gpt-6-astra using a fresh and a long-running thread. Compare the websocket error, HTTP fallback, and capacity response paths; done means determining whether the client can surface capacity failures promptly or support the requested transport behavior without repeated retries.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- backend-api-design, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100