# Which Claude Code settings win when several scopes set the same key?

Exam: CCDV-F — Claude Certified Developer - Foundations
Knowledge domain: Claude Code
Updated: 2026-11-25T08:30:01.239607+00:00
HTML: https://learningpathx.com/faq/CCDV-F/ccdvf-claude-code-settings-precedence.html

## Also asked as

- 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?

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.

* [Claude Code settings files and precedence](https://code.claude.com/docs/en/settings)
* [Permission rules and scope](https://code.claude.com/docs/en/permissions)

Source: [Claude Code Operation, Configuration, and Extension Surfaces](https://learningpathx.com/news/claude-code-operation-configuration-and-extension-surfaces.html)
