Error reference changederrors
Nearest release: v2.1.306, published an hour after upstream edited the page. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
Upstream edited this page at 21 Oct 2026 00:36 UTC, give or take a minute or two: the time comes from Anthropic’s own sitemap rather than from a commit. This site recorded the change at 21 Oct 2026 00:37 UTC.
Upstream edited
Recorded here
Lines+15added
Lines−11removed
From line
2,318
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits187to this page, all time
The whole hunk
from line 2318, old and new numbered
/
This page is larger than the 256 KiB this site keeps, so one side of the diff below stops where the stored text does.
from line 2318
23182318
23192319### Extra inputs are not permitted
23202320
2321A proxy or LLM gateway between Claude Code and the API stripped the `anthropic-beta` request header, so the API rejected fields that depend on it.
2321The endpoint that received the request rejected one of the request's fields as an input it doesn't accept, and the endpoint's message names that field.
23222322
23232323```text theme={null}
2324API Error: 400 ... Extra inputs are not permitted ... context_management
2324API Error: 400 ... context_management: Extra inputs are not permitted
23252325```
23262326
2327Claude Code sends beta-only fields such as `context_management` alongside an `anthropic-beta` header that enables them. When a gateway forwards the body but drops the header, the API sees fields it doesn't recognize.
2327Claude Code sends beta-only fields such as `context_management` and tool search's `defer_loading` alongside an `anthropic-beta` header that enables them. When a gateway forwards the body but drops the header, the API sees fields it doesn't recognize. When a gateway forwards an Anthropic-format body to an upstream with a different schema, that upstream rejects such fields. [Beta header and body field pairs](/docs/en/llm-gateway-protocol#beta-header-and-body-field-pairs) covers both cases.
23282328
23292329**What to do:**
23302330
2331* Configure your gateway to forward the `anthropic-beta` header. See [feature pass-through](/docs/en/llm-gateway-protocol#feature-pass-through) for what gateways must forward.
2331* If the message contains `context_management: Extra inputs are not permitted`, [update Claude Code](/docs/en/setup#update-claude-code) to v2.1.304 or later. After you update, Claude Code answers this rejection by sending the request once more without the field. Before v2.1.304, Claude Code didn't retry this rejection.
2332* If the message names `defer_loading` or `tool_reference`, update Claude Code or turn [tool search](/docs/en/mcp#tool-search-through-a-gateway) off:
2333 * [Update Claude Code](/docs/en/setup#update-claude-code) to v2.1.305 or later. Claude Code then answers this rejection by sending the request once more without tool search fields.
2334 * If you can't update, or the message still appears after you do, set `ENABLE_TOOL_SEARCH=false` in your shell or your [settings `env`](/docs/en/settings-reference#env). If a settings file already sets the variable, change it there, since that value [can override a shell export](/docs/en/settings-reference#how-env-values-interact-with-your-shell). Claude Code then loads MCP tools upfront.
2335* If your gateway drops the header, configure it to forward the `anthropic-beta` header. See [feature pass-through](/docs/en/llm-gateway-protocol#feature-pass-through) for what gateways must forward.
23322336* As a fallback, set [`CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1`](/docs/en/env-vars) before launching. [Disable pre-release capabilities](/docs/en/llm-gateway-protocol#disable-pre-release-capabilities) covers the exact scope.
23332337
23342338Before v2.1.302, this error could also name the field `diagnostics` with no gateway involved. It appeared when a session that had already used the Anthropic API moved to Amazon Bedrock or Google Cloud's Agent Platform without a restart. For example, a session you left open moves to Bedrock when you run [`/setup-bedrock`](/docs/en/commands) in another Claude Code window. On those versions, run `/clear` in that session or restart it.
from line 2659
26552659
26562660### Thinking budget exceeds output limit
26572661
2658The configured extended thinking budget exceeds the maximum response length, so there is no room left for the actual answer.
2659
2660```text theme={null}
2661API Error: 400 ... max_tokens must be greater than thinking.budget_tokens
2662```
2663
2664**What to do:**
2665
2666* Raise [`CLAUDE_CODE_MAX_OUTPUT_TOKENS`](/docs/en/env-vars) above the thinking budget
2667* See [Extended thinking](/docs/en/model-config#extended-thinking) for how the budget interacts with output length
2668
2669### Response exceeded the output token maximum
2670
2671Claude's reply reached the largest number of output tokens the request allowed and was cut off there:
2672
2673```text theme={null}
2674API Error: Claude's response exceeded the ... output token maximum. To configure this behavior, set the CLAUDE_CODE_MAX_OUTPUT_TOKENS environment variable.
2675API Error: Claude's response exceeded the 64000 output token maximum for a request sent without streaming. The CLAUDE_CODE_MAX_OUTPUT_TOKENS environment variable cannot raise this limit.
2676```
2677
2678The form that names `a request sent without streaming` means a streaming request failed and Claude Code re-sent it without streaming, which limits the reply to 64,000 output tokens. Before v2.1.299, a reply cut off on such a re-sent request ended the turn without this message, as if the reply were complete.
2679
2680**What to do:**
2681
2682* If Claude wrote some text before the reply was cut off, reply `continue` in an interactive session to ask for the rest. That tex
2662The configured extended thinking budget exceeds the maximum response leng
No line in this hunk matches that.