Claude Code UI should handle API errors gracefully

Resolved 💬 2 comments Opened Mar 17, 2026 by 45Harley Closed Apr 14, 2026

Problem

When the Anthropic API returns 500/529 errors (e.g., during elevated error incidents like the one on Mar 17, 2026), the CLI dumps the raw JSON error to the screen:

API Error: 500 {"type":"error","error":{"type":"api_error","message":"Internal server error"},"request_id":"req_011CZ9KGRz1XuU8qbWDdEjp9"}

This happens repeatedly (5+ times in a row during an incident), with no retry logic, no friendly messaging, and no indication of whether the conversation context is intact.

Expected behavior

  • Friendly error message ("Anthropic API is temporarily unavailable, retrying...")
  • Automatic retry with exponential backoff (e.g., 3 attempts before giving up)
  • Preserve the user's message so it can be re-sent when the API recovers
  • Show link to https://status.anthropic.com if repeated failures
  • Don't dump raw JSON — the user doesn't need to see request IDs and error type internals

Actual behavior

  • Raw JSON error dumped to screen
  • No retry
  • User has no idea if their message was lost or if the conversation is still valid
  • During a multi-minute outage, the user sees the same raw error 5+ times with no guidance

Context

During the "Elevated errors on Claude Opus 4.6" incident (Mar 17, 2026, resolved ~11:45 UTC), the CLI was essentially unusable for ~15 minutes with no helpful feedback. A simple retry + friendly message would have made this a minor inconvenience instead of a confusing experience.

View original on GitHub ↗

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