Codex is not working - "stream error: stream disconnected before completion...

Resolved 💬 7 comments Opened Jul 17, 2025 by dilshodturab Closed Jul 24, 2025
💡 Likely answer: A maintainer (bolinfest, collaborator) responded on this thread — see the highlighted reply below.

What version of Codex is running?

0.7.0

Which model were you using?

o3, gpt-4.1

What platform is your computer?

Linux 6.15.6-arch1-1 x86_64 unknown

What steps can reproduce the bug?

<img width="910" height="619" alt="Image" src="https://github.com/user-attachments/assets/87286d87-2f2a-4a2c-937e-066e4287f5e3" />

What is the expected behavior?

_No response_

What do you see instead?

_No response_

Additional information

_No response_

View original on GitHub ↗

7 Comments

gniewkob · 1 year ago

<img width="1296" height="826" alt="Image" src="https://github.com/user-attachments/assets/7fbbfd2a-88ab-4f3c-8439-e68ff88701da" />
The same on MacOS

gniewkob · 1 year ago
https://grok.com/share/bGVnYWN5_291468fe-b9cd-44a4-928e-dbc5be3b4542

doesn't help

<img width="1288" height="493" alt="Image" src="https://github.com/user-attachments/assets/8b8e17c1-0fcd-41ce-9a59-6c4244fb7b70" />

davidhewitt · 12 months ago

It looks like process_sse in client.rs does not handle "error" and "response.failed" SSE events, which seem to be sent if the API key is not valid.

bolinfest collaborator · 12 months ago

@davidhewitt I believe this was fixed by https://github.com/openai/codex/pull/1649, so try 0.9.0? /cc @pakrym-oai

davidhewitt · 12 months ago

Yep definitely looks better on 0.9.0, the error gets logged now 👍

bolinfest collaborator · 12 months ago

@davidhewitt thanks for verifying! Closing.