Claude API 18
Claude (Anthropic) API errors, thinking and tool-use rules, model retirements.
- Claude Opus 4.5 retires from the Claude API on Jan 22, 2027
claude-opus-4-5-20251101 and the undated claude-opus-4-5 retire Jan 22, 2027. What changes in requests and responses when you move to claude-opus-5-5.
Ubuntu 24.04 (Docker) · GNU grep 3.11 · Anthropic official Model deprecations and Opus 5.5 migration guide · 2026-12 - Claude Sonnet 4.5 retired on Nov 30, 2026: how to migrate
Claude Sonnet 4.5 was retired on Nov 30, 2026, including the undated claude-sonnet-4-5. Find where you use it and move to claude-sonnet-5-5.
Ubuntu 24.04 (Docker) · GNU grep 3.11 · Anthropic official docs · 2026-12 - Claude API 403 permission_error: causes and fixes
Claude API 403 permission_error: the key authenticated but may not use that resource. Check workspace, key type and scopes, and organization access.
curl · Claude API official docs · 2026-10 - Fix Claude API "thinking.type.disabled" is not supported
Claude API 400 "thinking.type.disabled is not supported for this model": thinking is always on for that model. Remove the field; Sonnet 5.5 needs between_tools.
Claude API official docs · 2026-11 - Claude API 409 conflict_error: causes and how to retry
Claude API 409 conflict_error: the request clashed with a resource's state. Tell concurrent edits, duplicates and a stale version apart, re-read, then retry.
Claude API official docs · 2026-11 - Fix Claude API 504 timeout_error on long requests
Claude API 504 timeout_error means the request timed out while processing. Move long requests to streaming or Message Batches, and check SDK retries.
Python 3.12.16 (Docker) · anthropic 2.3.0 · Claude API official docs · 2026-10 - Claude API 404 not_found_error: wrong path, ID or model
Claude API 404 not_found_error means the resource was not found. Check the endpoint path (a doubled /v1), resource IDs in the URL, and the model name.
Python 3.12.16 (Docker) · anthropic 2.3.0 · curl · Claude API official docs · 2026-12 - Claude API: thinking block is bound to a different conversation
Claude API 400 Invalid signature in thinking block: earlier history was edited. Make history append-only; use drop_block with the beta header as a stopgap.
Claude API official docs · 2026-10 - Claude API: tool_choice "tool" and "any" are not supported
Claude API 400 tool_choice "tool" and "any" are not supported: Opus 5.5 and others reject forced tool use. Use auto with strict tools or structured outputs.
Claude API official docs · 2026-10 - Claude API 529 overloaded_error: retry and back off
Claude API 529 overloaded_error is API-wide overload, not your rate limit. Retry with SDK max_retries and exponential backoff, and log the request-id.
Claude API official docs · curl · 2026-10 - Fix Claude API "thinking blocks cannot be modified" 400
Claude API 400 thinking or redacted_thinking blocks cannot be modified means the last assistant turn was altered. Send its content back exactly as received.
Python 3.12 · Claude API official docs · 2026-10 - Claude API effort 'xhigh' not supported when thinking is disabled
Claude API 400 effort 'xhigh' is not supported when thinking is disabled: xhigh sent with thinking off. Lower effort to high or use adaptive thinking.
Claude API official docs · 2026-10 - Fix Claude API 413 request_too_large
When the Claude API returns 413 request_too_large or Claude Code stops at "Request too large (max 32MB)", learn what the limit counts and shrink the request.
Python 3.13 · Claude API · Claude Code official docs · 2026-10 - Fix Claude API 400 "Your credit balance is too low"
When the Claude API or Claude Code fails with "credit balance is too low", tell an empty balance from an API key overriding your subscription, then fix it.
Claude API · Claude Code official docs · 2026-10 - Fix Claude API 400 "thinking.type.enabled is not supported"
After moving to Claude 4.7 or later, a budget_tokens request returns 400. Switch thinking to adaptive and set depth with output_config.effort.
Claude API official docs · 2026-10 - Fix Claude API 400 "tool_use without tool_result"
Fix the 400 "tool_use ids were found without tool_result blocks immediately after": the message pairing rules, and /rewind recovery in Claude Code.
Python 3.13 · Claude Messages API official docs · 2026-10 - Fix Claude API 400 "does not support assistant message prefill"
Claude 4.6 and later models return a 400 when messages ends with an assistant turn. Remove it and set the format with structured outputs or a system prompt.
Claude API official docs · 2026-10 - Check stop_reason to Tell If a Claude Response Was Cut Off
If json.loads fails on a reply cut off mid-string, read stop_reason first. A Python check for max_tokens truncation, and how to raise the limit or continue.
Python 3.12.3 · Claude Messages API docs as of 2026-10 · checked against sample response JSON