constantly getting stream disconnected before completion: An error occurred while processing your request

Resolved 💬 16 comments Opened Oct 12, 2025 by fras3c Closed Oct 16, 2025
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

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.

View original on GitHub ↗

16 Comments

github-actions[bot] contributor · 9 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #4983

Powered by Codex Action

fras3c · 9 months ago

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.

fras3c · 9 months ago

@gpeal the issue is still here and super annoying. Please help!

chall37 · 9 months ago

This seems to be an issue with the ChatGPT endpoint rather than the app itself.

fras3c · 9 months ago
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.

tibo-openai collaborator · 9 months ago

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.

SDGLBL · 9 months ago

Same error

aaronash · 7 months ago

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-DEN I assume the DEN is for Denver, which is the closest nearby city to me at the moment.

Master-cai · 7 months ago

Same error

Asentrixx · 7 months ago

Same getting this nonstop / constantly

Falven · 7 months ago

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/openai

Use:
https://my-foundry.openai.azure.com/openai/v1/

[model_providers.azure]
name = "Azure OpenAI"
base_url = "https://my-foundry.openai.azure.com/openai/v1/"
env_key = "AZURE_OPENAI_API_KEY"
wire_api = "responses"

And make sure you also don't have:
query_params = { api-version = "2025-04-01-preview" }

jonydev · 7 months ago
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/openai Use: https://my-foundry.openai.azure.com/openai/v1/ [model_providers.azure] name = "Azure OpenAI" base_url = "https://my-foundry.openai.azure.com/openai/v1/" env_key = "AZURE_OPENAI_API_KEY" wire_api = "responses" 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.

Falven · 7 months ago
> 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/openai > Use: https://my-foundry.openai.azure.com/openai/v1/ > [model_providers.azure] > name = "Azure OpenAI" > base_url = "https://my-foundry.openai.azure.com/openai/v1/" > env_key = "AZURE_OPENAI_API_KEY" > wire_api = "responses" > 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.

lbouriez · 5 months ago
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/openai Use: https://my-foundry.openai.azure.com/openai/v1/ [model_providers.azure] name = "Azure OpenAI" base_url = "https://my-foundry.openai.azure.com/openai/v1/" env_key = "AZURE_OPENAI_API_KEY" wire_api = "responses" And make sure you also don't have: query_params = { api-version = "2025-04-01-preview" }

Not working for me and clearly not hitting our quota :/

RDMurray · 4 months ago

I am getting this error constantly in the latest codex, using 5.3 codex in wsl.

Falven · 4 months ago

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.