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
Azure: stream disconnected before completion: response.failed event received #9936
This looks like it's an issue that we fixed (or at least mitigated) a couple of weeks ago. Under certain circumstances, the latest models are taking a long time to stream responses, and this can trigger a timeout at the HTTP layer. The fix was to introduce a keepalive on the server side. It's quite possible that the Azure team has not yet integrated this change on their side. You might want to report the issue to them.
@matys1, make sure you're reporting these issues to Azure as well. If it's a connectivity issue on their side, they won't know that you're facing issues if you report it here.
Reacted by Matiss, willparsons, Ilmari Oranen and Harshit Agarwal
Still getting this and I am using gpt-5.1-codex-mini high. this is frustrating. These issues dont happen on claude code. so to come here and experience it, really defeats the purpose of using codex at all
Most of these the "disconnected before completion" issues turn out to be network connectivity issues — often related to VPNs, proxies, and firewalls. We receive a lot of these bug reports and don't have time to investigate them all. We are working on a connectivity analyzer tool to help users self-diagnose these issues.
As I mentioned above, if you have not already done so, I recommend reporting these issues to Azure as well. If this is a connectivity issue on their side, they will not know about it if you don't report it to them.
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.
Reacted by Do, Nico Knoll, Better, Flavio Bava, KenanAlci, Joel and Zeus
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.
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.
Changing the token limit from 250k to 1 million solved the issue for me as well. Previously at 250k token limit, I would get the error: "■ stream disconnected before completion: response.failed event received." Following my change to 1 million, it did not happen again.
Activity
codeofdusk commentedon Jan 26, 2026
CC @etraut-openai.
github-actions commentedon Jan 26, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
etraut-openai commentedon Jan 26, 2026
This looks like it's an issue that we fixed (or at least mitigated) a couple of weeks ago. Under certain circumstances, the latest models are taking a long time to stream responses, and this can trigger a timeout at the HTTP layer. The fix was to introduce a keepalive on the server side. It's quite possible that the Azure team has not yet integrated this change on their side. You might want to report the issue to them.
codeofdusk commentedon Jan 26, 2026
In the meantime, could the tiemout (on the Codex CLI side) be made configurable, or is it already?
etraut-openai commentedon Jan 27, 2026
A client-side fix isn't possible for this. It need to be fixed on the server.
matys1 commentedon Mar 5, 2026
Still facing this issue with gpt-5.3-codex on Azure
etraut-openai commentedon Mar 5, 2026
@matys1, make sure you're reporting these issues to Azure as well. If it's a connectivity issue on their side, they won't know that you're facing issues if you report it here.
sgil-itglue commentedon Mar 5, 2026
Still getting this and I am using gpt-5.1-codex-mini high. this is frustrating. These issues dont happen on claude code. so to come here and experience it, really defeats the purpose of using codex at all
etraut-openai commentedon Mar 5, 2026
Most of these the "disconnected before completion" issues turn out to be network connectivity issues — often related to VPNs, proxies, and firewalls. We receive a lot of these bug reports and don't have time to investigate them all. We are working on a connectivity analyzer tool to help users self-diagnose these issues.
As I mentioned above, if you have not already done so, I recommend reporting these issues to Azure as well. If this is a connectivity issue on their side, they will not know about it if you don't report it to them.
mbartonftp commentedon Mar 5, 2026
same here with xhigh - @etraut-openai where do we report this to Azure?
drew-simmons commentedon Mar 11, 2026
I was running into this issue and resolved it by increasing the capacity on the Azure deployed model (e.g.
300).mbartonftp commentedon Mar 12, 2026
This worked for us, thanks!
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.
Hundsmuhlen commentedon May 5, 2026
same here with 5.5 - super annoying!
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.
6639835 commentedon May 6, 2026
Which account are you in? I can't do that...
6639835 commentedon May 6, 2026
It works, thanks!
jo-rum commentedon Jun 17, 2026
Changing the token limit from 250k to 1 million solved the issue for me as well. Previously at 250k token limit, I would get the error: "■ stream disconnected before completion: response.failed event received." Following my change to 1 million, it did not happen again.
VABVAT commentedon Jul 20, 2026
Using gpt 5.6, still having this issue, on one of the VM it works fine, on the other it does not
KENILSHAHH commentedon Jul 24, 2026
what vm it doesnt have this @VABVAT ?
VABVAT commentedon Jul 24, 2026
@KENILSHAHH on jupyter notebook hosted on AWS (sagemaker)
Alvi24 commentedon Jul 31, 2026
having the same issue
markojak commentedon Aug 4, 2026
This is a constant issue for us as well through a HTTP Proxy -> hitting the Azure Foundry deployed endpoint. 5.6-sol and other models