constantly getting stream disconnected before completion: An error occurred while processing your request
What version of Codex is running?
Version 0.4.19
Which model were you using?
gpt-5-codex high
What platform is your computer?
Linux 6.14.0-33-generic x86_64 x86_64
What steps can reproduce the bug?
Run Codex vscode extension and observe the stream output
Transport decoding error appears and retries but never succeeds
What is the expected behavior?
The stream should remain connected until completion without transport decode errors.
What do you see instead?
stream error: stream disconnected before completion: Transport error: error decoding response body; retrying 1/5 in 206ms…
stream error: stream disconnected before completion: Transport error: error decoding response body; retrying 2/5 in 373ms…
stream error: stream disconnected before completion: Transport error: error decoding response body; retrying 3/5 in 810ms…
stream error: stream disconnected before completion: Transport error: error decoding response body; retrying 4/5 in 1.66s…
stream error: stream disconnected before completion: Transport error: error decoding response body; retrying 5/5 in 3.251s…
Failed
stream disconnected before completion: Transport error: error decoding response body
Additional information
PRO user.
16 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
i am getting the error on a different platform and with a different extension.
EDIT: I confirm that the issue is happening on both vscode extension and codex cli on Ubuntu 24.04. The same error does not explicitly appear when using codex web interface.
If it can be of any help, I did not hit Rate limits, and I am using codex for a single project.
Moreover, I started to notice the error exactly after I reached the maximum token context length.
Starting a new chat, disabling or uninstalling the extension or the CLI plugin does not solve the issue.
@gpeal the issue is still here and super annoying. Please help!
This seems to be an issue with the ChatGPT endpoint rather than the app itself.
Maybe. It happens while coding locally with both vs-code extension and codex cli. Conversely, it does not seem to happen if I use codex web.
We are prioritizing looking into this. I will mark as duplicate here because there are a few other reports, but we are actively working on resolving these issues.
Same error
I still often get this error myself (getting it right now, for example:
stream disconnected before completion: Transport error: Error while reading the server response: error decoding response body, request id: 9a2dd5f36ad74ae7-DENI assume the DEN is for Denver, which is the closest nearby city to me at the moment.Same error
Same getting this nonstop / constantly
For people getting this issue with Azure, you are likely using a Foundry Project or Foundry Hub endpoint, instead of the OpenAI Services endpoint.
Instead of:
https://my-foundry.services.ai.azure.com/openaiUse:
https://my-foundry.openai.azure.com/openai/v1/And make sure you also don't have:
query_params = { api-version = "2025-04-01-preview" }I'm using Azure Openai like base_url = "https://my-foundry.openai.azure.com/openai/v1/", also see this error.
You're likely hitting your quota limit.
Not working for me and clearly not hitting our quota :/
I am getting this error constantly in the latest codex, using 5.3 codex in wsl.
Another thing that causes this is using some kind of AI Gateway. If not implemented properly, using sticky headers, etc, it can cause these issues.