[BUG] API Error: Overloaded should automatically retry w/ backoff
Status Fixed / completed
Maintainer reply None cached
Workaround ✓ Mentioned in thread ↓
Activity 11 comments · opened Mar 21, 2025 · closed Mar 24, 2025
Environment
- Platform (select one):
- [X] Google Vertex AI
- Claude CLI version: 0.2.52 (Claude Code)
- Operating System: macOS 15.3.1
- Terminal: iTerm2
Bug Description
I frequently get: API Error: {"type":"error","error":{"details":null,"type":"overloaded_error","message":"Overloaded"} } which interrupts flow and requires me to submit another prompt to get Claude Code to continue whatever it was doing.
Expected Behavior
It would be far better if the Overloaded error was treated as a retriable one, possibly with exponential backoff, to allow the overload condition to clear without requiring human input on my part.
Actual Behavior
I have to type something (I usually just do c) to get it to continue.
11 Comments
Looks like this behavior was just improved/fixed today in
0.2.53 (Claude Code):Confirmed that for
API Error (Request timed out.)it does exponential backoff starting with the second retry, maxing out at 32 seconds:presumably
Overloadedwould behave similarly.Thanks @scottleibrand. Yep, this is fixed in the latest version. Please reopen this ticket if you run into the problem again.
Still i see the issue
Overloaded errors should still occur. But on never versions it will automatically retry. What version are you on?
Not retrying in the latest version
0.2.56when overload error occursStrange. It's working reliably for me. Maybe open a new issue with screenshots?
Now I'm seeing the same thing @plucked is. Perhaps they removed the automatic retry in a version between 0.2.53 and 0.2.56? I don't have perms to reopen this one, so I'll open a new issue.
As I just noted at https://github.com/anthropics/claude-code/issues/661#issuecomment-2765362697:
A workaround for this is:
I successfully downgraded to 0.2.55 with that and automatic API retries are working again on the newly downgraded session as well.
<img width="1222" height="531" alt="Image" src="https://github.com/user-attachments/assets/de62b919-1554-441a-b8b6-d064a54a5c48" />
keep API Error, when will fix this? most of the time is retrying API Error
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.