What you will be able to do
- Pick the right settings scope (user, shared project, project local or managed) for a team configuration key
- Choose a managed-settings delivery mechanism (server-managed, MDM/OS policy, file-based) that fits how a fleet is run, and know when each one is read
- Predict which managed source applies when several are present, and confirm it with /status
Key concept
Managed settings tier — The organization deploys managed settings, and they sit above every setting a developer controls. That makes them the only scope where team security and compliance policy is actually enforced, not just suggested.
1.Four settings scopes, and the one a team shares
Claude Code reads its configuration from several scopes at the same time. Most of the work of setting it up for a team is deciding which scope each key goes in. The settings documentation describes four. User settings in ~/.claude/settings.json follow one developer into every project on their machine. Shared project settings in .claude/settings.json apply to everyone working in that folder, and this is where team permissions, hooks, plugins and the project's environment variables belong. Project local settings in .claude/settings.local.json hold one developer's overrides for one project. Managed settings come from the organization, and developers don't create or edit them.
| Scope | File | Who it affects | Use it for |
|---|---|---|---|
| User | ~/.claude/settings.json | You, in every project on this machine | Personal preferences: theme, editor mode, default model, your own permission rules |
| Shared project | .claude/settings.json | Everyone working in the folder; commit it so teammates get it | Team permissions, hooks, plugins, and the environment variables the project needs |
| Project local | .claude/settings.local.json | You, in this one project only | Personal overrides for one project, and testing before you share |
| Managed | managed-settings.json and other managed sources | Everyone your organization deploys it to | Security policy and compliance requirements |
The shared project file only becomes team configuration once you commit it. Until then it's an ordinary file on one disk, and neither teammates' clones nor cloud sessions see it. The local file works the other way round. The first time Claude Code writes it inside a git repository, it adds **/.claude/settings.local.json to your global git excludes so it stays out of commits. If you create the file by hand, you have to gitignore it yourself. Claude Code also writes to this file without being asked: choosing "Yes, and don't ask again" on a Bash prompt saves an allow rule there.
When the same key is set in more than one place, precedence runs from managed settings, then command-line arguments, then project local, then shared project, then user. JSON passed with --settings sits above the user, project and local files and below managed settings, and a key passed that way can't override the same managed key.
Checkpoint 1 of 4· Check yourself
A team lead wants every engineer who clones the repository to get the same Bash allow rules and the same hook. Where should this configuration go?
The shared project file is the scope for team permissions and hooks, and it reaches teammates once it is committed. The local file is personal and kept out of git, and user settings exist only on one machine.
“Team permissions, hooks, plugins, and the environment variables the project needs”Source: code.claude.com
Sources1
2.Delivering managed policy to every machine
Managed policy can reach developers in four ways. Server-managed settings are set in the claude.ai admin console, or on a self-hosted Claude apps gateway. They give a claude.ai organization one place to change policy without touching individual machines. MDM or OS-level policy is a macOS configuration profile in the com.anthropic.claudecode domain, or a Windows registry value named Settings under HKLM\SOFTWARE\Policies\ClaudeCode, pushed through Jamf, Intune, Group Policy or a similar tool. File-based policy is a managed-settings.json file, an optional managed-settings.d/ directory, and managed-mcp.json, all in a system directory. It suits machines without MDM, Linux hosts, and images you build yourself. HKCU registry is the fallback when you can't write the machine-level HKLM key. Because developers can write to it, it is not an admin source.
| Mechanism | How you deliver it | When Claude Code reads it |
|---|---|---|
| Server-managed settings | claude.ai admin console, or a self-hosted Claude apps gateway | Fetched at startup and polled hourly |
| MDM or OS-level policy | macOS configuration profile or Windows HKLM registry value | Read at startup and checked for changes every 30 minutes |
| File-based | managed-settings.json in a system directory on each machine | Read at startup and reloaded when a file changes |
| HKCU registry, Windows and WSL | Windows HKCU registry value | Every 30 minutes, used only when no admin document is present above it |
{
"permissions": {
"deny": [
"Read(./.env)",
"Read(./secrets/**)"
],
"disableBypassPermissionsMode": "disable"
},
"allowManagedPermissionRulesOnly": true
}The file goes in /Library/Application Support/ClaudeCode/ on macOS, /etc/claude-code/ on Linux and WSL, and C:\Program Files\ClaudeCode\ on Windows. Claude Code no longer reads the legacy C:\ProgramData path.
Coverage depends on where a session runs. On a developer's machine, the terminal, the VS Code and JetBrains extensions, the desktop app's Code tab and Agent SDK sessions all read these sources. The SDK loads managed settings even when settingSources leaves out the user, project and local files. A session in an Anthropic-hosted environment has no device to read, so its policy has to come from server-managed settings. Server-managed settings have a limit of their own: Claude Code fetches them only when the session authenticates to Anthropic's API directly. On other providers, or when ANTHROPIC_BASE_URL points somewhere else, it moves straight to the next source. Teams on a third-party cloud therefore need MDM or file-based delivery.
Most changes reach a session that is already running, on the schedule shown in the table, with no restart. One exception: a server-managed change to a setting that needs approval, such as a hook or an env variable, waits until the developer accepts a dialog in an interactive session.
Checkpoint 2 of 4· Match them up
Match each delivery mechanism to when Claude Code picks up a change
Tap a term, then the definition that fits it.
Each mechanism has its own refresh behaviour. Only the file-based source reloads as soon as the file changes. The others poll on a schedule.
“Read at startup and reloaded when a file changes”Source: code.claude.com
Sources2
3.When several managed sources exist: first-wins, merge and /status
Managed sources are ranked. Remote settings (server-managed or from a gateway) come first, then MDM/OS-level policy, then the managed settings files, and the HKCU registry comes last. The managedSourcesBehavior key controls what happens when more than one is present. Under the default, "first-wins", Claude Code applies the highest-ranked source that delivers at least one policy key and skips the rest, without any warning. Under "merge" (Claude Code v2.1.242 or later), it applies every admin source: on most keys the higher-ranked value wins, lists are unioned, and locks take the strictest value.
The file tier always combines its own pieces. managed-settings.d/*.json and managed-settings.json merge together: for a single value, the later file replaces the earlier one; lists such as permissions.deny combine with duplicates removed; and nested blocks such as env merge key by key.
A few keys are read from every admin source, even under first-wins. A true for allowManagedMcpServersOnly in any admin source turns the MCP allowlist lock on. Entries in deniedMcpServers apply from any source. For maxEffortLevel, the lowest cap in any admin source applies. The env block merges per variable across admin sources.
To confirm which source actually took effect, run /status. It names the source Claude Code used and the ones it skipped. That matters because a skipped source produces no warning anywhere else.
Checkpoint 3 of 4· Check yourself
A Windows fleet has an HKLM registry policy and a C:\Program Files\ClaudeCode\managed-settings.json, each with different permissions.deny rules. Nobody set managedSourcesBehavior, and developers report that the file's deny rules have no effect. What is the most likely explanation, and how do you confirm it?
MDM/OS policy outranks the managed file, and under the default first-wins behaviour the lower source is ignored without a warning. /status shows which source was used and which were skipped.
“Claude Code shows no warning for the sources it skips; /status names the source it used and the ones it skipped.”Source: code.claude.com
Checkpoint 4 of 4· Exam question
A platform team wants every engineer's Claude Code session to inherit a shared set of Bash allow rules and MCP server configuration that the team maintains and reviews through normal code review, while still letting each engineer add personal overrides that never leave their own machine. Where should the team place the shared rules, and where should individual overrides go?
Correct answer: A — Commit the shared rules to .claude/settings.json in the project, and let engineers add personal overrides in .claude/settings.local.json
- A. Correct. Project settings at .claude/settings.json are git-committed and shared with the team, going through code review, while .claude/settings.local.json is gitignored and machine-specific, exactly matching the two requirements.
- B. Incorrect. User settings at ~/.claude/settings.json apply only to the individual who owns that home directory and are never shared through version control, so they cannot serve as the team's reviewed, shared configuration.
- C. Incorrect. Managed settings are for organization-wide policy that cannot be overridden and are deployed via IT/MDM tooling, not through the team's normal project code review workflow described in the scenario.
- D. Incorrect. .mcp.json only covers MCP server definitions, not Bash permission rules, and ~/.claude.json is a per-user file that does not track with individual projects the way settings.local.json does.
Sources2
Exam traps
Each one states something that sounds right. Open it to see what is actually true.
1.Putting .claude/settings.json in the project folder shares it with the whole team.Why is that wrong?
The shared project file reaches teammates and cloud sessions only after it is committed to version control. Until then it exists on one disk only.
2.A managed-settings.json or MDM profile on every laptop also governs the developers' cloud sessions.Why is that wrong?
Anthropic-hosted sessions have no device to read. Their policy has to come from server-managed settings.
Covered in Delivering managed policy to every machine
3.When an organization delivers policy through several managed sources, Claude Code merges them all by default.Why is that wrong?
The default is first-wins: only the highest-ranked source with a policy key applies, apart from a short list of keys read from every admin source. Merging requires setting managedSourcesBehavior to "merge".
Covered in When several managed sources exist: first-wins, merge and /status
Sources
Every claim above is drawn from one of these pages, quoted as it was written on the date shown.
- 1.https://code.claude.com/docs/en/settingsOfficial docs
“Personal overrides for one project, and testing before you share”
↩︎ Four settings scopes, and the one a team shares“Nothing you set overrides them”
↩︎ Four settings scopes, and the one a team shares“Everyone your organization deploys it to; nothing you set overrides it, apart from a few security-sensitive exceptions”
↩︎ Key concept“It reaches your teammate’s clone and the cloud session only if you commit the file to version control”
↩︎ Exam trap 1“Team permissions, hooks, plugins, and the environment variables the project needs”
↩︎ Checkpoint“Only server-managed settings reach the cloud session”
↩︎ Prediction - 2.https://code.claude.com/docs/en/managed-settingsOfficial docs
“Agent SDK sessions load managed settings even when settingSources excludes the user, project, and local files.”
↩︎ Delivering managed policy to every machine“Fetched at startup and polled hourly”
↩︎ Delivering managed policy to every machine“Lists, such as permissions.deny or sandbox.network.allowedDomains: the two lists combine, with duplicates removed”
↩︎ When several managed sources exist: first-wins, merge and /status“maxEffortLevel, where the lowest cap in any admin source applies”
↩︎ When several managed sources exist: first-wins, merge and /status“policy for it has to come from server-managed settings”
↩︎ Exam trap 2“Claude Code uses the highest-ranked source that delivers at least one policy key and ignores the rest rather than merging them”
↩︎ Exam trap 3“Read at startup and reloaded when a file changes”
↩︎ Checkpoint“Claude Code uses the highest-ranked source that delivers at least one policy key and ignores the rest rather than merging them”
↩︎ Prediction“Claude Code shows no warning for the sources it skips; /status names the source it used and the ones it skipped.”
↩︎ Checkpoint