Skip to content

Codex server_is_overloaded stream errors are not retried #25730

Closed as not planned

Description

@ItsWendell

Description

OpenAI Codex subscription streams can return transient overload errors in this shape:

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

OpenCode should treat this as a retryable provider overload. Today this nested stream error shape can miss retry classification because the overload code/type are nested under error.

Related broader reports: #16214 and #21893.

Plugins

None

OpenCode version

Latest dev

Steps to reproduce

  1. Use an OpenAI Codex subscription model.
  2. Hit a transient streamed overload response with error.code: server_is_overloaded.
  3. Observe that the error can terminate instead of entering the existing retry path.

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Activity

  1. github-actions commented on May 4, 2026

    @github-actions
    Contributor

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

    • Some transient stream/rate-limit errors bypass retry and terminate sessions #21893: Covers the broader pattern of transient stream errors (including wrapped rate-limit/concurrency-limit failures) bypassing the retry path — the same code paths in session/retry.ts and provider/error.ts are involved. The server_is_overloaded / service_unavailable_error shape from Codex may be a specific sub-case of what that issue tracks.

    If this server_is_overloaded error shape is not yet handled by any fix or PR against #21893, please note that distinction in the existing issue or confirm this is a separate gap.

  2. spark4862 commented on Jun 2, 2026

    @spark4862
    Contributor

    Related fix in #30323 — includes plus the broader OpenAI/Codex stream envelope set in one classifier. Happy to coordinate if #25728 is preferred for overload-only.

  3. spark4862 commented on Jun 2, 2026

    @spark4862
    Contributor

    Related fix in #30323 — includes server_is_overloaded plus the broader OpenAI/Codex stream envelope set in one classifier. Happy to coordinate if #25728 is preferred for overload-only.

  4. github-actions commented on Aug 2, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

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