What
Environment variables defined in an env block inside settings.json now go through a validation step before Claude Code applies them. Entries are stripped out, with a one-time warning logged per settings scope, if:
- the key isn't a valid environment-variable name
- the value isn't a string, number, or boolean
- the value contains a NUL character
Why
This catches malformed or invalid env entries in settings files early, rather than letting them silently fail or produce confusing behavior later.
Names in the bundleenv
The entry above is what we published on the day. These lines were added later, as Anthropic's own pages caught up, and they sit beside the original rather than replacing it.
Added since
A small documentation edit on Claude Code on Google Cloud's Agent Platform touched a line naming env after this was published.
Choose how you authenticate to Google Cloud: Application Default Credentials from `gcloud`, a service account key file, or credentials already in your environment. The wizard asks for your project and region, verifies which Claude models y…google-vertex-ai see the edit
Confirmed since
Anthropic's documentation has since written up env, on Claude Code changelog.
* \[VSCode] Fixed the session list keeping sessions from the default folder when `CLAUDE_CONFIG_DIR` is set in a settings file or the `environmentVariables` settingchangelog see the edit
One source agreesOne thing we can check says the same as this entry.
Anthropic's documentation agrees
Anthropic's documentation has since written up env, on Claude Code changelog.