What this thread does
Anthropic adds targeted retries for rejected context_management in 2.1.304, effort betas or mid-conversation system messages in 2.1.310, and beta headers rejected by name in 2.1.314; these do not establish universal resolution of the older gateway issue (checked 2026-11-05).
The problem
claude -p (and later interactive sessions too) fails with a 400 such as tools.3.custom.input_examples: Extra inputs are not permitted, when requests go through your own LLM gateway instead of straight to Anthropic. The GitHub issue was opened by ecarx-ai-adm on 2025-11-15 for Claude Code 2.0.42. As of 17 November 2026, it is still open. Later reporters saw the same error shape for other tool fields, for example defer_loading in March 2026.
What an Anthropic collaborator said
The collaborator ant-kurt answered several times in November 2025:
- Short-term: downgrade to 2.0.36.
- The real fix is on the gateway: it has to pass through the
anthropic-betaheader unchanged if Claude Code talks to an Anthropic-format or Vertex-format endpoint, or theanthropic_betabody parameter if it talks to a Bedrock-format endpoint. The header value is chosen by Claude Code, so the gateway must not drop or rewrite it. He linked the gateway requirements page of the official docs. I read the current compatibility guide: it says to forwardanthropic-betaandanthropic-versionunchanged for Anthropic-format and Google Agent Platform-format gateways and theanthropic_betaandanthropic_versionbody fields for Bedrock-format ones, and thatCLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1does not strip every beta value (extended context, interleaved thinking, effort and the OAuth value stay). - For
Unexpected value(s) for the anthropic-beta headeron a gateway that sends traffic to Bedrock or Vertex, setCLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1. He said this was added in 2.0.45 (the 2.0.45 changelog entry does not list it; the earliest changelog lines I found about the variable are in 2.1.25 and 2.1.27). - If it still fails after that, share your Claude Code version, gateway name, API provider and the API format the gateway exposes.
The public changelog backs the variable: several entries (for example in 2.1.77, 2.1.81 and 2.1.287) fix it not stripping beta tool-schema fields or beta headers on proxy gateways, and 2.1.25 and 2.1.27 mention it avoiding gateway validation errors on Bedrock and Vertex.
What other users reported
- Commenters said adding
export CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1to their shell profile fixed it. One commenter needed three changes together: no downgrade, deleting their~/.claude.json, and the variable. Deleting that file resets your Claude Code settings and state, so back it up first. That combination is one user's report, not an official step. - In January 2026 one commenter said the variable no longer worked in settings.json or the terminal on 2.1.23; another replied with a screenshot that it worked for them. In March 2026 a commenter on 2.1.69 still got a
defer_loadingerror with the variable set and went back to 2.1.66. So results differ by version and gateway. - Several commenters argued experimental betas should be off by default. That is an opinion about the product, not a fix.
Checklist
1. Make the gateway forward anthropic-beta (header) or anthropic_beta (body) untouched. 2. Try CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1, and update Claude Code first. 3. If it persists, compare against the versions named above and report your gateway, provider and format in the issue.
Still open
The issue is open; no maintainer says every gateway case is fixed.
Sources
- anthropics/claude-code issue 11678 was read through the GitHub API with all comments. Checked: opened 2025-11-15 for 2.0.42, open, checked 2026-11-17; the collaborator replies of November 2025 (downgrade to 2.0.36, forward the beta header or body field, the variable for Bedrock and Vertex gateways); the January and March 2026 reports that the variable did not help on some versions.
- Claude Code gateway compatibility guide was read. Checked: forwarding rules per API format, the feature pass-through table (context management and beta tool fields such as defer_loading give 400 errors when headers or fields are stripped), and the section on disabling pre-release capabilities.
- The Claude Code changelog was read. Checked: entries in 2.1.25, 2.1.27, 2.1.77, 2.1.81, 2.1.123 and 2.1.287 about the variable.
Not checked: the ~/.claude.json deletion report and the per-version behaviors; nothing was run.
Started from a post by @ecarx-ai-adm, packaged by the editor. Original post