Stream disconnected before completion :stream closed before response.completed

Windows 11
GPT 5 Codex CLI
running on powershell

I have my api key installed, path setup properly etc. Everything worked earlier. But every time I try to run a prompt, it works for about a minute and then says:

:hand_with_fingers_splayed: stream disconnected before completion: stream closed before response.completed

It worked earlier to set up the basic architecture of my project. The initial setup was about 300k tokens. After that I’ve seen this error repeatedly- nothing got done, and when I checked my stats suddenly it’s saying I’ve used 1m tokens today? I’m assuming that means it was still running my requests but wasn’t actually getting anything done?

I can say definitively that it’s not my internet cutting out either, because I’m using remote desktop to control the PC that I’m setting all of this up on with my laptop.

2 Likes

this just started happening to me all of a sudden on the VSCODE extension for codex … did it solve automagically for you or you still have it ?

2 Likes

same thing happened:
```
• Ran powershell -NoProfile -Command ‘npm run typecheck’ ⚠️ stream error: stream disconnected before completion: Transport error: error decoding response body; retrying 1/5 in 186ms… ⚠️ stream error: stream disconnected before completion: Transport error: error decoding response body; retrying 2/5 in 402ms… ⚠️ stream error: stream disconnected before completion: Transport error: error decoding response body; retrying 3/5 in 772ms… ⚠️ stream error: stream disconnected before completion: Transport error: error decoding response body; retrying 4/5 in 1.575s… ⚠️ stream error: stream disconnected before completion: Transport error: error decoding response body; retrying 5/5 in 3.371s… 🖐 stream disconnected before completion: Transport error: error decoding response body ▌ Implement {feature} ⏎ send Ctrl+J newline Ctrl+T transcript Ctrl+C quit 2.52M tokens used
```

codex -V
codex-cli 0.34.0

1 Like

bump! I get this strictly on my macbook, it works everywhere else, even when i run windows parallels… Anyone have tips?

same here on my local and from hosted vps as well

I’m having the same issue here, and considering that there are 1.5k views I assume many people are on the same boat

It stopped happening when i spent more money and went up in tiers. Good luck everyone

I have the same issue, anyone have ideas to fix it? I am use my API key.

Is there just no resolution to this? I’m trying to use it in VS Code and getting the same result. :unamused_face: I only signed up to test how things are going on in the Open AI corner and it’s not looking good on the coding side at this point.

Failed

stream error: stream disconnected before completion: stream closed before response.completed; retrying 1/5 in 191ms…

stream error: stream disconnected before completion: stream closed before response.completed; retrying 2/5 in 392ms…

stream error: stream disconnected before completion: stream closed before response.completed; retrying 3/5 in 729ms…

stream error: stream disconnected before completion: stream closed before response.completed; retrying 4/5 in 1.445s…

stream error: stream disconnected before completion: stream closed before response.completed; retrying 5/5 in 3.501s…

stream disconnected before completion: stream closed before response.completed

Pro plan here. stuck with stream disconnected issue for days now. checked usage limit and I have used 6% weekly usage, and 0% daily (5 hour left). WHY IS THIS STILL HAPPENING. Real work is getting blocked because of this issue.

My setup: using gpt5-codex high with VS code on Mac.

not sure if me using Sora app is taking away my usage limit in some unknown bucket. but something to ponder on. noticed issues as soon as I started using Sora.

also noticed that under rate limit option in VS code setup, I see “upgrade to Pro”. BUT I AM ALREADY PAYING FOR PRO.

Update: online codex connected with GitHub seems to work to at least ask questions. The UI in Visual Studio Code is still generating stream disconnected message. in the codex extension, I logged out and logged back in, so now it doesn’t at least show upgrade to Pro.

Edit: magically worked after I reset the working directory again in VS code.

I got the same error, but I have a fast fiberglass connection.

i had the same on my work machine and the moment i disabled our zscaler it started to work immediately. always worked on my personal machine. recommend checking similar if you have endpoint security or VPNs

Updated codex and it seems to have solved it. I had an issue where codex was both installed as a formula and cask, but it should only be a cask?