You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(session): UnknownError should be retried by default #20822
Session errors wrapped as UnknownError are never retried, causing the entire conversation to terminate on transient failures.
The retry logic in SessionRetry.retryable() uses a whitelist approach — only explicitly recognized errors (APIError with isRetryable: true, rate limit keywords, etc.) are retried. Everything else, including new provider error formats, unexpected network issues, and unclassified transient errors, falls through to UnknownError and terminates the session.
Current behavior:retryable() returns undefined for UnknownError → no retry → session dies.
Expected behavior: Unknown errors should be retried with a small cap (e.g. 2 attempts). The cost of retrying a permanent error is seconds; the cost of not retrying a transient error is losing the entire conversation context.
Key files:
packages/opencode/src/session/retry.ts — retryable() function defaults to no-retry
packages/opencode/src/session/processor.ts — halt() publishes error and sets status to idle without retry
These issues all describe the same underlying problem: the retryable() whitelist approach causing UnknownError to terminate sessions instead of retrying. Please review these before continuing.
Activity
github-actions commentedon Apr 3, 2026
This issue might be a duplicate of existing issues. Please check:
overloaded_erroris not retried, halts session — same root cause: errors falling through toUnknownErrorand not being retriedAI_JSONParseErrorduring SSE streaming is not retried (falls toNamedError.Unknown) — same root cause with a specific error type and proposed fixUnknownbypass retry logicThese issues all describe the same underlying problem: the
retryable()whitelist approach causingUnknownErrorto terminate sessions instead of retrying. Please review these before continuing.github-actions commentedon Jul 3, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.