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.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗