Skip to content

OpenAI server_is_overloaded stream errors are not retried #25884

Closed

Description

@johnwaldo

Description

OpenAI-compatible streams can fail with a transient overload event instead of normal text:

{"type":"error","error":{"type":"service_unavailable_error","code":"server_is_overloaded","message":"Our servers are currently overloaded. Please try again later."}}

When that shape is surfaced as a stream error, it should enter the existing session retry flow instead of stopping the turn as a final error.

Plugins

None required to reproduce the underlying provider error shape.

OpenCode version

1.14.33

Steps to reproduce

  1. Use an OpenAI-compatible model during a provider overload window.
  2. The provider returns the stream error above.
  3. The session stops instead of showing the existing retry countdown/status.

Screenshot and/or share link

N/A

Operating System

macOS

Terminal

Any

Activity

  1. github-actions commented on May 5, 2026

    @github-actions
    Contributor

    This issue doesn't fully meet our contributing guidelines.

    What needs to be fixed:

    • This issue appears to have been generated by an AI tool (aidevops.sh, as noted in the footer). AI-generated walls of text are not acceptable — please rewrite this in your own words, describing the actual problem you experienced and why you need this feature.
    • Feature requests must start with [FEATURE]: in the title.

    Please edit this issue to address the above within 2 hours, or it will be automatically closed.


    This issue might be a duplicate of existing issues. Please check:

    If you believe this was flagged incorrectly, please let a maintainer know.

  2. changed the title [-]Retry provider overload errors with inline recovery status[/-] [+]OpenAI server_is_overloaded stream errors are not retried[/+] on May 5, 2026
  3. github-actions commented on May 5, 2026

    @github-actions
    Contributor

    Thanks for updating the issue! It now meets the contributing guidelines and includes all the necessary information. We appreciate you taking the time to provide a clear description, reproduction steps, and system details.

  4. github-actions commented on May 5, 2026

    @github-actions
    Contributor

    test

  5. johnwaldo commented on May 5, 2026

    @johnwaldo
    Author

    Thanks for the automated guidance. I updated the issue and PR to match the repo templates and removed the generated footer/long-form wording.

    I also checked the related work and saw #25728 covers the same server_is_overloaded stream shape from the Codex side. I pushed one small adjustment here so this branch also routes the stream error through parseStreamError, not just the later retry classifier.

    If maintainers prefer #25728, I can close this PR as a duplicate. Otherwise this one is now the same narrow bug fix from the OpenAI-compatible stream angle.

  6. samiralibabic commented on May 5, 2026

    @samiralibabic

    Please prioritise.

  7. EnderHane commented on May 6, 2026

    @EnderHane

    I am suprised. This almost makes OpenAI service unusable at all with OpenCode

  8. MichaelFisher1997 commented on May 6, 2026

    @MichaelFisher1997

    Yes please fix this

  9. doodlezz commented on May 6, 2026

    @doodlezz

    service_unavailable_error: Our servers are currently overloaded. Please try again later.

  10. AleksQuantum commented on May 6, 2026

    @AleksQuantum

    This needs to be fixed. Also I am shocked we all have this issue yet codex status shows that everything is absolutely fine. What am I even paying my money for at this point...

  11. Techie5879 commented on May 6, 2026

    @Techie5879

    Yup this started happening with GPT5.5 on pro subs from yday. Probably needs to be retried.

  12. samiralibabic commented on May 6, 2026

    @samiralibabic

    Fixed, but on dev. I built from dev and it works. Feel free to release.

  13. spark4862 commented on Jun 2, 2026

    @spark4862
    Contributor

    Related fix in #30323 — covers server_is_overloaded and other OpenAI/Codex stream envelopes in parseStreamError + retryable().

  14. dawidgora commented on Jul 17, 2026

    @dawidgora

    The issue is still valid. I can see related PR with fix is closed now...

  15. fareesh commented on Aug 11, 2026

    @fareesh

    This issue has been relentless today, had to switch to pi to get work done. Happening on v1 latest and v2 latest. I suspect it's only reproducible under certain conditions at OpenAI.

  16. opencode-agent commented on Oct 1, 2026

    @opencode-agent
    Contributor

    Checked the reported type: "error" stream frame with nested error.code: "server_is_overloaded" against the current V1 (dev) and V2 (v2) code:

    Closing for the specific payload in this issue. The August report of failures on both versions may involve another error shape or retry condition; if it still occurs, please provide a fresh version and the actual stream/error payload so that path can be investigated separately.

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions