API 500 errors display as fatal in terminal even when retry succeeds

Resolved 💬 1 comment Opened Mar 27, 2026 by nchantarotwong Closed Apr 16, 2026

Bug

When the Anthropic API returns a transient 500 error, Claude Code displays the error in the terminal:

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

The conversation then continues normally (presumably via automatic retry), but the error message remains visible and looks like a terminal failure.

Impact

  • Users see "500 Internal server error" and assume the operation failed
  • No visual indicator that a retry is happening or succeeded
  • Especially confusing when it appears after invoking a slash command/skill — looks like the skill failed
  • Observed 3 times in a single session (March 2026, Opus model)

Expected behavior

Either:

  1. Hide transient errors on successful retry — if the retry succeeds, don't show the error at all
  2. Show retry status — display something like "API error, retrying..." → "Recovered" so the user knows it's transient
  3. Visually distinguish — at minimum, dim/grey the error text or add a "(retried successfully)" suffix after recovery

Reproduction

Intermittent — happens during normal usage when Anthropic API has transient issues. No specific steps to reproduce, but it's been observed multiple times across sessions.

Environment

  • Claude Code CLI
  • Model: claude-opus-4-6 (1M context)
  • macOS

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗