Reconnecting loop + "Stream disconnected before completion: Transport error: network error: error decoding response body" when using GPT-5.2-Codex (high thinking) in VS Code & CLI
What version of Codex is running?
codex-cli 0.76.0. Bug found when using the Codex VS Code extension 0.4.56 (but reproducible via the Codex CLI)
What subscription do you have?
Plus
Which model were you using?
gpt-5.2-Codex
What platform is your computer?
Host: Microsoft Windows NT 10.0.26200.0 x64; Running on WSL: Linux 6.6.87.2-microsoft-standard-WSL2 x86_64 x86_64
What issue are you seeing?
When using the Codex VS Code extension (reproducible via the Codex CLI) with the GPT-5.2-Codex model in high thinking mode, requests eventually fail repeatedly with:
Reconnecting 1/5 …
…
Reconnecting 5/5 …
Stream disconnected before completion: Transport error: network error: error decoding response body
This behavior renders long-running or extended reasoning sessions unstable / unusable after a short period of successful operation. Similar patterns appear across environments and multiple recent reports.([GitHub](https://github.com/openai/codex/issues/8302?utm_source=chatgpt.com "stream disconnected before completion: Transport error ..."))
Key observations from my environment:
- VPN / proxy is stable and does not drop mid-session.
- Proxy IP does not change and other traffic (e.g., ChatGPT web) remains functional.
- The issue is not created by every request — it tends to occur after some usage in a session.
- In same session, simply switching:
- model → works (e.g., GPT-5.1-Codex-Max),
- thinking level (high → middle) → works,
indicates the failure correlates with the _combination of GPT-5.2-Codex + high settings + sustained inference_.
What steps can reproduce the bug?
- Open VS Code with the Codex extension configured.
- Connect successfully to a GPT-5.2-Codex (high thinking) session.
- Issue multi-turn or multi-step prompts (e.g., coding tasks or extended conversation).
- Observe connection output repeating:
````
Reconnecting 1/5 …
…
Reconnecting 5/5 …
Stream disconnected before completion: Transport error …
- Confirm that switching either model or thinking mode in the same session can temporarily restore functionality.
What is the expected behavior?
- A stable, completing streaming response for each valid prompt without repeated reconnection attempts or premature disconnects.
- Session should either:
- stream the full response, or
- fail in a solid, meaningful error once per request, but not loop reconnect multiple times until eventual hard disconnect.
---
Actual Behavior
- After some initial success, the session goes into a reconnect loop and ultimately fails with a “stream disconnected” transport error.
- This behavior often requires exiting and restarting Codex sessions, and impacts both editor workflows and CLI reconstructions.
- Behavior is reproducible across:
- Codex VS Code extension,
- Codex CLI runs,
- across multiple machines / OSes.([Reddit](https://www.reddit.com/r/OpenAI/comments/1o1w1nk/codex_cli_is_down_for_me_constant_disconnections/?utm_source=chatgpt.com "Codex CLI is down for me - Constant disconnections..."))
Additional information
Attempts & Workarounds Tried
- Verified network connectivity is stable and not dropping mid-session.
- Switched models within the same session (GPT-5.1-Codex-Max) — solves reconnection for that session.
- Switched thinking strength (high → middle) — also temporarily works.
- Restarting sessions / re-auth does not prevent eventual recurrence. (temporarily works at begin)
---
Feedback
A simple attempt for /feedback: 019b3f46-a0c0-74f2-979e-9f72dffc2a12
---
Hope will help :)
related issues I found:
- [#5679]
- [#8302]
---
Note: I am not a native English speaker. This bug report was drafted with the assistance of ChatGPT. If there are parts that seem inconsistent or awkward, it may be due to edits I made when adapting the draft—please excuse any mistakes.
3 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Thanks for reporting. We're aware of this issue and are working on a fix. We're using #8302 to track the issue.
Environment
/home/groverlee/.claude/plugins/cache/openai-codex/codex/1.0.3/gpt-5.4(withmodel_reasoning_effort = "xhigh"in~/.codex/config.toml, but also reproduces onmedium)codex-companion.mjs review --backgroundfrom Claude Code plugin wrapperWhat happens
/codex:reviewand/codex:rescueconsistently fail on one specific repository with the following pattern:After
Reviewer started: current changes, the stream stays at zero bytes of payload for 60-90 seconds, then enters the Reconnecting loop and eventually dies. No reasoning tokens, no output text — nothing is emitted.Scope of reproduction
On this one repository, across a single session (2026-04-19 night → 2026-04-20 morning):
| Attempts | Result |
| -------- | ----------------------------------- |
| 20 | 0 successful, 20 same-mode failures |
The same account (
groverpumc@gmail.com, ChatGPT OAuth) previously completed a full/codex:reviewcycle on a different, smaller repository (test_cc_code) earlier in the same evening, returning a 9-issue review→fix→verify loop in ~8 minutes. So the auth, binary, and network path work in general — the failure is bound to this particular repo or the repo's diff pattern.What I tried (eliminated as causes)
npm install -g @openai/codex): no change.codex logout→rm ~/.codex/auth.json→codex login: no change.model_reasoning_effort: testedxhighandmedium, both fail identically.OPENAI_API_KEY: not set (no conflict with ChatGPT OAuth).~/.codex/config.tomlhas no[mcp_servers.*]entries.experimental_use_rmcp_client: not set (default).Minimum reproduction
git inita repository.git add <file>so the working tree has a staged diff./codex:review --background(ornode codex-companion.mjs review --background).Request
If this is a known issue tracked under an existing ticket, please point me there and I'll add my logs as an additional datapoint. Otherwise, any diagnostic information you need (full session log, Codex session IDs, etc.) I can provide.
Related open issues that look similar: #13811, #13245, #8465, #14583.