You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Facing frequent stream disconnection issue while using Codex CLI #8865
We are repeatedly experiencing streaming failures while executing commands using OpenAI models.
Users consistently encounter the following error:
stream disconnected before completion: response.failed event received
This occurs even for simple prompts, and the response stream fails before completion.
We also intermittently receive the following error:
"Item with id 'rs_06b3ecdc79f7f90b006957c907543438197a56565d3b3ff2278' not found."
"type": "invalid_request_error"
"param": "input"
Actions Taken So Far
To mitigate the streaming issue, we have already:
Increased the quota limits
Added stream retry logic/parameters to allow session continuation
→ This prevents the session from dropping immediately, but causes extreme slowness during execution
Even after these changes, the stream continues to disconnect intermittently.
What steps can reproduce the bug?
It is occurring randomly even for simple Hello message.
Have you reached out to the Azure team and reported this problem to them?
If this is something you can repro, please use the /feedback slash command to upload your logs and session details and post the thread ID here. This will help us provide additional diagnosis.
Yes, I have reached out to the Azure team, and they have done some troubleshooting. They advised contacting OpenAI and also checked and told me there are no quota-related issues.
Here is the thread ID: 019ba0ff-abfa-7de1-ae95-6ccd46017244
This appears to be the same issue as #8371 and #8302. We're testing a fix for this internally and will roll it out once we're confident that it addresses the issue and doesn't cause any regressions.
We think we have mitigated this issue. The more recent models (like 5.2) sometimes take longer to generate the next batch of tokens during streaming, and this can sometimes exceed an HTTP timeout value, which resulted in a stream disconnect.
I'm going to mark this bug as closed, but if you see this again in the next few days, please use /feedback to upload your logs and post your thread ID here.
Hi @etraut-openai, thanks for the update.
We generally use GPT-5.1-Codex or GPT-5-Codex. I will ask my team to try this out, but could you please confirm which Codex CLI version includes the fix so we can update accordingly?
I am using 0.80.0 since yesterday and still face the same issue.
My thread id: 019bb884-e9de-7b81-a560-2132765632e1
I am also using gpt-5.1-codex, also gpt-5.1-codex-max
Oddly enough, since GPT-5.4 has been out, I haven't seen this issue much in gpt-5.3-codex any more. In any case, bumping retries up to 30 mostly tosses this under the rug.
I kept running into this on Azure with gpt-5.3-codex and 5.4. Built a workaround that auto-retries on stream disconnect and splits large tasks into separate sessions to avoid context overflow and compaction errors. https://github.com/pauldinu10/codex-smart
It's a PowerShell wrapper that runs each task from a tasks.md file as a fresh codex exec --full-auto session. If the stream drops, it retries automatically up to N times. Not a fix, but makes Codex usable for long migrations.
Hey all, are you still having the issues using azure ai foundry through codex ? If yes I managed to fix the issue (I think). I was experiencing the issue everyday and then I thought about a parameter in azure AI foundry.
When you create a deployment (basically deploy gpt 5.4 or 5.5 model in Azure AI Foundry), you can control the token per minute rate and by default it is set to 250k. I increased it to a million token per minute and it solved the issue.
I think the issue was that once codex reach the limit, it get rate alerte from azure ai foundry which leads to the reconnecting.
Activity
github-actions commentedon Jan 7, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
etraut-openai commentedon Jan 7, 2026
Have you reached out to the Azure team and reported this problem to them?
If this is something you can repro, please use the
/feedbackslash command to upload your logs and session details and post the thread ID here. This will help us provide additional diagnosis.D951516 commentedon Jan 9, 2026
Yes, I have reached out to the Azure team, and they have done some troubleshooting. They advised contacting OpenAI and also checked and told me there are no quota-related issues.
Here is the thread ID: 019ba0ff-abfa-7de1-ae95-6ccd46017244
D951516 commentedon Jan 12, 2026
@etraut-openai Do you have any updates on this issue??
etraut-openai commentedon Jan 12, 2026
This appears to be the same issue as #8371 and #8302. We're testing a fix for this internally and will roll it out once we're confident that it addresses the issue and doesn't cause any regressions.
D951516 commentedon Jan 12, 2026
Any ETA?? Please let us know once this is resolved.
etraut-openai commentedon Jan 13, 2026
We think we have mitigated this issue. The more recent models (like 5.2) sometimes take longer to generate the next batch of tokens during streaming, and this can sometimes exceed an HTTP timeout value, which resulted in a stream disconnect.
I'm going to mark this bug as closed, but if you see this again in the next few days, please use /feedback to upload your logs and post your thread ID here.
D951516 commentedon Jan 13, 2026
Hi @etraut-openai, thanks for the update.
We generally use GPT-5.1-Codex or GPT-5-Codex. I will ask my team to try this out, but could you please confirm which Codex CLI version includes the fix so we can update accordingly?
etraut-openai commentedon Jan 13, 2026
@D951516, make sure you're using the latest published version of the CLI (0.80.0).
cvietor commentedon Jan 13, 2026
I am using 0.80.0 since yesterday and still face the same issue.
My thread id: 019bb884-e9de-7b81-a560-2132765632e1
I am also using gpt-5.1-codex, also gpt-5.1-codex-max
8 remaining items
D951516 commentedon Jan 26, 2026
Here are the recent error messages and the thread ID shared by our team. They are using GPT-5-Codex and GPT-5.1-Codex Max
tosokr commentedon Feb 6, 2026
I am experiencing the same issues with gpt-5.2-codex via Azure
mhkwm commentedon Feb 12, 2026
I am also experiencing the same issue with gpt-5.1-codex via Azure
olthierie commentedon Feb 12, 2026
I am also experiencing the same issue with gpt-5.1-codex via Azure
etraut-openai commentedon Feb 12, 2026
Please report these problems to the Azure team. There's not much the Codex team can do about this.
neurostream commentedon Feb 14, 2026
I'm experiencing this several times a day, even outside of Azure
matys1 commentedon Mar 5, 2026
I am also experiencing the same issue with gpt-5.3-codex via Azure
attilaolah commentedon Mar 17, 2026
Oddly enough, since GPT-5.4 has been out, I haven't seen this issue much in
gpt-5.3-codexany more. In any case, bumping retries up to 30 mostly tosses this under the rug.pauldinu10 commentedon Mar 23, 2026
I kept running into this on Azure with gpt-5.3-codex and 5.4. Built a workaround that auto-retries on stream disconnect and splits large tasks into separate sessions to avoid context overflow and compaction errors.
https://github.com/pauldinu10/codex-smart
It's a PowerShell wrapper that runs each task from a tasks.md file as a fresh codex exec --full-auto session. If the stream drops, it retries automatically up to N times. Not a fix, but makes Codex usable for long migrations.
etraut-openai commentedon Apr 5, 2026
If you're still seeing this issue, please report it to the Azure team.
OrhanYaz commentedon May 6, 2026
Hey all, are you still having the issues using azure ai foundry through codex ? If yes I managed to fix the issue (I think). I was experiencing the issue everyday and then I thought about a parameter in azure AI foundry.
When you create a deployment (basically deploy gpt 5.4 or 5.5 model in Azure AI Foundry), you can control the token per minute rate and by default it is set to 250k. I increased it to a million token per minute and it solved the issue.
I think the issue was that once codex reach the limit, it get rate alerte from azure ai foundry which leads to the reconnecting.