claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[FEATURE] Warn when an env var is set in a settings file that ignores it (e.g. CLAUDE_CODE_EXPERIMENTAL_CODE_MODE in project/local settings)

Open DanCanadian opened this issue 1 week ago • 0 comments

What happens CLAUDE_CODE_EXPERIMENTAL_CODE_MODE set in the env block of project (.claude/settings.json) or local (.claude/settings.local.json) settings is silently ignored. It is only honored from the shell, user settings or a --settings file.

The settings reference documents this ("Variables Claude Code ignores in env"), but the env-vars page only says the variable doesn't count in every settings file, and nothing at runtime tells the user. We found a team installer that kept writing the flag into settings.local.json on every install, believing it enabled Code Mode.

Proposal

  • /doctor (or a one-line startup notice) lists env keys that are set in a settings file which ignores them, and names the file.
  • The env-vars entry names the files that honor the variable.

DanCanadian avatar Nov 22 '26 22:11 DanCanadian