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

Open
opened 2026-02-16 18:04:37 -05:00 by yindo · 1 comment
Owner

Originally created by @reinhardbuyabo on GitHub (Jan 17, 2026).

Originally assigned to: @rekram1-node on GitHub.

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

Originally created by @reinhardbuyabo on GitHub (Jan 17, 2026). Originally assigned to: @rekram1-node on GitHub. ### 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
yindo added the windowsbug labels 2026-02-16 18:04:37 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 17, 2026):

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

  • #6878: Exa MCP endpoint (mcp.exa.ai) timing out while REST API works - discusses HTTP 520 errors from Cloudflare and diagnostic challenges
  • #8002: OpenCode hangs/freezes mid-stream on Starlink satellite internet connection - related to network failures and lack of error handling during streaming
  • #8197: Add retry / re-run capability when operation is aborted - requests better handling of aborted operations and retries
  • #1712: Implement exponential back-off when hitting rate limits - related to retry strategy and transient failures

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.

@github-actions[bot] commented on GitHub (Jan 17, 2026): This issue might be a duplicate of existing issues. Please check: - #6878: Exa MCP endpoint (mcp.exa.ai) timing out while REST API works - discusses HTTP 520 errors from Cloudflare and diagnostic challenges - #8002: OpenCode hangs/freezes mid-stream on Starlink satellite internet connection - related to network failures and lack of error handling during streaming - #8197: Add retry / re-run capability when operation is aborted - requests better handling of aborted operations and retries - #1712: Implement exponential back-off when hitting rate limits - related to retry strategy and transient failures 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.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#6571