API 500 errors fail silently, stalling sessions with no recovery

Resolved 💬 3 comments Opened Feb 25, 2026 by txcfi-scott Closed Feb 25, 2026

Problem

During a normal Claude Code session (building a multi-file Python project with background agents), I'm hitting recurring API 500 Internal Server Errors. The core problem isn't the 500s themselves — those happen — it's that Claude Code has no error handling for them. When a 500 occurs:

  • The agent/tool call just silently stops
  • Claude doesn't know it failed
  • The session stalls with no indication of what happened
  • The user has to notice the stall, manually check, and nudge Claude to retry
  • Work that was in progress is lost with no recovery

This makes Claude Code very difficult to use for any non-trivial session. Background agents are especially affected since there's no feedback loop.

Request IDs

These all occurred within a single ~30 minute session on February 25, 2026:

  • req_011CYVAjspabZ5YKNPgKUTnf
  • req_011CYVAfLw6t9VeQqNroHPw9
  • req_011CYVAeCxrGK9dCAz16tpaM
  • req_011CYVCFPVCzRQSbv5qVf3as

Expected Behavior

  • Claude Code should catch 500 responses and retry automatically (with backoff)
  • If retries fail, surface the error clearly to both the user and the Claude context
  • Claude should be told "your last tool call failed with a 500, retry or adjust"
  • Background agents should report failures back to the parent session
  • At minimum: don't fail silently. Show the user something.

Environment

  • Claude Code CLI
  • Model: claude-opus-4-6
  • macOS (Darwin 25.3.0)
  • Using background agents (Task tool) extensively

Impact

In a session building a multi-file project, 4 separate 500 errors caused the session to stall repeatedly. Each time required manual intervention to notice, diagnose, and recover. For a tool that's designed for autonomous multi-step work, silent failures are a critical gap.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗