Study FAQ
Which Claude Code settings scope wins when multiple files set the same option?
Also asked as 2
- How does Claude Code prioritize managed, CLI, local, project and user settings?
- Where should I put a shared Claude Code setting, a personal override, or mandatory organization policy?
Answer
For most conflicting scalar values in Claude Code terminal settings, the order is managed policy, --settings, local project, shared project, then user. Arrays normally merge. Check the particular setting when it controls permissions, has a dedicated CLI flag or environment variable, or supports a managed-only rule.
Put shared repository defaults in .claude/settings.json, local project preferences in .claude/settings.local.json, and settings for your work across repositories in ~/.claude/settings.json. Use --settings for a temporary session value and managed settings for enforced organizational policy. For example, a machine-specific executable location belongs in local configuration. A shared workflow default belongs in project configuration.
If an override seems ignored, check /status to see which sources loaded. Then check the setting's own rules and any managed lock. Permission arrays follow their own evaluation order, so adding an allow rule does not clear a matching deny or ask rule. Verify a settings change in a non-sensitive project before widening its rollout.
Full explanation
Claude Code Context, Settings, and Permission Architecture
Study guide · CCAR-F
Read the full explanation