Retry Claude overloaded_error's #105

Closed
opened 2026-02-16 17:25:13 -05:00 by yindo · 5 comments
Owner

Originally created by @maxstevens-nl on GitHub (Jun 17, 2025).

Originally assigned to: @thdxr on GitHub.

I'm getting quite a lot of overloaded errors (using Claude 4 Sonnet on the Max subscription):

{"type":"overloaded_error","message":"Overloaded"}

In claude code this is handled as a retryable error following this schedule. It would be great if OpenCode also retried these errors.

Originally created by @maxstevens-nl on GitHub (Jun 17, 2025). Originally assigned to: @thdxr on GitHub. I'm getting quite a lot of overloaded errors (using Claude 4 Sonnet on the Max subscription): ```json {"type":"overloaded_error","message":"Overloaded"} ``` In claude code this is handled as a retryable error following [this schedule](https://github.com/anthropics/claude-code/issues/583#issuecomment-2745974091). It would be great if OpenCode also retried these errors.
yindo closed this issue 2026-02-16 17:25:13 -05:00
Author
Owner

@maxstevens-nl commented on GitHub (Jun 17, 2025):

Looking into this a bit more, these lines in the AI SDK determine if a request should be retried. The status of an overloaded call should be 529, so I would expect the call to be retried. Is there a way to check out the network requests, so I can verify that the response code is actually 529? The logs only show this:

2025-06-17T07:44:29 +10112ms service=session error=[object Object] callback error
2025-06-17T07:44:29 +1ms message={"type":"overloaded_error","message":"Overloaded"} cause=[object Object] UnknownError
2025-06-17T07:44:29 +0ms service=bus type=session.error publishing
@maxstevens-nl commented on GitHub (Jun 17, 2025): Looking into this a bit more, [these](https://github.com/vercel/ai/blob/0c97722ffc585f01b1f757702b1a6bb4a4fc51f9/packages/provider/src/errors/api-call-error.ts#L28-L32) lines in the AI SDK determine if a request should be retried. The status of an overloaded call should be [529](https://docs.anthropic.com/en/api/errors), so I would expect the call to be retried. Is there a way to check out the network requests, so I can verify that the response code is actually 529? The logs only show this: ``` 2025-06-17T07:44:29 +10112ms service=session error=[object Object] callback error 2025-06-17T07:44:29 +1ms message={"type":"overloaded_error","message":"Overloaded"} cause=[object Object] UnknownError 2025-06-17T07:44:29 +0ms service=bus type=session.error publishing ```
Author
Owner

@vieko commented on GitHub (Jul 2, 2025):

I just started experiencing this when using Claude 4 Sonnet. It wasn't happening yesterday. The difference as far as I can tell: upgraded to a Max subscription from Pro. It does not happen when I switch to Claude 4 Sonnet on Bedrock.

@vieko commented on GitHub (Jul 2, 2025): I just started experiencing this when using Claude 4 Sonnet. It wasn't happening yesterday. The difference as far as I can tell: **upgraded to a Max subscription from Pro**. It does not happen when I switch to Claude 4 Sonnet on Bedrock.
Author
Owner

@thdxr commented on GitHub (Jul 2, 2025):

anthropic was having issues the past 24 hours

@thdxr commented on GitHub (Jul 2, 2025): anthropic was having issues the past 24 hours
Author
Owner

@thdxr commented on GitHub (Jul 2, 2025):

closing for now - lets see if it comes back up

@thdxr commented on GitHub (Jul 2, 2025): closing for now - lets see if it comes back up
Author
Owner

@JTroyerOvermatch commented on GitHub (Jul 8, 2025):

It's back. At the very least, retries will falloff should be implemented.

@JTroyerOvermatch commented on GitHub (Jul 8, 2025): It's back. At the very least, retries will falloff should be implemented.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#105