Skip to content

[BUG] CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS ENV variable is not honored in claude settings #11960

Description

@STeveShary

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?

I am using claude code through Vertex AI. I ran into this problem: #11678 (comment) 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

  1. Configure claude code to work with Vertex AI (not setting the CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS flag).
  2. Fire up claude code and try any message: "Hello!"
  3. Expect to get an error API Error: 400 Error code: 400 - {'type': 'error', 'error': {'type': 'invalid_request_error'
  4. Modify the settings.json by adding the following line to the env section: "CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS": "1"
  5. Open claude in 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: #11678

Metadata

Metadata

Assignees

No one assigned

    Labels

    api:vertexIssue relates to GCP Vertexarea:corebugSomething isn't workinghas reproHas detailed reproduction stepsplatform:macosIssue specifically occurs on macOS

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions