Instant reference for every Anthropic API error code and Claude Code error message. Stop guessing — find the fix in seconds.
Claude's servers are temporarily at capacity. Retry with exponential backoff after 30–60 seconds.
You've exceeded your requests-per-minute or tokens-per-minute limit. Implement backoff and throttling.
Invalid or missing API key. Verify your ANTHROPIC_API_KEY is set and starts with sk-ant-.
Your account doesn't have access to this model or feature. Check your plan and model availability.
Malformed request — invalid parameters, wrong types, or missing required fields. Check the API schema.
Resource not found — often a deprecated model string or wrong API endpoint. Use a current model ID.
Request payload exceeds 10 MB. Compress images, reduce base64 payloads, or chunk your content.
Internal Anthropic server error. Retry after a short delay; check status.anthropic.com for outages.
Conversation exceeds the model's 200k context window. Summarize history or truncate older messages.
Free-tier credits exhausted or no payment method on file. Add a card at console.anthropic.com/settings/billing.
Model ID is deprecated or misspelled. Replace claude-2, claude-instant with a current versioned ID.
Request triggered Anthropic's safety classifier. Add use-case context in your system prompt to fix false positives.
Request exceeded the configured timeout. Use streaming for long responses or increase the SDK timeout setting.
Tool result has wrong format or missing fields. Ensure your tool_result block matches the expected schema.
Claude Code can't access a file or run a command. Configure allowedTools in .claude/settings.json.
MCP server failed to start or crashed mid-session. Debug with logs, fix paths and stdio protocol issues.
Network-layer failure before reaching Anthropic's API. Fix timeouts, proxy settings, and SSL issues.
SSE stream terminated before message_stop. Increase timeout, disable proxy buffering, resume from partial content.
API key missing, malformed, or not loaded from .env. Full checklist: get key, set env var, call load_dotenv().
| Error Type | HTTP | Cause | Fix |
|---|---|---|---|
overloaded_error |
529 | Server at capacity | Retry + backoff |
rate_limit_error |
429 | Too many requests | Throttle / backoff |
authentication_error |
401 | Invalid API key | Check key format |
permission_error |
403 | Plan/model access | Upgrade plan |
invalid_request_error |
400 | Malformed request | Validate schema |
not_found_error |
404 | Wrong model/endpoint | Use current model ID |
request_too_large |
413 | Payload > 10 MB | Compress / chunk |
api_error |
500 | Anthropic internal | Retry later |
context_length_exceeded |
400 | >200k tokens | Summarize history |
tool_use_failed |
SDK | Bad tool result | Fix schema |