claude-code - 💡(How to fix) Fix [BUG] Keep getting context management extra inputs are not permitted [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#51700Fetched 2026-04-22 07:55:12
View on GitHub
Comments
0
Participants
1
Timeline
5
Reactions
0
Participants
Timeline (top)
labeled ×5

Error Message

API Error: 400 {"error":{"message":"{"message":"context_management: Extra inputs are not permitted"}No fallback model group found for original
model_group=claude-sonnet-4-6. Fallbacks=[{'gpt-5.2': ['gpt-5.2-chat']}]. Received Model Group=claude-sonnet-4-6\nAvailable Model Group Fallbacks=None\nError doing the
fallback: {"message":"context_management: Extra inputs are not permitted"}","type":"None","param":"None","code":"400"}}

Code Example

API Error: 400 {"error":{"message":"{\"message\":\"context_management: Extra inputs are not permitted\"}No fallback model group found for original                        
     model_group=claude-sonnet-4-6. Fallbacks=[{'gpt-5.2': ['gpt-5.2-chat']}]. Received Model Group=claude-sonnet-4-6\nAvailable Model Group Fallbacks=None\nError doing the   
     fallback: {\"message\":\"context_management: Extra inputs are not permitted\"}","type":"None","param":"None","code":"400"}}
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

Version: v2.1.116

  • Error: 400 context management extra inputs are not permitted
  • Happens even after /clear
  • Requires ~4 attempts before succeeding

What Should Happen?

Version: v2.1.116

  • Error: 400 context management extra inputs are not permitted
  • Happens even after /clear
  • Requires ~4 attempts before succeeding

Error Messages/Logs

API Error: 400 {"error":{"message":"{\"message\":\"context_management: Extra inputs are not permitted\"}No fallback model group found for original                        
     model_group=claude-sonnet-4-6. Fallbacks=[{'gpt-5.2': ['gpt-5.2-chat']}]. Received Model Group=claude-sonnet-4-6\nAvailable Model Group Fallbacks=None\nError doing the   
     fallback: {\"message\":\"context_management: Extra inputs are not permitted\"}","type":"None","param":"None","code":"400"}}

Steps to Reproduce

Run any command with Claude, and it keeps erroring out with 400

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

No response

Claude Code Version

2.1.116

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

No response

extent analysis

TL;DR

  • The issue might be resolved by checking and handling extra inputs in the context management of the Claude Code API requests.

Guidance

  • Review the API request payload to ensure it only includes permitted inputs, as the error message suggests extra inputs are not allowed.
  • Verify that the /clear command is correctly implemented and effectively resets the context, as the issue persists even after running this command.
  • Investigate the fallback model group configuration to ensure it is correctly set up for the claude-sonnet-4-6 model, as the error message mentions a lack of fallback model groups.
  • Check the Anthropic API documentation for any recent changes to input validation or context management that might be causing this issue.

Example

  • No specific code snippet can be provided without more context, but reviewing the API request payload and fallback model group configuration is a good starting point.

Notes

  • The issue is reported as a regression, suggesting that a previous version of the Claude Code or Anthropic API worked correctly, which might indicate a change in the API or its validation rules.
  • Without knowing the last working version, it's challenging to pinpoint the exact change causing the issue.

Recommendation

  • Apply workaround: Given the information provided, applying a workaround such as checking and handling extra inputs seems more feasible than upgrading to a fixed version, as the issue's root cause is not clearly identified as a version-specific problem.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [BUG] Keep getting context management extra inputs are not permitted [1 participants]