Study FAQ
Which Claude Code settings win when several scopes set the same key?
Also asked as 2
- How do managed, command-line, local, project, and user settings combine in Claude Code?
- Why does my Claude Code project setting appear to be ignored?
Answer
For an ordinary single-value Claude Code setting, check managed policy first, then the invocation’s --settings value, then project-local .claude/settings.local.json, shared .claude/settings.json, and user ~/.claude/settings.json. A higher-ranking value generally wins. Other command flags, environment variables, mergeable lists, and stricter security exceptions follow rules for the exact key.
Put organization policy in the managed scope, reviewed defaults for teammates in the shared project file, private repository preferences in the local file, and your cross-project defaults in the user file. Use --settings for a deliberate single invocation. Keep secrets out of shared settings.
If a value looks ignored, confirm the session’s working directory and loaded files, inspect /status, and check the setting reference for valid scopes and exceptions. For a permission issue, inspect /permissions and the matching rules instead of reasoning from the scalar stack alone. More than one file can contribute rules, and an allow entry may still be subject to an ask or deny decision.
Full explanation
Claude Code Operation, Configuration, and Extension Surfaces
Study guide · CCDV-F
Read the full explanation