Settings Files and Scopes
Settings are JSON files that change how Claude Code behaves. You can pick a model, add permission rules, turn off a feature, or share the same rules with a whole team. This page explains the files, the scopes, and which value wins. The other pages in this folder list every key.
At a Glance
| Question | Answer |
|---|---|
| Can you use it? | ✅ Yes. Create or edit a settings file, or run /. |
| Can you change it? | Edit the JSON files below, pass --, use / or / for some keys, or ask an administrator to deploy managed settings. |
| Can you turn it on or off? | Each key is its own switch. disable turns off hooks, the status line, and file suggestions at once. |
| Where does it live? | ~/., ., ., managed files, and ~/. |
| Status | Documented Undocumented Differs |
The managed schema of 2.1.304 lists 184 keys. The user schema lists 162, and the other 22 are managed-only.
Source: the program (the published settings schemas).
Example
A project can share one small file with the whole team.
{
"$schema": "https://json.schemastore.org/claude-code-settings.json",
"model": "opus",
"permissions": {
"allow": ["Bash(bun test)"]
}
}
Every session in that folder starts on Opus and may run bun test without asking.
A teammate can still override model in .claude/settings.local.json.
Pages for Each Group of Keys
Each key has a row on one of these pages.
| Page | Keys |
|---|---|
| Core Settings | Compaction, memory, cleanup, shell, files, env, sandbox, updates |
| Model Settings | Model, effort, thinking, fast mode, cache lifetime, token reminders |
| Auth Settings | Credential helpers, login rules, API provider limits |
| Agents and Remote Settings | agent, workflows, background work, Remote Control, peer sessions |
| Hooks, Plugins, and Skills Settings | Hooks, plugins, marketplaces, skills, permissions, status, output |
| MCP and Channels Settings | MCP servers, claude.ai connectors, channels |
| Interface Settings | Theme, spinner, tui, voice, notices, feedback |
| Enterprise Settings | How managed policy arrives, version limits |
| Extra Keys and Global Config | Keys the schema omits, and the keys of ~/. |
How to Read the Key Tables
- The
Statuscolumn uses the badges from How to Read These Docs. Typeshows ❓ when neither the official docs nor the schema give a type.Defaultshows-when no default is known.Where to Set Itsays which files may set the key.Any settings filemeans the user, project, local, and managed files.Settings filesmeans the settings files without a narrower scope in the source.- Many boolean keys are written as the thing to switch off, such as
spinnerTipsEnabled. Read the row before you pick a value. - Items that are removed or do nothing in
2.1.304are left out. See the end of this page.
Where Settings Live
| Scope | File | Who it affects |
|---|---|---|
| User | ~/. | You, in every project. CLAUDE_ moves ~/.. |
| Shared project | . | Everyone who works in the folder. Commit it so teammates get it. |
| Project local | . | You, in this project only. Claude Code keeps the file out of git. |
| Command line | -- | One session. It cannot set managed or global config keys. |
| Managed | managed- and the other managed sources | Everyone your organization deploys it to. |
| Global config | ~/. | You. Claude Code writes it. It holds sign-in data, MCP servers, per-project state, and a few keys. |
Source: Settings Files and Precedence and Explore the .claude Directory.
- Settings files are strict JSON. A comment or a trailing comma is a syntax error.
- Claude Code reads the shared project file from the primary working directory.
After
/cd, it reads the new directory (v2.1.246 or later). - In a git repository, the local file lives at the repository root. In a worktree, it lives at the main checkout root.
- Claude Code adds
**/.claude/settings.local.jsonto your global git excludes file when it writes the local file. - Claude Code watches the files and reloads them. It runs the
ConfigChangehook for each change in a settings file. - Managed settings from MDM or the console reach a running session on a schedule, not on save.
- A cloud session reads only the shared project file and server-managed settings.
- Run
/statusto see theSetting sourcesline. Runclaude doctorto see the entries that Claude Code dropped. - The flag
--setting-sources <sources>loads only the sources you name (user,project,local).
Source: the program names the five sources userSettings, projectSettings, localSettings, flagSettings, and policySettings.
Which Value Wins
The highest level that sets a key wins.
- Managed settings.
- Command line (
--settings). - Project local settings.
- Shared project settings.
- User settings.
Read the chart from the top. The first level that sets the key decides its value.
Environment variables are not a level.
Each pair of key and variable decides alone, such as ANTHROPIC_MODEL over model.
See Models and Effort Variables for examples.
Source: Settings Files and Precedence.
How Lists and Model Keys Merge
- List keys such as
permissions.allowmerge across scopes. allowManagedPermissionRulesOnlystops that merge for permission rules.fallbackModelis an ordered chain. The whole value comes from the highest scope that sets it.modelPickernever merges. The whole value comes from managed settings,--settings, or user settings. Claude Code ignores project and local values (v2.1.242 or later).availableModels: a managed list applies as it is. Across the other scopes, the arrays merge.modelSettingsresolves one model at a time, together witheffortLevel.- Managed
envblocks merge per key across admin sources.CLAUDE_CODE_DISABLE_ADMIN_ENV_UNION=1turns that off.
Source: Settings Files and Precedence and Environment Variables.
Managed Settings
An administrator puts managed settings on a machine in one of these ways. Source: Deploy Managed Settings.
| Platform | Where Claude Code looks |
|---|---|
| macOS | /, and the com. managed preferences domain |
| Linux and WSL | / |
| Windows | C:, and the registry keys HKLM\SOFTWARE\Policies\Claude and HKCU\SOFTWARE\Policies\Claude |
| WSL on Windows | The Windows sources, only when wsl is on |
| All | The managed- folder next to the file, server-managed settings (cached in ~/.), and the SDK managed option or -- flag |
- Claude Code merges
managed-settings.jsonfirst, then each*.jsonfile ofmanaged-settings.d/in alphabetical order. Number the files to set the order, such as10-telemetry.json. managedSourcesBehaviordecides how sources combine.first-winsuses the highest source alone.mergedeep-merges them.parentSettingsBehaviordoes the same for the SDK parent tier.policyHelperandpolicyHelperscompute managed settings at startup.
The keys are in Enterprise Settings.
Exceptions to Managed Precedence
For a few keys, a lower scope may set a stricter value, and Claude Code honors it over the managed value. Source: Settings Files and Precedence.
| Keys | Status | Value Claude Code honors | Where it can come from |
|---|---|---|---|
disable, isolate, permissions. | Documented | true | Any scope |
enable, disable | Documented | enable or disable | Any scope |
auto | Documented | true | ~/. or -- |
remote | Documented | false | . or . |
cross | Documented | A stricter value on the ladder accept, hold, refuse | . or . |
use, sync, sync | Documented | false | Managed, --, ~/., or . |
max | Documented | The lowest cap (v2.1.267 or later) | Any scope |
model, feedback, available, ask, dialog | Undocumented | A strict value | Source: the program lists them as keys with a strict value. The docs do not list them here. |
An app that runs Claude Code inside itself and sets CLAUDE_CODE_PROVIDER_MANAGED_BY_HOST is also an exception.
Claude Code then takes the model keys of that app over the managed values.
Left Out on Purpose
These keys do nothing in 2.1.304, so the pages do not list them.
taskOutputMaxChars— TheTaskOutputtool was removed.keybindingFlavor— Word-editing keys always follow Bash (readline) rules now.permissionExplainerEnabled— Removed in v2.1.257.teammateDefaultModel— Removed in v2.1.234.
Related Pages
- Environment Variable Groups list the variables that pair with some keys.
- How to Read These Docs explains the badges.
- Undocumented Items indexes every undocumented item.
- Permissions covers
permissions,sandbox, andautoMode. - Settings Reference lists each key in the official docs.