Disconnected Stream
Resolved 💬 8 comments Opened Jan 7, 2026 by aris997 Closed Jan 12, 2026
💡 Likely answer: A maintainer (etraut-openai, contributor)
responded on this thread — see the highlighted reply below.
What version of Codex is running?
codex-cli 0.79.0
What subscription do you have?
Using OPENAI_API_KEY (Tier 5)
Which model were you using?
gpt-5.1-codex-max
What platform is your computer?
Linux 6.14.0-37-generic x86_64 x86_64
What issue are you seeing?
■ stream disconnected before completion: error sending request for url (https://api.openai.com/v1/responses)
What steps can reproduce the bug?
Just asking the model to /init the folder, request sent via curl to gpt-4o-mini works but gpt-5.1-codex-xx do not works
Uploaded thread: 019b993d-56fc-7211-8f5e-e60280829d8e
What is the expected behavior?
_No response_
Additional information
_No response_
8 Comments
Do you have a
config.tomlfile? If so, what options do you have configured in it?Do you suspect that this was a regression with 0.79? Was this working previously?
No I don't have a
config.tomlfile, actually I was on 0.77.x, I thought it was an update issue, so I closed the chat, updated the npm package. But still the same issue.It may be related: today _(2026-01-08 14-50-00 UTC)_ I tried to use codex with the same configs (0.79.0, GPT-5.1-codex-max, GNU/Linux Ubuntu 24.04) and I get a different response:
401 Unauthorized. I checked my API KEY is still valid.Uploaded a new feedback with thread ID
019b9e17-df3f-7ca0-bfd7-976ec216ef1e.That seems to indicate that the API key you're using is not valid (e.g. the key is corrupt/incorrect or has been revoked).
Here's what I recommend:
Okay, just allocated a new api key.
Tested codex with same environment (same project, folder, OS, codex 0.79.0, model GPT-5.1-codex-max medium), it's back to
disconnected streamerror. Traceback thread ID is019ba1df-38ad-7be1-a0ee-7f341cee443b.Tested the api key with a simple curl query to check working:
Based on the logs, this looks like a basic network connectivity issue. Do you have any network proxy, VPN, or firewall configured on your machine or network? I think you'll need to do some diagnosis of your system to fix this.
I double-checked and the latest issue (updated to 0.80.0) was again 401 Unauthorized.
I found that Codex stores the last working
API_KEYin~/.codex/auth.json. After renaming that file and running Codex again, it prompted me to confirm the current environment API_KEY and then saved it to the same location.So rotating OPENAI_API_KEY isn’t straightforward if the cached key is still present.
I also haven’t encountered the stream disconnect bug again.
Everything is working now. Thanks for the support.
Indeed just found that connecting via a specific connection (Company intranet via eth) the stream gets disconnected.
Also connecting via VPN, company connection blocks it.
019bb273-5bb9-7fb1-aebc-4dff19ce1b2f.