
The Claude Code extra inputs are not permitted error means your request carried a field that the server on the other end doesn’t accept. Behind a proxy or an LLM gateway such as LiteLLM, the usual reason is that a preview field arrived without the header that switches it on. Your prompt and your project are fine.
Read the word just before the colon. If it’s context_management or defer_loading, run claude update, because newer versions resend the request without that field. If that isn’t enough, set CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1 before you start Claude Code.
That switch doesn’t cover every field. For output_config, set CLAUDE_CODE_EFFORT_LEVEL=auto. For thinking, set CLAUDE_CODE_DISABLE_THINKING=1.
Browse all our Claude Code tutorials for more fixes and how-tos.
Tested with Claude Code v2.1.330 on macOS on November 22, 2026. The requests went to a small stand-in gateway on the same computer, set to refuse one field at a time with the exact error text. LiteLLM itself wasn’t part of the test, and the gateway-side advice follows Anthropic’s official docs.
Quick Summary
| Field in your error | What we saw on v2.1.330 | Fix |
|---|---|---|
context_management | Recovered by itself on the second request | Update to v2.1.304 or later |
defer_loading | Recovered by itself on the fourth request | Update to v2.1.305 or later |
output_config.effort | Recovered by itself on the second request | Update |
output_config | Error stayed, even with betas off | CLAUDE_CODE_EFFORT_LEVEL=auto |
thinking | Error stayed, even with betas off | CLAUDE_CODE_DISABLE_THINKING=1 |
| A field you added | Error stayed, even with betas off | Remove it from CLAUDE_CODE_EXTRA_BODY |
| No field named | Depends on which field was refused | Turn experimental betas off |
What “Extra Inputs Are Not Permitted” Means
The message starts with a 400, so the server understood the connection but rejected the content. The name in front tells you which part it didn’t want. Here it is inside a session:

Why a proxy or LiteLLM triggers it
Claude Code uses some features that are still in preview. Many of them come as a pair: a value in the anthropic-beta header and a matching field in the request body. Both halves have to reach the server.
The docs name two ways this breaks. A gateway can forward the body but drop the header, or it can pass an Anthropic-style body to a service with different rules, such as Amazon Bedrock.

Claude Code can’t see past your gateway. When you set ANTHROPIC_BASE_URL, the docs say it treats the gateway as the Claude API and sends the full set of fields, wherever the request goes next.
The fix depends on the field, so read the name before you change any setting.
Is this the same as “invalid beta flag”?
It’s the other half of the same problem. There the server refuses the header value, and here it refuses the body field. If your message says “invalid beta flag,” use our Bedrock beta flag guide.
How to Fix Claude Code Extra Inputs Are Not Permitted

Step 1: Confirm that you’re going through a gateway
Type /status in a session. A line called Anthropic base URL means your requests go to that address instead of straight to Anthropic.

Is the line missing even though you set the variable? Then it didn’t reach this session. Our environment variables guide explains where to put them.
Step 2: Update Claude Code
claude update
claude --versionThe error reference gives two version numbers. Claude Code handles a refused context_management from v2.1.304, and a refused defer_loading or tool_reference from v2.1.305.

We checked that on v2.1.330. Our gateway refused context_management, and Claude Code quietly sent the request again without it. The gwlog command below is our own script that prints what the gateway received.

Tool search took longer. Claude Code tried three times before it dropped defer_loading, and then it loaded its tools upfront, so the count went from 12 to 22.

Step 3: Turn experimental betas off
export CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1
claudeThis is the docs’ fallback. It stops Claude Code from sending the preview fields at all, so there’s nothing left to refuse. To keep it on, add it to a settings file (see settings.json locations):
{
"env": {
"CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS": "1"
}
}We tried the settings file version in a project’s .claude/settings.json, and it worked the same way. Our gateway’s log showed no context_management, no defer_loading, and three beta values instead of eight.
You do give something up. MCP tool search turns off, so every MCP tool loads at the start and takes up context.
Step 4: Fix a refused output_config
This one surprised us. The switch from Step 3 leaves the effort setting in place, so an error that names output_config came straight back. Telling Claude Code to send no effort level cleared it:
export CLAUDE_CODE_EFFORT_LEVEL=auto
With auto, the API picks its own default effort for the model. A fixed level such as low didn’t help, because the field was still sent.
Wording matters too. When our gateway said output_config.effort instead of just output_config, Claude Code fixed it without any setting.
The same field can also carry a structured output format. If the message points at output_config.format, the docs offer CLAUDE_CODE_DISABLE_STRUCTURED_OUTPUTS=1 on v2.1.288 or later, which removes only that part.
Step 5: Fix a refused thinking field
The thinking field has no beta header, so turning betas off doesn’t remove it. This setting does, and the docs describe it as a compatibility option for proxies and gateways:
export CLAUDE_CODE_DISABLE_THINKING=1
We also tried MAX_THINKING_TOKENS=0 with Opus 5.5, and the error stayed. The docs explain why: thinking can’t be turned off on that model this way.
Step 6: Remove a field you added yourself
CLAUDE_CODE_EXTRA_BODY merges your own JSON into each request. It’s handy for provider settings, but a strict server refuses any name it doesn’t know. The betas switch leaves your own fields alone.

When the Gateway Hides the Real Error
Claude Code decides how to recover by reading the error text. The docs warn that a gateway that wraps errors in its own words breaks that recovery, even if the status code is still 400.

We refused context_management again, but this time with the text “Request rejected by gateway policy.” Claude Code tried six times with different changes, kept sending the refused field, and gave up.

So if your 400 shows vague wording, ask for the original message from the gateway’s logs. Our error 400 guide covers the other causes of that code.
What to Change on LiteLLM or Your Gateway
Anthropic’s docs name LiteLLM as one example of an Anthropic-compatible gateway, but they say Anthropic doesn’t endorse, maintain or audit third-party products. Use your gateway’s own manual for the setting names. These are the goals to aim for:
- Forward the
anthropic-betaandanthropic-versionheaders exactly as they arrive. - Don’t keep an allowlist of beta values, because the set changes with Claude Code releases.
- Pass request body fields through without removing or rewriting any, when the upstream is Anthropic-format.
- Return upstream error bodies unchanged.
- Keep the gateway itself updated. The docs point out that a gateway which falls behind breaks newer features.
If your gateway sends requests to Bedrock or Google Cloud
Here the two sides speak different formats, and the docs say bridging them is the gateway’s job. If your gateway also offers the provider’s own format, you can skip that problem. This is the Bedrock version from the docs:
unset ANTHROPIC_BASE_URL
export ANTHROPIC_BEDROCK_BASE_URL=https://llm-gateway.example.com/bedrock
export CLAUDE_CODE_SKIP_BEDROCK_AUTH=1
export CLAUDE_CODE_USE_BEDROCK=1On that route, Claude Code sends only the fields Bedrock accepts. Google Cloud’s Agent Platform has matching settings, ANTHROPIC_VERTEX_BASE_URL and CLAUDE_CODE_USE_VERTEX=1. The gateway connection docs list each block in full.
If you use a custom model name
Gateways often rename models. With a name Claude Code doesn’t recognize, the docs say it sends everything current Claude models accept, which an older model behind that name may refuse.
We set the model to my-claude-alias and saw the thinking, effort and context_management fields all go out. The docs suggest a modelOverrides entry that ties the alias to the real model. If the name itself is refused, see the selected model error.
What the Betas Switch Leaves In
It helps to know what CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1 doesn’t touch, so you don’t wait on it for the wrong field.

| Removed by the switch | Stays in the request |
|---|---|
context_management | output_config.effort |
Tool fields such as strict and defer_loading | thinking |
output_config.format and output_config.task_budget | System messages inside the conversation |
| MCP tool search | Anything from ANTHROPIC_BETAS or CLAUDE_CODE_EXTRA_BODY |
Try It Yourself
First, list the variables that shape your requests. This prints names only, so no keys show up:
env | grep -E '^(ANTHROPIC|CLAUDE_CODE|MAX_THINKING)' | cut -d= -f1 | sortNext, try these three commands one at a time. Each setting applies to that single run, so nothing is saved:
claude -p "Reply with the word ready."
CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1 claude -p "Reply with the word ready."
CLAUDE_CODE_EFFORT_LEVEL=auto claude -p "Reply with the word ready."The first one that answers tells you which group the refused field belongs to. If none of them does, try CLAUDE_CODE_DISABLE_THINKING=1 the same way. The commands use Mac and Linux syntax.
Common Mistakes
- Letting a gateway strip headers it doesn’t know. The body field then arrives alone and gets refused.
- Expecting the betas switch to fix
output_configorthinking. - Setting a variable in one terminal while Claude Code is already running in another.
- Reinstalling Claude Code or signing in again. The error is about the request, so neither one changes it.
- Leaving an old
CLAUDE_CODE_EXTRA_BODYvalue in a settings file after a test.
Pro Tips
- Send your gateway team the gateway compatibility guide. It lists what to forward and what breaks when a piece goes missing.
- Copy the whole error line before you ask for help. The field name is the most useful part.
- Remove your workaround after a gateway update and test again, so you get tool search and effort levels back.
- If requests don’t reach the gateway at all, start with corporate proxy setup instead.
Cheat Sheet

Frequently Asked Questions
Is this error a bug in Claude Code?
Usually it’s a mismatch between what Claude Code sends and what your gateway or its upstream accepts. Newer versions recover from several of these on their own, so updating is still the best first step.
Can I see this error without a proxy or gateway?
It has happened. The docs say that before v2.1.302 the error could name diagnostics when an open session moved from the Anthropic API to Bedrock or Google Cloud without a restart. Update, or run /clear on those older versions.
Why does it say tools.10.custom.defer_loading?
The number is the tool’s position in the request, and defer_loading is the refused field. It belongs to tool search, so update Claude Code or set ENABLE_TOOL_SEARCH=false. With that setting, our gateway received no defer_loading field at all.
Does turning off experimental betas make Claude worse?
The model stays the same. You lose preview features such as context management and MCP tool search, so long sessions with many MCP tools will use more context.
Do I need to restart Claude Code after changing these settings?
Yes. Set the variable first, then start Claude Code from that same terminal. For other messages, check our list of common errors.
Conclusion
The Claude Code extra inputs are not permitted error is a message about one field, and the field’s name picks the fix. Update first, then use CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1 for preview fields, CLAUDE_CODE_EFFORT_LEVEL=auto for output_config, and CLAUDE_CODE_DISABLE_THINKING=1 for thinking. The lasting cure is a gateway that forwards headers, fields and error messages unchanged, and our overview of Claude AI is a good next read if you’re choosing which models to put behind it.


