Skip to content

Provider 520 errors surface as MessageAbortedError with no diagnostics (zero tokens, repeated retries) #9038

Closed

Description

@reinhardbuyabo

Description

Summary

When a provider request fails with HTTP 520, OpenCode reports an unknown error, 520 (1000) and retries, but surfaces no actionable diagnostics. The session terminates with MessageAbortedError and zero token usage, making it difficult to determine whether the failure is due to provider outage, rate limiting, network issues, or internal cancellation.


Observed Behavior

  • Error message:
    unknown error, 520 (1000) [retrying…]

  • Session ends with:

    • MessageAbortedError: The operation was aborted
    • input_tokens = 0, output_tokens = 0
  • Retries occur without additional context or classification of the failure


Expected Behavior

  • Clear indication of:

    • which provider/model failed
    • failure phase (pre-dispatch, connect, stream)
    • whether retrying is meaningful
  • Improved surfacing of upstream/provider-level errors when available


Environment

  • Provider: opencode
  • Model: minimax-m2.1-free
  • Mode: build
  • OS: WSL2 (Linux subsystem on Windows)
  • Reproducible across multiple retries

Impact

Opaque handling of provider-level 520 errors makes debugging availability, rate limits, or configuration issues difficult, especially when failures occur before any token usage.

Plugins

No response

OpenCode version

1.1.25

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

Windows 11 Host with WSL2

Terminal

Windows Terminal

Activity

  1. github-actions commented on Jan 17, 2026

    @github-actions
    Contributor

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

    Feel free to ignore if none of these address your specific case. However, they all relate to the broader issue of poor error diagnostics and retry mechanisms when provider requests fail.

  2. thdxr commented on Mar 25, 2026

    @thdxr
    Member

    To stay organized issues are automatically closed after 90 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

bugSomething isn't workingwindows

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions