Auto-retry on 529 overloaded_error in interactive mode
Resolved 💬 2 comments Opened Mar 18, 2026 by soopadrive Closed Apr 16, 2026
Problem
When the Anthropic API returns a 529 overloaded_error at session start, Claude Code displays the raw error and the session dies immediately:
API Error: 529 {"type":"error","error":{"type":"overloaded_error","message":"Overloaded"},"request_id":"req_..."}
The user must manually restart and re-enter their prompt. There is no retry, no backoff, no recovery.
Current behavior
- 529 error → session dead, no retry
--fallback-modelexists but only works in non-interactive (-p) mode- No settings, env vars, or hooks to configure retry behavior for API errors
Proposed behavior
- On 529 (or 503/overloaded), automatically retry with exponential backoff (e.g., 10s → 30s → 60s, up to 3 attempts)
- Show a status message like
API overloaded, retrying in 10s... (attempt 1/3) - If all retries fail, then show the error
- Optionally configurable in
settings.json:
{
"api_retry": {
"max_attempts": 3,
"initial_delay_seconds": 10,
"backoff_multiplier": 3,
"retryable_errors": [529, 503]
}
}
Why this matters
A single transient 529 shouldn't kill a session. The user loses their prompt context and has to start over. This is especially frustrating during peak usage periods when 529s are more likely but typically resolve within seconds.
Environment
- Claude Code v2.1.78
- Model: Opus 4.6 (1M context), Claude Max plan
- Platform: WSL2 on Windows 11
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗