3.1 — The five configuration scopes
Claude Code doesn't read a single config file. It merges up to five layers, each with a different priority level. Understanding this hierarchy lets you predict exactly which setting will be active in any situation.
Priority hierarchy (highest to lowest)
| Priority | Scope | File / Source | Shared? |
|---|---|---|---|
| 1 | Managed | managed-settings.json or managed-settings.d/ |
Enterprise (MDM) |
| 2 | CLI | Flags --model, --permission-mode, etc. |
Session only |
| 3 | Local | .claude/settings.local.json (project root) |
No (gitignored) |
| 4 | Project | .claude/settings.json (project root) |
Yes (git-tracked) |
| 5 | User | ~/.claude/settings.json |
No (global personal) |
Merge rule
Scalar values (strings, booleans) are overwritten by the highest-priority scope. Arrays merge across scopes. Concretely, if the Project scope defines permissions.allow: ["Edit(*.kt)"] and the User scope defines permissions.allow: ["Bash(git status)"], the final result contains both entries.
# Check the final merge result at any time
/status
Key takeaways
• 5 scopes: Managed > CLI > Local > Project > User
• Scalars overwrite, arrays merge
• .claude/settings.json = team, .claude/settings.local.json = personal
• /status to inspect the effective configuration