File tree Expand file tree Collapse file tree
packages/opencode/src/session Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -60,6 +60,15 @@ export function retryable(error: Err) {
6060 // even when the provider SDK doesn't explicitly mark them as retryable.
6161 if ( ! error . data . isRetryable && ! ( status !== undefined && status >= 500 ) ) return undefined
6262 if ( error . data . responseBody ?. includes ( "FreeUsageLimitError" ) ) return GO_UPSELL_MESSAGE
63+ // Non-transient rate limits (weekly/monthly quotas) should not be retried
64+ // they won't resolve with backoff and can take days to reset.
65+ const lower = error . data . message . toLowerCase ( )
66+ if (
67+ lower . includes ( "weekly" ) ||
68+ lower . includes ( "monthly" ) ||
69+ lower . includes ( "exceeded your" )
70+ )
71+ return undefined
6372 return error . data . message . includes ( "Overloaded" ) ? "Provider is overloaded" : error . data . message
6473 }
6574
You can’t perform that action at this time.
0 commit comments