Claude Code reads settings.json from four places: ~/.claude/settings.json for you in every project, .claude/settings.json for everyone in a project, .claude/settings.local.json for you in one project, and your organization’s managed settings. When a key is set in several, the higher level wins: managed, command line, project local, shared project, then user. Lists such as permissions.allow merge instead. Run /status to see which files loaded (Anthropic docs).

Applies to: Claude Code 2.1.332 and the Claude Code settings docs as read on November 27, 2026. Last checked: November 27, 2026.

On this page

Where is the Claude Code settings.json file?

Anthropic’s docs name four settings sources. Each has a scope: the people and projects a setting saved there applies to (Settings files and who they affect).

Scope File Who it affects
User ~/.claude/settings.json You, in every project on this machine
Shared project .claude/settings.json Everyone in the project, once the file is committed
Project local .claude/settings.local.json You, in this one project only
Managed managed-settings.json and other managed sources Everyone your organization deploys it to

A few details that trip people up, all from the same docs page:

  • Installing Claude Code creates none of these files. It writes ~/.claude/settings.json when you save a user setting such as the theme, and .claude/settings.local.json when you pick “Yes, and don’t ask again” on a permission prompt.
  • On Windows, ~/.claude means %USERPROFILE%\.claude. Set CLAUDE_CONFIG_DIR to keep the home-directory files somewhere else.
  • .claude/settings.local.json stays out of your commits when Claude Code creates it. If you create the file by hand, add it to .gitignore yourself.
  • ~/.claude.json is a different file. Claude Code writes it for itself; it holds account details, MCP server configurations and per-project state, so you do not edit it for ordinary settings (Settings docs).

For the wider folder layout and where sessions and memory live, see where Claude Code stores data.

How do I change a setting?

There are three routes (Change a setting):

  1. The /config menu. It lists a short set of personal options, not every key. Most options save to ~/.claude/settings.json; the output style saves to .claude/settings.local.json. /config verbose=true sets one option without the menu. The VS Code chat panel and the desktop app do not open /config.
  2. Edit a settings file. Settings files are strict JSON: a // comment or a trailing comma is a syntax error. The docs’ example allows lint and test commands and blocks reading .env files:
{
  "$schema": "https://json.schemastore.org/claude-code-settings.json",
  "permissions": {
    "allow": [
      "Bash(npm run lint)",
      "Bash(npm run test *)"
    ],
    "deny": [
      "Read(./.env)",
      "Read(./.env.*)"
    ]
  }
}

The $schema line gives editors that support JSON schema autocomplete and validation. The docs add that the schema can lag behind the newest releases, so a warning on a recently documented key does not mean your configuration is invalid.

  1. One session only. Pass a key as JSON with --settings, use a key’s own flag such as --model, or export its paired environment variable such as ANTHROPIC_MODEL. The docs’ example starts one session on a different model without saving it:
claude --settings '{"model": "claude-opus-5-5"}'

Anthropic keeps a settings reference with every key, its type, default and scope, and example settings files for a developer, a team and an organization.

Which settings file wins?

When the same key appears in more than one place, Claude Code uses the value from the highest level that sets it (Settings precedence):

Level Source
1 (highest) Managed settings
2 Command line: --settings <file-or-json>
3 Project local: .claude/settings.local.json
4 Shared project: .claude/settings.json
5 (lowest) User: ~/.claude/settings.json

Three rules sit on top of that table:

  • Lists merge. If permissions.allow is set in more than one file, Claude Code combines the entries instead of picking one file’s list. A handful of model-related keys, such as fallbackModel, modelPicker and availableModels, follow their own rules (Lists merge instead of overriding).
  • Environment variables are not a level. For a key with both a shell variable and a settings key, the pair decides. The docs’ example: ANTHROPIC_MODEL exported in your shell applies over the model key from any file, while ANTHROPIC_DEFAULT_MODEL applies only when no file sets model. An env block inside a settings file is an ordinary key and follows the levels above.
  • A few security keys keep the strict value. For some restrictive keys, such as disableClaudeAiConnectors and permissions.blockReadsOutsideWorkingDirectories, Claude Code honors true from any scope even when a managed source says false (Exceptions to managed settings precedence).

The docs walk through one example with spinnerTipsEnabled set to false in your user file. A team’s .claude/settings.json that sets it to true wins in that project, because shared project sits above user. You get your value back by adding "spinnerTipsEnabled": false to .claude/settings.local.json in that project. If a managed source sets it to true, nothing in your own files or --settings changes it.

Which keys do people look for?

These entries come from the settings reference, where each key lists its scope, type and default.

Key What it does Notes from the reference
model The model every new session starts with Takes an alias or a full model ID. --model and ANTHROPIC_MODEL beat it for one session. An organization default model can override your value
env Environment variables for every session and its subprocesses Values are plain text in the file. Project and local settings cannot set some variables, such as telemetry export ones
permissions.allow and permissions.deny Rules that approve or block tools Rule syntax is on the permissions docs; see also the permissions guide
permissions.defaultMode The permission mode new sessions start in auto and bypassPermissions do not take effect from project or local settings; set them in user or managed settings
cleanupPeriodDays Days Claude Code keeps session transcripts Whole number, minimum 1, default 30
hooks Commands that run on Claude Code events Covered in the hooks guide

The env example from the reference turns off automatic compaction and routes API requests through a proxy:

{
  "env": {
    "DISABLE_AUTO_COMPACT": "1",
    "ANTHROPIC_BASE_URL": "https://proxy.example.com"
  }
}

Warning

The docs describe permissions.defaultMode: "bypassPermissions" as running everything without asking, and the permission modes page says to use that mode only in isolated environments such as containers, VMs or dev containers without internet access, where Claude Code cannot damage your host system (Permission modes). Safer documented options for a daily default are "acceptEdits" or "plan", plus narrow allow rules like the lint and test example above.

How do I check that a setting loaded?

Run /status inside Claude Code. Its Status tab has a Setting sources line that lists each settings file loaded for the session, such as User settings or Project local settings. The line shows which files were read, not which file supplied each key (Confirm what loaded).

To list entries Claude Code rejected, run claude doctor from your terminal. The debug your configuration page says it prints read-only installation and settings diagnostics without starting a session.

Claude Code watches your settings files and applies most edits to the running session without a restart, including permissions, hooks and credential helpers such as apiKeyHelper. It reads some keys only once at session start, so restart if an edit to a key like that does not show up (When edits take effect). Use /model and /effort to change those two mid-session.

If a file is broken, the docs describe two outcomes at the start of an interactive session. A Settings Error means a user, project or local file has invalid JSON or a value the schema rejects, and Claude Code offers to fix the file with its help, exit or continue without it. A Settings Warning means only individual entries failed, such as a malformed permission rule; Claude Code skips those entries and keeps the rest of the file (Fix a broken settings file).

Why is my setting ignored?

The docs list the causes in this order (Troubleshoot a setting that doesn’t apply):

  1. A higher level sets the same key. Another file, a --settings flag or a managed source sits above yours. A flag or environment variable can also override a key on its own.
  2. The file cannot set that value. permissions.defaultMode values auto and bypassPermissions do not take effect from project or local settings.
  3. The file is broken. Invalid JSON or a rejected value makes Claude Code skip the file or the entry.
  4. A committed key does not reach teammates. Some keys never apply from a repository file, and others wait until each teammate trusts the folder: permissions.allow rules, permissions.additionalDirectories, extraKnownMarketplaces and most env values. deny and ask rules apply right away.
  5. A change from inside Claude Code is lost. Choices such as a default model from /model are written to ~/.claude/settings.json. If that file is read-only or generated by another tool, the change lasts one session.