published fresh until

Claude Code settings.json vs settings.local.json: who wins?

Summary As of October 2026, Claude Code uses the value from the highest level: managed, then --settings, then .claude/settings.local.json, then .claude/settings.json, then ~/.claude/settings.json; run /status to see which files loaded.

Not for allow rules that never match, see claude-code-permission-allow-rules-ignored

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

Put a personal override in .claude/settings.local.json: Claude Code applies it over the committed .claude/settings.json, and both sit below --settings and managed settings. Run /status and read the Setting sources line to see which files loaded.

Do first: run /status, then move the key into .claude/settings.local.json if you only want it for yourself.

Not for: permission rules that never match (see claude-code-permission-allow-rules-ignored) or limiting which MCP servers a team can add (see team-approved-mcp-servers-managed-settings-allowlist).

Evidence status: the order below is from the official settings page, checked 2026-10-30. No reader trial was run here; the one public report found is listed under Evidence (closed as a duplicate, no maintainer reply).

Diagnostic: a value you set in a settings file is ignored

Something else sets the same key at a higher level, the file cannot set that value, or the file did not load. Check in this order:

1. Run /status inside Claude Code. The Setting sources line lists each file loaded for this session (for example User settings or Project local settings). It does not show which file each key came from. 2. Run claude doctor to list entries Claude Code rejected. 3. Look at the table below for a higher level that sets the same key.

Precedence, highest first

LevelFile or sourceNotes (per the docs)
1. Managedmanaged-settings.json, an MDM policy, or server-managed settings from the claude.ai consoleNothing in your own files or --settings overrides a managed key
2. Command lineclaude --settings '<json-or-file>'One session only; overrides project and user files, not managed
3. Project local.claude/settings.local.jsonYour personal settings for this project
4. Shared project.claude/settings.jsonCommitted to git for the team
5. User~/.claude/settings.jsonYour settings for every project (on Windows, the .claude folder in your user profile folder)

Environment variables are not a level. Per key, a variable may or may not beat the file: the docs say ANTHROPIC_MODEL 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.

Do first: override a team setting for yourself only

Team file .claude/settings.json sets a value you do not want. Add the same key to .claude/settings.local.json in that project:

{ "model": "claude-opus-5-5" }

(That example is the one the docs use for a personal model override.) Only your sessions change; teammates are unaffected.

Lists merge, they do not override

For list keys such as permissions.allow, Claude Code combines the entries from every file instead of picking one. Exceptions with their own rules: fallbackModel (whole value from the highest file that defines it), modelPicker, availableModels (a managed list is applied as-is) and modelSettings. An allow rule in your local file does not outrank an ask rule from a project or managed file.

Is settings.local.json gitignored?

Claude Code keeps it out of git when it creates the file: on first write it adds **/.claude/settings.local.json to your global git excludes file. If you create the file by hand, add it to .gitignore yourself. Claude Code writes the file when you choose "Yes, and don't ask again" on a permission prompt. In a git repository it reads and writes the file at the repository root, not the subdirectory you started in (from v2.1.211, per the docs).

Cases where a value cannot take effect from a file

  • permissions.defaultMode values auto and bypassPermissions do not take effect from project or local settings. Set them in user or managed settings, or pass --permission-mode for one session.
  • Keys marked User, Managed or Global config in the Scope column of the settings index never apply from the shared project file. Global config keys apply only from ~/.claude.json.
  • permissions.allow rules, permissions.additionalDirectories, extraKnownMarketplaces and most env values from the committed file wait until each teammate trusts the folder; deny and ask rules apply right away.
  • A few restrictive keys are honored even over managed settings (for example disableClaudeAiConnectors: true from any scope).

Managed settings

An administrator delivers them; you cannot change them. /status names the source. Delivery and per-platform file locations are on the managed settings page. Not read: user and project local files are not read in cloud sessions.

Where edits apply

Claude Code watches settings files and applies most edits (permissions, hooks, apiKeyHelper) to a running session without restart. Settings files are strict JSON: a // comment or trailing comma raises a Settings Error at next start.

Evidence

Public report: a user expected a project settings.local.json entry enabledPlugins: false to override a global true in ~/.claude/settings.json, but reported the plugin still loaded (issue 34415, opened by mpool on 2026-03-14, closed as a duplicate of 27247, no maintainer reply on the page). The official page above documents the other direction; if a plugin toggle behaves differently, treat that as a known mismatch, not as proof the order is wrong.

Limits

Untested here: no settings combination was run. The order reflects the docs as of October 2026 and Claude Code versions near v2.1.2xx; managed-source precedence inside the managed tier is not reproduced here. checked 2026-10-30.

Started from a post by @Anthropic, packaged by the editor. Original post

Subjects

More in anthropic

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Claude Code settings.json vs settings.local.json: who wins?
Summary: As of October 2026, Claude Code uses the value from the highest level: managed, then --settings, then .claude/settings.local.json, then .claude/settings.json, then ~/.claude/settings.json; run /status to see which files loaded.
Copy for agent
get the whatworks thread claude-code-settings-precedence-local-vs-project-vs-managed and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread claude-code-settings-precedence-local-vs-project-vs-managed
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks