[BUG] CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS ENV variable is not honored in claude settings
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?
I am using claude code through Vertex AI. I ran into this problem: https://github.com/anthropics/claude-code/issues/11678#issuecomment-3548913485 and found the solution to my issue by setting the environment variable CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS to 1 and everything works as expected. (specifically, in my command line, I run export CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1)
When I add the following env property in my settings.json file:
{
"env": {
"CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS": "1"
}
}
this has no effect unless I set the value in the command line environment. I have specifically tested this by unsetting the environment variable and opened new terminal windows.
What Should Happen?
When settings the value in the settings.json file, I would expect it to have the same effect as changing in the command line environment.
Error Messages/Logs
API Error: 400 Error code: 400 - {'type': 'error', 'error': {'type': 'invalid_request_error', 'message': 'Unexpected value(s) `tool-examples-2025-10-29` for the `anthropic-beta` header. Please
consult our documentation at docs.anthropic.com or try again without the header.'}, 'request_id': '[...]'}
Steps to Reproduce
- Configure claude code to work with Vertex AI (not setting the
CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETASflag). - Fire up claude code and try any message: "Hello!"
- Expect to get an error
API Error: 400 Error code: 400 - {'type': 'error', 'error': {'type': 'invalid_request_error' - Modify the
settings.jsonby adding the following line to theenvsection:"CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS": "1" - Open
claudein the cli and try "Hello!" again.
Expected: Error will be resolved as documented.
Actual: 400 error code response persists.
Claude Model
Sonnet (default)
Is this a regression?
Yes, this worked in a previous version
Last Working Version
2.0.36
Claude Code Version
2.0.46
Platform
Google Vertex AI
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
This is related to this: https://github.com/anthropics/claude-code/issues/11678
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗