OmniscioSettings examplesAn enterprise policy
Claude Code settings.json example: an enterprise policy
Managed settings are the top scope of the settings stack: every other file is read first, and loses. This is a complete policy file for an organization, every key explained, where it is read from on each operating system, how a developer proves it arrived, and the keys administrators expect to be guarantees and are not.
Checked against Anthropic’s Claude Code 2.1.332. By the Omniscio team. Updated .
Who this file is for
This is for the administrator who has to answer three questions: who can sign in, which models are allowed, and what leaves the machine. Every key below is one of those answers, and it survives a developer’s own settings file, a flag on the command line and a --settings blob, apart from the thirteen keys listed further down where a stricter value from anywhere still applies.
If you are a developer rather than an administrator, this file is not yours to write: what you can still change, and how to see what policy applies, is the managed settings guide. The team’s committed project file is the one above your user file and below this one.
The file
Deploy this as managed-settings.json in /Library/Application Support/ClaudeCode/ on macOS or /etc/claude-code/ on Linux and WSL, or hand the same JSON to MDM or the claude.ai admin console. Replace every placeholder, the organization UUID, the MCP serverUrl and the marketplace repo, with your own, and delete the keys you do not want. It is strict JSON: no comments, no trailing commas, and until the file parses there is no policy.
{
"$schema": "https://json.schemastore.org/claude-code-settings.json",
"forceLoginMethod": "claudeai",
"forceLoginOrgUUID": [
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
],
"availableModels": [
"opus",
"sonnet"
],
"enforceAvailableModels": true,
"permissions": {
"deny": [
"Bash(curl *)",
"Read(./.env)",
"Read(./secrets/**)"
],
"disableBypassPermissionsMode": "disable"
},
"allowManagedPermissionRulesOnly": true,
"allowedMcpServers": [
{
"serverUrl": "https://mcp.internal.example.com/*"
}
],
"allowManagedMcpServersOnly": true,
"strictKnownMarketplaces": [
{
"source": "github",
"repo": "your-org/approved-plugins"
}
],
"sandbox": {
"enabled": true,
"failIfUnavailable": true,
"allowUnsandboxedCommands": false,
"network": {
"allowedDomains": [
"registry.npmjs.org",
"github.com"
],
"allowManagedDomainsOnly": true
}
},
"requiredMinimumVersion": "2.1.175",
"cleanupPeriodDays": 7,
"companyAnnouncements": [
"Review the engineering policy at docs.example.com before your first session."
]
}What every key does
| Key | What it does here |
|---|---|
forceLoginMethod | Restricts sign-in to claude.ai and blocks an ANTHROPIC_API_KEY, ANTHROPIC_AUTH_TOKEN or apiKeyHelper credential at startup; a developer already signed in to Console keeps that session, and the terminal’s /login screen only pre-selects the method |
forceLoginOrgUUID | Requires claude.ai logins to belong to the listed organization. A Console sign-in is not checked for its organization, and a file that is not a managed source does not get the check at all, so the value only enforces from a managed source |
availableModels | Limits the picker, /model, --model and a developer’s own model key to the aliases listed |
enforceAvailableModels | Makes the Default option obey that list too, which the prefix matching alone does not do. It needs Claude Code 2.1.175 or later |
permissions.deny | Blocks a command whose command line starts with curl; a script or another program that runs curl itself is not caught, which is what the sandbox is for. Also blocks and reads of .env and secrets/, on every machine. Deny rules apply in every permission mode, bypassPermissions included |
permissions.disableBypassPermissionsMode | Removes the bypass mode: --dangerously-skip-permissions is rejected and a subagent’s bypassPermissions frontmatter is ignored. The value is the string "disable" |
allowManagedPermissionRulesOnly | Makes this file the only source of permission rules: allow, ask and deny rules from user, project, local and --settings are ignored, and the always-allow choices are hidden from prompts |
allowedMcpServers | Allows only MCP servers matching the entries. Each entry carries exactly one of serverName, serverCommand or serverUrl; this one matches by URL, because a user can name any server what they like |
allowManagedMcpServersOnly | Makes this allowlist the only one that applies, instead of merging with lists from other files |
strictKnownMarketplaces | Lets plugins come only from the marketplaces listed. An empty array blocks every marketplace source, the official Anthropic one included |
sandbox.enabled | Runs Claude’s Bash commands inside the OS sandbox |
sandbox.failIfUnavailable | Makes Claude Code exit at startup when the sandbox cannot start, instead of running commands unsandboxed. An Anthropic-hosted session can still start, with a warning, and does not enforce the sandbox’s filesystem or network rules |
sandbox.allowUnsandboxedCommands | Set to false, it removes the retry outside the sandbox, so what the sandbox blocks stays blocked. Anthropic calls that state strict sandbox mode |
sandbox.network.allowedDomains | Hosts sandboxed commands may reach without a prompt; with allowManagedDomainsOnly set, any other host is blocked |
sandbox.network.allowManagedDomainsOnly | Locks that allowlist to this file, so a developer cannot widen it, and blocks a host outside it without prompting |
requiredMinimumVersion | Refuses to start on an older Claude Code than the version given. 2.1.175 here is the highest floor any key in this file needs, because enforceAvailableModels arrived in that release; a lower floor would let a machine through that silently ignores the model lock |
cleanupPeriodDays | Shortens local retention of session transcripts and other session data to seven days |
companyAnnouncements | Shows your own line at startup. It is a message, not a control |
Where each operating system reads it
| Platform | Path |
|---|---|
| macOS | /Library/Application Support/ClaudeCode/managed-settings.json |
| Linux and WSL | /etc/claude-code/managed-settings.json |
| Windows | C:\Program Files\ClaudeCode\managed-settings.json |
A managed-settings.d/ folder beside the file holds extra policy files, merged after it in alphabetical order. The legacy Windows path C:\ProgramData\ClaudeCode\managed-settings.json is not read at all.
The sandbox runs on macOS, Linux and WSL2, not on native Windows. This file sets sandbox.failIfUnavailable, so a native Windows machine refuses to start rather than run commands unsandboxed: deploy it to macOS and Linux, or move Windows developers into WSL2.
The file is one of four delivery mechanisms. The others are an MDM or OS-level policy, server-managed settings from the claude.ai admin console, and the HKCU registry on Windows. A host app such as Claude Desktop can also pass its own settings down, which Claude Code ignores while an admin source is present. What each one reaches, and the order they apply in when more than one arrives on a machine, is in the managed settings guide.
What outranks this file, and what does not
Nothing in a developer’s own settings files, and nothing passed with --settings, overrides a managed key, with the thirteen exceptions in the next paragraph. A flag such as --model chooses only from the models the policy allows.
Thirteen keys work the other way round, and they are the ones to know as an administrator: for those, a restrictive value from a scope that otherwise could not override managed settings still applies. disableClaudeAiConnectors, isolatePeerMachines, permissions.blockReadsOutsideWorkingDirectories, maxEffortLevel and crossSessionInbound are among them, and the full list of thirteen is in settings.json precedence. A policy that assumes a developer’s own file can only ever loosen things will not survive one of those keys.
Some keys only mean something from here. requiredMinimumVersion, allowManagedPermissionRulesOnly, allowManagedMcpServersOnly, strictKnownMarketplaces, allowManagedHooksOnly and sandbox.network.allowManagedDomainsOnly are all marked Managed in Anthropic’s settings reference, so a copy of this file in a user’s home directory is not a rehearsal of the rollout.
How to prove it landed
- On a machine you deployed to, run
/statusand read theSetting sourcesline. The managed entry shows in parentheses how it arrived, such as a file or an MDM policy. No managed entry means the policy did not reach this session. - Try the things the file forbids.
--dangerously-skip-permissionsis rejected, a model outsideavailableModelscannot be selected, acurlcommand is denied, and an MCP server outside the allowlist does not load. - Compare the timing. A file in a system directory is read at startup, while policy that arrives by MDM or from the claude.ai console reaches a running session on a schedule rather than on save, so test with a session started after the rollout.
- Read the rejections.
claude doctorfrom a terminal, or/doctorin a session, lists settings files and entries Claude Code refused, and a managed file with invalid JSON is reported at startup instead of being silently skipped.
The common mistake: treating the managed model as a lock
A managed model is a starting default. A developer running /model, or launching with --model, is not stopped by it, because both take precedence for that session. What actually restricts choice is availableModels, and what closes the Default option is pairing it with enforceAvailableModels.
Two more that read as guarantees and are not. permissions.deny covers Claude’s file tools, the file commands Claude Code recognizes, and redirection targets, but a subprocess that opens a file itself is outside it; that is what the sandbox is for, which is why this file makes the sandbox mandatory rather than optional. And companyAnnouncements is a startup message: it changes nothing about what a session may do.
The admin setup guide covers choosing what to enforce and rolling it out, and the permissions builder writes and checks the rule strings, since a malformed rule is skipped with only a Settings Warning to show for it.
Common questions
Where does managed-settings.json go on each operating system?
macOS reads /Library/Application Support/ClaudeCode/managed-settings.json, Linux and WSL read /etc/claude-code/managed-settings.json, and Windows reads C:\Program Files\ClaudeCode\managed-settings.json. A managed-settings.d folder beside the file holds extra policy files, merged after it in alphabetical order. The legacy Windows path C:\ProgramData\ClaudeCode\managed-settings.json is not read at all.
Does a managed model setting stop developers from switching models?
No. A managed model is a starting default, not a lock; the locks are availableModels, the allowlist used in the file above, and deniedModels, a blocklist that needs Claude Code 2.1.283 or later. Pair availableModels with enforceAvailableModels to make the Default option obey the list too, because the prefix matching on its own does not touch that option.
How do I check that a managed policy is in force on a machine?
Run /status and read the Setting sources line: when managed settings apply, the managed entry shows in parentheses how they reached the machine, such as a file, an MDM policy or server-managed settings. Managed settings that arrive by MDM or from the claude.ai console reach a running session on a schedule rather than on save, so compare against a session started after the rollout.
Where to go next
- The other four files in this library: a team project, a solo power-user setup, Bedrock or Vertex, and a monorepo.
- Managed settings, end to end: the four delivery mechanisms and what a developer can still change.
- Admin setup: choosing what to enforce, and rolling it out.
- The Claude Code sandbox: what the sandbox blocks, and what it costs in speed.
Check a rollout in real sessions, side by side
Omniscio runs Claude Code sessions side by side on one screen, so you can open two machines and watch the same policy behave in both. The features page covers what it adds, and you can download it for Windows, macOS or Linux.