You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] Environment Variables No Longer Override settings.json in v2.0.1 #8500
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?
After updating to Claude Code v2.0.1 from 1.x, environment variables declared inline with the claude command are no longer overriding the configuration values set in ~/.claude/settings.json. This is a regression from v1.x behavior where environment variables had proper precedence.
What Should Happen?
When running:
ANTHROPIC_BASE_URL=http://localhost:8080 claude
The ANTHROPIC_BASE_URL should be set to http://localhost:8080 for that specific invocation, overriding any value in ~/.claude/settings.json.
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.
Activity
[-][BUG][/-][+][BUG] Environment Variables No Longer Override settings.json in v2.0.1[/+]github-actions commentedon Sep 30, 2025
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
gardner commentedon Oct 6, 2025
This is still an issue.
kierr commentedon Oct 27, 2025
This is driving me insane
CLAUDE_CODE_DONT_INHERIT_ENValready existed as an undocumented env var, but changing that doesn't help either.The best solution for now is to use
claude --settings ~/.claude/settings.alt.jsonbut it's hardly as flexible as env vars being respected.Using a settings file without env set, and trying to add inline ENV, doesn't work. Nor does --setting-sources scoping.
Using --settings with json does not override the settings file either.
I suspect this was done in some effort to avoid the ability of overriding enterprise (forced) settings.
github-actions commentedon Dec 8, 2025
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
github-actions commentedon Jan 10, 2026
This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.
github-actions commentedon Jan 18, 2026
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.