Skip to content

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

Closed as duplicate

Description

@fras3c

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.

Activity

  1. added
    bug
    on Oct 12, 2025
  2. added
    extension
    on Oct 12, 2025
  3. github-actions commented on Oct 12, 2025

    @github-actions
    Contributor
  4. fras3c commented on Oct 12, 2025

    @fras3c
    Author

    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.

  5. fras3c commented on Oct 13, 2025

    @fras3c
    Author

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

  6. chall37 commented on Oct 14, 2025

    @chall37

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

  7. fras3c commented on Oct 14, 2025

    @fras3c
    Author

    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.

  8. tibo-openai commented on Oct 16, 2025

    @tibo-openai
    Collaborator

    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.

  9. SDGLBL commented on Oct 22, 2025

    @SDGLBL

    Same error

  10. aaronash commented on Nov 23, 2025

    @aaronash

    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.

  11. Master-cai commented on Nov 23, 2025

    @Master-cai

    Same error

  12. Asentrixx commented on Nov 27, 2025

    @Asentrixx

    Same getting this nonstop / constantly

  13. Falven commented on Dec 9, 2025

    @Falven

    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" }

  14. jonydev commented on Dec 13, 2025

    @jonydev

    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.

  15. Falven commented on Dec 13, 2025

    @Falven

    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.

  16. lbouriez commented on Jan 31, 2026

    @lbouriez

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

  17. RDMurray commented on Mar 5, 2026

    @RDMurray

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

  18. Falven commented on Mar 5, 2026

    @Falven

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugextension

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions