Anthropic API breaking changes, updated weekly
Every verified Anthropic API trap in Footgun: changes and behaviors that break code or give wrong results, newest first. Each one has the error you see, the fix, and the date it was last checked. The list updates when the weekly check adds or retires a trap. For the full cause and sources, open the trap, or see all Anthropic API traps.
fg-0577· added 2026-10-30· last checked 2026-10-30
Requests to claude-sonnet-4-5-20250929 will fail after the November 30, 2026 retirement
Symptom
Requests pinned to claude-sonnet-4-5-20250929 start returning errors after November 30, 2026
Fix
Move to claude-sonnet-5-5 before the date. Sonnet 5.5 has its own breaking changes: use thinking type between_tools instead of disabled, drop tool_choice any and tool, and use the newer computer use toolset. Test before switching.
fg-0578· added 2026-10-30· last checked 2026-10-30
Cache diagnostics reports previous_message_not_found on the next turn
Symptom
diagnostics shows previous_message_not_found when previous_message_id is set
Fix
Include the diagnostics object on every turn. Set previous_message_id to null on the first turn and to the prior message id after that. The beta header is no longer required as of September 23, 2026.
fg-0560· added 2026-10-27· last checked 2026-10-27
Without a spend limit of your own, a runaway Claude API route bills up to your tier's full monthly cap
Symptom
Usage in the Claude Console climbs far beyond what your real users explain
Fix
On the Billing page of the Claude Console, set your own spend limit below the tier cap. For an app, give it its own workspace with its own spend and rate limits (the default workspace cannot have a spend limit). Once a limit you set is reached, requests return HTTP 400 invalid_request_error with a message starting You have reached your specified API usage limits; for handling the tier cap 429 itself, see fg-0470.
fg-0557· added 2026-10-24· last checked 2026-10-24
Messages API request with the web fetch tool returns 400 after an org admin turns off web fetch
Symptom
400 error on any Messages API request that includes the web fetch tool
Fix
Have an org admin turn web fetch on under Capabilities, or remove the web fetch tool from requests. If domain lists are set, make sure a URL (including redirect targets) passes both the organization list and the tool's allowed_domains or blocked_domains.
fg-0552· added 2026-10-24· last checked 2026-10-24
Creating a Managed Agents session returns 400, or web_fetch/web_search return nothing, under limited networking with allowed_hosts
Symptom
400 error on session create or update when a web tool's allowed_domains has an entry not within allowed_hosts
Fix
Add each needed host to allowed_hosts, using a *. wildcard entry for subdomains, or remove the entry from the web tool's allowed_domains. Note that adding a host also opens it to the sandbox.
fg-0545· added 2026-10-17· last checked 2026-10-17
Turning thinking off on Claude Sonnet 5.5 fails with thinking type disabled, and computer_20251124 returns 400
Symptom
400 error when sending thinking: {"type":"disabled"} to claude-sonnet-5-5
Fix
Send thinking type between_tools with effort high or lower. Switch to the computer_toolset_20260801 toolset. Pick a supported advisor model.
fg-0539· added 2026-10-17· last checked 2026-10-17
400 errors after switching from Claude Haiku 4.5 to claude-haiku-5-5 with budget_tokens, temperature, top_k, or prefill
Symptom
400 invalid_request_error after changing model to claude-haiku-5-5
Fix
Remove budget_tokens and use adaptive thinking with the effort parameter. Drop temperature, top_p, and top_k. Remove the trailing assistant prefill message and steer format through the prompt or structured outputs. Use computer_toolset_20260801 on the Claude API and Google Cloud, or computer_20251124 on Amazon Bedrock. Do not replay thinking blocks after editing earlier context.
fg-0475· added 2026-10-15· last checked 2026-10-15
Prompt caching silently does nothing: cache_creation_input_tokens and cache_read_input_tokens stay 0
Symptom
usage.cache_creation_input_tokens: 0 and usage.cache_read_input_tokens: 0 on every call
Fix
Check both usage fields on the second identical call. If both are 0, grow the cached prefix past the model's minimum or move the breakpoint later. A cache entry exists only after the first response begins, so send one request and wait before fanning out.
fg-0477· added 2026-10-15· last checked 2026-10-15
Structured outputs return 400 'Schema is too complex for compilation' or 'compiled grammar is too large'
Symptom
The compiled grammar is too large, which would cause performance issues. Simplify your tool schemas or reduce the number of strict tools.
Fix
Set strict only on the tools that need it, make parameters required with explicit defaults instead of optional, avoid nullable unions, flatten nesting, or split strict tools across requests.
fg-0471· added 2026-10-15· last checked 2026-10-15
Assistant prefill returns 400 on Claude Opus 4.6 and later models
Symptom
400 invalid_request_error when the messages array ends with an assistant turn
Fix
End messages with a user turn. Use structured outputs through output_config.format for JSON, or put the format rule in the system field. On Amazon Bedrock, where structured outputs are not offered for Opus 5.5, use instructions and validate the reply.
fg-0478· added 2026-10-15· last checked 2026-10-15
temperature or top_p returns 400, or a TypeError in the Python SDK, on Claude Opus 4.7 and later
Symptom
400 invalid_request_error naming temperature, top_p, or top_k
Fix
Delete temperature, top_p, and top_k from every request and steer behavior through the prompt. Note that temperature 0 never guaranteed identical outputs anyway.
fg-0479· added 2026-10-15· last checked 2026-10-15
tool_choice type "tool" or "any" returns 400 on Claude Opus 5.5, Sonnet 5.5, and Fable 5.1
Symptom
tool_choice: type "tool" and "any" are not supported for this model.
Fix
Send tool_choice auto, set strict true on the tool, and say in the prompt when it must be called. For pure extraction, switch to structured outputs. On Amazon Bedrock, where strict tools are not offered for Opus 5.5, use auto and validate the input in code.
fg-0469· added 2026-10-15· last checked 2026-10-15
400 "thinking.type.enabled" is not supported after switching to a newer Claude model
Symptom
400 invalid_request_error: "thinking.type.enabled" is not supported for this model
Fix
Remove budget_tokens, send thinking type adaptive (or omit thinking on models where it is on by default), and control depth with output_config.effort instead of a token budget.
fg-0472· added 2026-10-15· last checked 2026-10-15
Calling the Claude API from the browser fails with a CORS error or a browser-like environment error
Symptom
It looks like you're running in a browser-like environment. This is disabled by default, as it risks exposing your secret API credentials to attackers.
Fix
Call the API from a server route and keep the key there. Only for bring-your-own-key tools where the user supplies their own key, set dangerouslyAllowBrowser true.
fg-0467· added 2026-10-15· last checked 2026-10-15
400 Invalid signature in thinking block: 'The block is bound to a different conversation'
Symptom
messages.N.content.M: Invalid `signature` in `thinking` block. The block is bound to a different conversation.
Fix
Keep history append-only and use server-side compaction or context editing for trimming. To recover one request, strip every thinking and redacted_thinking block from the named block onward and retry once, or send the thinking-binding-controls-2026-08-01 beta with prefix_mismatch_behavior drop_block.
fg-0473· added 2026-10-15· last checked 2026-10-15
Message Batches results come back in a different order than the requests were submitted
Symptom
Answers are attached to the wrong input rows
Fix
Give every request a unique custom_id (1 to 64 letters, digits, hyphens, or underscores) and join results on it. Handle each result type: succeeded, errored, canceled, expired.
fg-0468· added 2026-10-15· last checked 2026-10-15
400 "thinking.type.disabled" is not supported when turning thinking off on Opus 5.5 or Sonnet 5.5
Symptom
"thinking.type.disabled" is not supported for this model. Use "thinking.type.adaptive" and "output_config.effort" to control thinking behavior.
Fix
On always-on models omit thinking and lower output_config.effort. On Sonnet 5.5 send between_tools at effort high or below. Check the per-model table before sending disabled.
fg-0470· added 2026-10-15· last checked 2026-10-15
429 rate_limit_error that retries never clear because the monthly API spend limit was reached
Symptom
429 rate_limit_error: You have reached your API usage limits
Fix
Read error.details.error_code before backing off. On enforced_spend_limit_reached stop retrying, alert someone, and raise the tier or the spend limit in the Console.
fg-0474· added 2026-10-15· last checked 2026-10-15
Prompt cache misses after changing tool_choice, images, effort, or thinking settings between calls
Symptom
cache_read_input_tokens drops to 0 on a turn where only tool_choice changed
Fix
Keep tools, tool_choice, thinking, and effort fixed for a conversation. To add an instruction mid-conversation on models that support it, append a role system message to messages instead of editing the top-level system field.
fg-0476· added 2026-10-15· last checked 2026-10-15
SDK throws 'Streaming is required for operations that may take longer than 10 minutes' before sending
Symptom
Streaming is required for operations that may take longer than 10 minutes. See https://github.com/anthropics/anthropic-sdk-typescript#long-requests for more details
Fix
Use the streaming helper and read the final message, or move long jobs to the Message Batches API. On old TypeScript SDKs set the timeout on the client rather than per request, or upgrade to 0.117.0 or later.
fg-0002· added 2026-09-24· last checked 2026-09-24
Claude with web search narrates before its JSON, so a strict JSON parser reports nothing
Symptom
JSON.parse fails or returns an empty list
Fix
Find the first { or [ in the reply, walk forward counting bracket depth while skipping string contents and escaped characters, and parse the slice that closes at depth zero. Fail loudly if none is found.
fg-0001· added 2026-08-02· last checked 2026-08-02
Claude response is empty with stop_reason max_tokens and no error
Symptom
stop_reason: max_tokens with zero text blocks
Fix
Raise max_tokens well above the expected answer length, log stop_reason, and treat empty text or stop_reason max_tokens as a failed attempt that retries with a larger budget.
fg-0003· added 2026-07-18· last checked 2026-07-18
content[0].text is undefined when the model returns a thinking block first
Symptom
Cannot read properties of undefined
Fix
Collect every block whose type is text and join them; fail loudly when there is none. Test with the real payload, not a toy prompt.
fg-0004· added 2026-07-13· last checked 2026-07-13
Long Claude request fails with 'Premature close' on an old SDK
Symptom
Premature close
Fix
Upgrade the SDK and use streaming for long outputs, with a retry wrapper.
Have your agent check Anthropic API changes before it codes