Feature request: auto-retry on API 500 errors

Status Fixed / completed
Maintainer reply None cached
Activity 3 comments · opened Feb 25, 2026 · closed Feb 25, 2026

Problem

When the Anthropic API returns 500 errors during an active incident, Claude Code hangs silently with no visual feedback and no automatic retry. The user experience is that Claude appears frozen — there's no indication that anything went wrong or that the request failed. The user has to manually press Escape and re-trigger their prompt.

During today's incident (Feb 25, 2026 — "Elevated error rates across multiple models"), this happened repeatedly across a working session, causing significant disruption.

Proposed Solution

  1. Auto-retry with backoff — On 500 errors, automatically retry 2-3 times with exponential backoff (e.g., 2s, 4s, 8s) before surfacing the failure to the user.
  2. Visible status indicator — Show something in the UI when a request fails and is being retried (e.g., "API error, retrying...") so the user knows Claude isn't just sitting there.
  3. Configurable — Allow users to set retry count and backoff in settings if desired.

Current Workaround

Press Escape to cancel the stuck request, then re-send manually.

Environment

  • Claude Code CLI
  • Windows 11
  • Model: claude-opus-4-6

View original on GitHub ↗

3 Comments

github-actions[bot] · 7 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/23115
  2. https://github.com/anthropics/claude-code/issues/28600
  3. https://github.com/anthropics/claude-code/issues/27236

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

stevenpetryk · 7 months ago

@GONZW053 Claude Code aggressively automatically retries up to 10 times when encountering a 500 error, with exponential backoff. We surface retries 4 and up to the TUI so you can see it retrying.

It sounds like that contradicts what you experienced, so if you still have that conversation available, it'd be great if you could claude --resume it and use /feedback so I can better look into this. And of course (I assume you've already done this, but) make sure you're up-to-date.

Apologies for the disruption caused by today's outage, though. I'm going to close this out since /feedback will stage another issue for you with more detail.

github-actions[bot] · 7 months ago

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.