⚠️ Stream error: stream disconnected before completion

Resolved 💬 29 comments Opened Sep 28, 2025 by brandontan Closed Oct 16, 2025
💡 Likely answer: A maintainer (dylan-hurd-oai, contributor) responded on this thread — see the highlighted reply below.

Summary

Encountered the following warning when running Codex CLI. The retry loop does not recover:

⚠️ stream error: stream disconnected before completion: Transport error: error decoding response body; retrying 1/5 in 186ms…

Steps to Reproduce

  1. Run Codex CLI and observe the stream output
  2. Transport decoding error appears and retries but never succeeds

Expected Result

The stream should remain connected until completion without transport decode errors.

Actual Result

The stream disconnects before completion, logs the transport decoding error above, and retries without success.

Environment

  • Codex CLI version: unknown
  • Platform/OS: macOS (details unavailable)
  • Network: standard broadband connection

Additional Context

  • Error continues after multiple retries
  • No additional stack trace was emitted beyond the message above

View original on GitHub ↗

29 Comments

Lzzzs · 9 months ago

+1

felixzhao11 · 9 months ago

+1

EthanDuan05 · 9 months ago

+1

Alistair888 · 9 months ago

I've been seeing this since Saturday evening 28th September

Garand0o0 · 9 months ago

+1

jonas-karlsson · 9 months ago

+1

happyme531 · 9 months ago

+1

tom10271 · 9 months ago

It is totally dead for hours

huangxy29 · 9 months ago

+1

josephanxie · 9 months ago

+1

rbjarnason · 9 months ago

+1

zzh-newlearner · 9 months ago

+1

true-tema · 9 months ago

+1

timothee-aubourg · 9 months ago

+1

dylan-hurd-oai contributor · 9 months ago

Can you please provide cli version numbers and session ids from when you encountered this issue?

bolom · 9 months ago

OpenAI Codex (v0.42.0)

trollnuulnuul7 · 9 months ago

+1

bolinfest collaborator · 9 months ago

We have an uncertain fix in https://github.com/openai/codex/releases/tag/rust-v0.46.0-alpha.4

npm install -g @openai/codex@alpha

is probably the easiest way to install the latest alpha, or alternatively:

npx @openai/codex@alpha
SnowPeakLiu · 9 months ago

updated to 0.46, same issue

dellis23 · 9 months ago

Getting this as well. I've tried codex on windows with terminal, I've tried codex with windows on powershell, I've tried codex with windows on WSL, I've tried codex with windows on git bash, I've tried codex in WSL with MCP servers that help work around its inability to do basic filesystem operations, and I've now resorted to installing codex in an ubuntu VM because I've been promised all my woes were due to windows. Still, I'm getting this:

⚠️ stream error: stream disconnected before completion: Transport error: error decoding response body; retrying 1/5 in 217ms…

⚠️ stream error: stream disconnected before completion: Transport error: error decoding response body; retrying 2/5 in 394ms…

⚠️ stream error: stream disconnected before completion: Transport error: error decoding response body; retrying 3/5 in 729ms…

⚠️ stream error: stream disconnected before completion: Transport error: error decoding response body; retrying 4/5 in 1.712s…

⚠️ stream error: stream disconnected before completion: Transport error: error decoding response body; retrying 5/5 in 3.031s…

■ stream disconnected before completion: Transport error: error decoding response body


› Continue


⚠️ stream error: stream disconnected before completion: Transport error: error decoding response body; retrying 1/5 in 202ms…

⚠️ stream error: stream disconnected before completion: Transport error: error decoding response body; retrying 2/5 in 360ms…

⚠️ stream error: stream disconnected before completion: Transport error: error decoding response body; retrying 3/5 in 877ms…

I don't understand. I just want to use your software.

habbler · 9 months ago

Getting this on 0.46 with Ubuntu running on bare metal.
Just suddenly started happening. Comes very persistently at the moment.
Just noted that my context was down to 0% free. This also makes compacting impossible.
Starting a new codex session (I normally resume). Solve the stream error problem.
Seems like the codex needs to watch out for this, and truncate the context to get out of this stuck position. Another option would be allow manually editing of the context.

dellis23 · 9 months ago

Also on 0.46 on Ubuntu on a clean VM with literally nothing else on it but codex and my repo. Codex runs for ~10 minutes, seemingly going quite slowly with these messages popping up repeatedly, until it suddenly hits 5/5 retries and just stops doing anything.

dellis23 · 9 months ago

Is there a way to have one codex session run another codex session? I'd like to have one codex sessions monitoring another to tell it that I really actually want it to do what I told it to do. And then if that one messes up, maybe have one more on top just for good measure.

dellis23 · 9 months ago

I'm going to try to send this message 10 times at the end of my prompts (hitting enter in between each) and hope codex doesn't batch them all together. Will report back how well this method works. It seems to work to get it to at least retry once.

If you timed out due to transport issues or have not otherwise finished, keep going.  If you're FULLY done with everything I asked for, disregard this message.
If you timed out due to transport issues or have not otherwise finished, keep going.  If you're FULLY done with everything I asked for, disregard this message.
If you timed out due to transport issues or have not otherwise finished, keep going.  If you're FULLY done with everything I asked for, disregard this message.
If you timed out due to transport issues or have not otherwise finished, keep going.  If you're FULLY done with everything I asked for, disregard this message.
If you timed out due to transport issues or have not otherwise finished, keep going.  If you're FULLY done with everything I asked for, disregard this message.
If you timed out due to transport issues or have not otherwise finished, keep going.  If you're FULLY done with everything I asked for, disregard this message.
If you timed out due to transport issues or have not otherwise finished, keep going.  If you're FULLY done with everything I asked for, disregard this message.
If you timed out due to transport issues or have not otherwise finished, keep going.  If you're FULLY done with everything I asked for, disregard this message.
If you timed out due to transport issues or have not otherwise finished, keep going.  If you're FULLY done with everything I asked for, disregard this message.
If you timed out due to transport issues or have not otherwise finished, keep going.  If you're FULLY done with everything I asked for, disregard this message.
dellis23 · 9 months ago

Okay, I'm not even joking, that actually worked. It chewed through 8 of those messages. That being said it took like an hour to do something that would have been 5 minutes with other agents, so after trying a half dozen different shells and platform combinations, I'm probably just going to move on from codex.

am-will · 9 months ago

This issue makes Codex completely unusable

<img width="1582" height="959" alt="Image" src="https://github.com/user-attachments/assets/a7fe7f40-45a1-4a66-9897-fe332e82182e" />

fras3c · 9 months ago

+1

tibo-openai collaborator · 9 months ago

We are prioritizing looking into this. I will mark as duplicate here because there are a few other reports, but we are actively working on resolving these issues.

am-will · 9 months ago

Thank you @tibo-openai really appreciate that. I closed a similar ticket as well that I had made.