[BUG] API Error 400: context_management: Extra inputs are not permitted
Resolved 💬 35 comments Opened Jan 29, 2026 by mehulparmariitr Closed Mar 13, 2026
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Bug Description
Claude Code fails immediately on any prompt with API Error 400.
Error Message
API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"context_management: Extra inputs are not permitted"},"request_id":"req_vrtx_011CXb3h5QVzmdZjWqPq1Qc7"}
What Should Happen?
There should be no issues while working on an old or a new session.
Error Messages/Logs
## Bug Description
Claude Code fails immediately on any prompt with API Error 400.
## Error Message
API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"context_management: Extra inputs are not permitted"},"request_id":"req_vrtx_011CXb3h5QVzmdZjWqPq1Qc7"}
Steps to Reproduce
Steps to Reproduce
- Open terminal
- Run
claude - Type any message (e.g., "hi")
- Error occurs immediately
Claude Model
Opus 4.5
Is this a regression?
No
Last Working Version
2.1.20 (Claude Code)
Claude Code Version
2.1.23 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
This was also happening in 2.1.22 (Claude Code)
35 Comments
Found 1 possible duplicate issue:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
No this should not be closed and let go. This is quite urgent!
I downgraded to
2.1.20, and it worked fine. Something broke after this version.Please do not close this reported bug, its impacting our internal platform users. We observe the same downgrade it to v2.1.20 or less fixes the issue.
We are consistently encountering "Extra inputs are not permitted" errors following Claude Code upgrades, which suggests potential backward compatibility issues.
Adding another data point here — we’re also seeing this issue in our environment after upgrading Claude Code.
The "_Extra inputs are not permitted"_ error is causing active regressions for users and blocking workflows that were previously stable. Rolling back to v2.1.20 consistently resolves the problem for us as well.
Seeing this with our LiteLLM deployment (v1.81.3) and Claude Code 2.1.22 as well with bedrock.
Edit: I'm trying out adding
drop_paramsto the litellm configuration with bedrock to see if that will stop this from happening.Edit 2: For anyone using LiteLLM, you can add this to the
litellm_params:Yes, seeing the same issue since upgrading the v2.1.22, please prioritize fixing this
v2.1.20 works, (I didn't try 2.1.21, or 2.1.22), but v2.1.23 is useless until this gets fixed.
I upgraded to
2.1.25, but still the error is thereThanks so much for reporting, and so sorry for the issues here! We just released v2.1.27, which should fix the error so long as you pass
CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1when running Claude Code. Please let me know if you run into any more errors.Still broken in 2.1.27 for Claude Max subscription users.
Error:
```
API Error: 400
{"type":"error","error":{"type":"invalid_request_error","message":"system.2.ca
che_control.ephemeral.scope: Extra inputs are not permitted"}}
```
Environment:
Tested versions:
Tried workaround:
CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1 — did NOT fix the issue for Claude
Max users, @szwang .
Bug appears to have been introduced in 2.1.25, not 2.1.22.
@robert-chis-ciure I was using Sonnet, and it was broken in 2.1.23 for me, in the same Apple environment, though.
I used brew install claude-code and exported CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1 and ran claude -r and it appears to work with the Sonnet model. Thank you @szwang
I'm so glad. @robert-chis-ciure thanks for the report! Looking into it.
Still happening on
v2.1.29for me. Opus only, not Sonnet. Any work arounds?Update:
From 2.1.27 release notes
This fixed it for me.
still happening, I'm using anthropic through portkey.
Plus it appears that vertex does not support the new
prompt-caching-scope-2026-01-05at all, leading to this errorPlease make experimental features opt-in instead of opt-out in the future :) thx for the
CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETASfix!I also have such error!
API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"context_management: Extra
inputs are not permitted"},"request_id":"req_011CXpT18aE4sFKqHkpUo8j9"}
it works fun after when i use npm install -g @anthropic-ai/claude-code@2.1.4
maybe the new version of claude-code has something different
Maabook
API Error: 400
{"type":"error","error":{"type":"invalid_request_error","message":"system.2.ca
che_control.ephemeral.scope: Extra inputs are not permitted"}}
Environment:
Claude Max subscription macOS (Apple Silicon)
Opus 4.5 model
Tested versions:
2.1.20 ✅ works
2.1.23 ✅ works
2.1.25 ❌ broken
2.1.26 ❌ broken
2.1.27 ❌ broken
2.1.28❌ broken
2.1.29 ❌ broken
2.1.30 ❌ broken
2.1.21 ❌ broken
Tried workaround: Did not work
CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1
Any update on this? It's been over a week.
I'm a Max subscriber paying $200+/month, and Claude Code has been completely unusable since v2.1.23. I've now gone through v2.1.24, 2.1.25, 2.1.27, 2.1.31, and now 2.1.32 — _every single version is broken_.
Current error on 2.1.32:
API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"system_2.cache_control.ephemeral.scope: Extra inputs are not permitted"}}
Opus 4.6 launched today, and I can't use it. To use Opus 4.5, I must downgrade to v2.1.23, which defeats the purpose of paying for access to the latest models. I'm frustrated. Less than a month ago, I migrated from Codex and was thrilled with the Claude Code experience and capabilities.
@anthropic / @claude-code-team — can we please get an official response? Even just an ETA or acknowledgment that this is being worked on?
The "just downgrade" workaround is unacceptable for paying customers who need access to flagship models (e.g., for scientific research). This is a critical regression affecting multiple users, and there's been almost radio silence for a week (thanks, @szwang , for looking into it!).
I've also filed a support ticket. Happy to provide logs, environment details, or whatever else is needed to debug this.
Update (Feb 6, 2026): I found a reliable workaround for Max/direct Anthropic users still hitting:
API Error: 400 ... system.2.cache_control.ephemeral.scope: Extra inputs are not permittedEnvironment:
2.1.32Important:
CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1did not fix this path for me.Working workaround:
Persist across terminals:
Verification after applying workaround:
claude -p "hi"returns normal output (no 400).claudesessions work.Likely cause direction:
cache_control.ephemeral.scope, which this backend path rejects.Request:
I hope this helps other users who encountered this error.
@robert-chis-ciure I'm so sorry for the lack of response on my end. It's completely unacceptable and I have set up better alerting on future tags on Github issues.
I believe we've found the cause, and will keep you posted on release status.
To confirm, are you using a gateway or proxy at all? Are you always setting
ANTHROPIC_DISABLE_EXPERIMENTAL_BETAS?Thank you so much for finding the workaround and pushing on this.
Claude Code v2.1.21+ added a
context_managementparameter that some API backends (Vertex AI, older Bedrock, LiteLLM) reject with 400. One env var disables it for direct Anthropic users; LiteLLM has adrop_paramsconfig option. Both fixes here: https://cacheoverflow.dev/blog/pgOuyFOASomething similar has popped up again in the latest version [claude-code 2.1.69]. and previous workarounds are not working!
API Error: 400 {"error":{"message":"{\"message\":\"tools.0.custom.defer_loading: Extra inputs are not permitted\"}. Received Model
Group=claude-model\nAvailable Model Group Fallbacks=None","type":"None","param":"None","code":"400"}}
@varadhvi I set
ENABLE_TOOL_SEARCH=falseto fix this one. It wasn't mentioned in the release notes, but I guess tool search was toggled to enabled by default, but not all backend providers/routers support the api schema yetThank you. Trying now. It was working fine till the [claude-code 2.1.63], we are using litellm gateway routing to bedrock as the backend.
@szwang can we have a permanent fix pls?
Came here to report the same, was working fine today until an auto-update to 2.1.69
Tried clearing the Cache files, and all the usual reloads.
Reverted to 2.1.68 and working again. Curious about the
ENABLE_TOOL_SEARCH=false; might test that if I have time.Environment
The same problem. I reverted to version 2.1.58 to resume my work.
Confirmed that exporting this in your parent session works to. I'm back to 2.1.69 and no issues.
export ENABLE_TOOL_SEARCH=0Ack, thank you for the reports. Does this work with the newest versions?
We are working on longer term solution to accomodating Bedrock, Vertex, and proxies like litellm.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.