Stream disconnected before completion: Transport error
What version of Codex is running?
0.38.0
Which model were you using?
gpt-5-codex
What platform is your computer?
Darwin 25.0.0 arm64 arm
What steps can reproduce the bug?
This problem will occur as long as it is used, no special operation is required.
What is the expected behavior?
No response
What do you see instead?
⚠️ stream error: stream disconnected before completion: Transport error: error decoding response body; retrying 1/5 in 181ms… ⚠️ stream error: stream disconnected before completion: Transport error: error decoding response body; retrying 2/5 in 368ms… ⚠️ stream error: stream disconnected before completion: Transport error: error decoding response body; retrying 3/5 in 737ms… ⚠️ stream error: stream disconnected before completion: Transport error: error decoding response body; retrying 4/5 in 1.632s… ⚠️ stream error: stream disconnected before completion: Transport error: error decoding response body; retrying 5/5 in 3.23s… ■ stream disconnected before completion: Transport error: error decoding response body
Additional information
The MCP I configured is context7, and I also used VPN, but my VPN can be guaranteed to be normal.
Related to #2921 ?
Related to #2921 ?
Yep, same problem. But no effective solution was found. Some people suggested restarting codex , but this moethod is too troublesome. Wait for this issue to be fixed.
same issue for two days, cannot complete even one task
same issue +1
+1
Version 0.39 sames to have solved this problem. At least I haven't encountered this problem today. Try updating to the latest version.
I'm still having the same issue on codex-cli 0.39.0
+1. Tried different VPNs and not solving the problem
+1 I've run into the same issue these past few days But my access speed to ChatGPT is actually very fast
+1
I had this issue today. Was looking at my DNS logs while seeing the reconnect messages and noticed my host making calls to openrouter.ai
I had OPENAI_API_KEY env var set as part of Qwen CLI testing and this was causing the failure (and routing to openrouter for some reason?). I am using OAUTH auth to use Codex, not the API key.
Unsetting the env var re-enabled Codex CLI for me.
same
same!
+1
+1
Version: 0.4.14 Still see a lot of this in Codex's work steam, though is not going to 5/5 very often any more. It's feels odd that it wouldn't be able to decode the response from their own servers well enough to at least tell you what actually is wrong. Either this error is too generic, or it's possible for the endpoint to respond in an unparseable format.. Which would be odd because they control both sides.
+1
+1
+1
+1