Claude Code settings: which file wins and why
Claude Code settings live in four files with different scopes. See which one wins, how to check it with /status, and the first settings to change.


Claude Code settings come from four files, and the file a setting sits in decides who it applies to: only you, everyone in a project, or everyone in your organization. Put a setting in the narrowest file that fits and the precedence question mostly answers itself.
This guide covers the user, shared project, project local and managed files, the order they win in, the checks that show what loaded, and three settings worth changing first. It applies to the terminal, the VS Code and JetBrains extensions and the desktop app, which all read the same settings files. If settings also decide how fast you burn quota, read Claude Code usage limits next.
1. Pick the file by who it should affect
Which file should a setting go in? Ask who needs it.
| Scope | File | Who it affects |
|---|---|---|
| User | ~/.claude/settings.json | You, in every project on this machine |
| Shared project | .claude/settings.json | Everyone working in the folder that contains it |
| 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 |
The shared project file is the one to commit: in a git repository, commit it so teammates get it. Use it for team permissions, hooks, plugins and the environment variables the project needs. Use the user file for personal preferences such as theme, editor mode and default model.
Installing Claude Code doesn’t create any settings file. Claude Code writes them when you act:
| You do this | Claude Code writes |
|---|---|
Change most options in the /config menu, such as the theme | ~/.claude/settings.json |
| Give a standing approval such as “Yes, and don’t ask again” on a Bash command | .claude/settings.local.json |
Change a few /config options, such as Show tips | .claude/settings.local.json |
Change a global config option in /config | ~/.claude.json |
There is also a fifth file, ~/.claude.json, that Claude Code writes for itself. It holds your account details, MCP server configurations and per-project trust decisions, so leave it alone.
2. Know which file wins
When two files set the same key, Claude Code uses the value from the highest level that sets it.
| Precedence | Source | Set by |
|---|---|---|
| 1 (highest) | Managed settings | Your organization |
| 2 | Command line | --settings for one session |
| 3 | Project local | .claude/settings.local.json |
| 4 | Shared project | .claude/settings.json |
| 5 (lowest) | User | ~/.claude/settings.json |
The clearest case for you is the local file: Claude Code applies that file over the committed .claude/settings.json. If the team file sets claude-sonnet-5 as the model and you want Opus, put claude-opus-5-5 in your local file and only your sessions change.
{ "model": "claude-opus-5-5"}Managed settings sit above all of it. If your organization manages Claude Code, some settings are decided for you and nothing you put in your own files changes them. The --settings flag also has a fixed place: above your user, project, and local files and below managed settings.
The same key, spinnerTipsEnabled, shows each case. You set it to false in your user file, then something else sets it to true:
Who sets true | What you see | Your fix |
|---|---|---|
The team’s .claude/settings.json | Tips in that project only | Add false to .claude/settings.local.json |
| Your organization’s managed settings | Tips everywhere | None; ask your administrator |
claude --settings '{"spinnerTipsEnabled": true}' | Tips for that session | Start the next session without the flag |
List keys behave differently. A list such as permissions.allow set in more than one file is combined instead of overridden, so each file adds entries without removing another file’s.
Where a setting lives also decides whether anyone else gets it. A shared project file reaches a teammate’s clone and a cloud session only if you commit the file to version control. Your user file reaches neither.
3. Check what loaded with /status
How do you confirm a file took effect? Run /status inside Claude Code. The Setting sources line names the managed source that applies to you, and it lists each file loaded for the session, which is how you confirm a file you just saved loaded. It does not show which file supplied each key.
/status # Setting sources: the files loaded this sessionclaude doctor # entries Claude Code rejected, with the reasonSettings files are strict JSON. A // comment or a trailing comma is a syntax error, and Claude Code reports the file as a Settings Error at the next start. Add a $schema line and editors that support JSON schema, including VS Code and Cursor, give you autocomplete and inline validation. The schema can lag behind new releases, so a warning on a recently documented key doesn’t mean your configuration is invalid.
| Symptom | Where to look |
|---|---|
| A value you set is ignored | A higher level sets the same key; check the precedence table |
| Settings Error at start | Invalid JSON or a value the schema rejects in a user, project or local file |
| Settings Warning at start | One malformed entry, skipped while the rest of the file stays in effect |
| A teammate doesn’t get your key | The file is not committed, or the key waits for them to trust the folder |
4. Change a setting the way that fits
You have three routes.
- The
/configmenu. It lists a short set of personal options such as theme, editor mode and verbose output, and saves them for you. To set one option without the menu, passkey=value, such as/config verbose=true. The VS Code chat panel and the desktop app don’t open it, so edit a file there. - Edit a file. Open the file for the scope you want and add the key. Claude Code watches the files and applies most edits, including
permissionsandhooks, without a restart. - Override for one session. Your files stay untouched. Use
--settingswith JSON inline or a file path, a per-key flag such as--model, or an environment variable such asANTHROPIC_MODEL.
For example, to start one session on Opus without changing your default:
claude --settings '{"model": "claude-opus-5-5"}'Standing instructions are not a settings key. Claude Code’s system prompt isn’t published, so use CLAUDE.md files or the —append-system-prompt flag. If one repo of skills should serve more than one tool, see how to share one skills repo between Claude Code and Codex.
Give your build a human voice
Eleven v4 is ElevenLabs' most emotive voice model yet, for text to speech, voice agents and an API.
Hear Eleven v4Sponsored
Make AI video from inside Claude
Higgsfield has an MCP for Claude, plus Seedance 2.5 and Cinema Studio 4.0. New accounts get up to 50% off for their first 3 hours.
Get up to 50% offSponsored
5. Start with these settings
Three changes pay off first, and each maps to a scope above.
- Allow your routine commands. Rules under
permissionsname a tool and what it may do. Allowing your lint and test commands in the user file stops the repeated prompts. - Deny secret files. A deny rule on
.envfiles keeps Claude Code from reading them. - Pin the model per project in the local file. It overrides the team’s choice for you alone.
The docs show the first two in one user file:
{ "$schema": "https://json.schemastore.org/claude-code-settings.json", "permissions": { "allow": [ "Bash(npm run lint)", "Bash(npm run test *)" ], "deny": [ "Read(./.env)", "Read(./.env.*)" ] }}That block goes in ~/.claude/settings.json, and the commands inside it are the docs’ example project’s, so swap in your own. Model choice also changes how quickly a weekly limit runs out, which pacing your Claude subscription covers.
In a committed file, some keys wait for each teammate to trust the folder before they apply:
Key in .claude/settings.json | When it applies |
|---|---|
permissions.allow | After the teammate trusts the folder |
permissions.additionalDirectories | After the teammate trusts the folder |
extraKnownMarketplaces | After the teammate trusts the folder |
Most env values | After the teammate trusts the folder |
deny and ask rules | Right away |
Verdict
Put team rules in the committed .claude/settings.json, personal preferences in ~/.claude/settings.json, and your own overrides for one project in .claude/settings.local.json, which wins over the committed file. Run /status after every edit, and treat anything your organization manages as fixed.
Set up Claude Code today: read the settings docs at code.claude.com
Sources:Claude Code docs: Claude Code settings.
Responses
Responses
Community guidelines
Write about the post. Be kind and be specific.
Responses are plain text. Spam, abuse and anything unlawful are removed, and the person who posted them may be blocked.
A response may wait for the owner to read it before it appears. Use Report on anything that should not be here.
Give your build a human voice
Eleven v4 is ElevenLabs' most emotive voice model yet, for text to speech, voice agents and an API.
Hear Eleven v4Sponsored
Make AI video from inside Claude
Higgsfield has an MCP for Claude, plus Seedance 2.5 and Cinema Studio 4.0. New accounts get up to 50% off for their first 3 hours.
Get up to 50% offSponsored
Get the next one
New posts by email, when they are ready. Confirm once and you are on the list.
Check your inbox
We sent a link to . Click it and you are on the list. Nothing is sent to an address that has not confirmed itself.
Keep reading


Claude model training data: what the help article says
Anthropic's help article says commercial inputs are not used for training by default, but feedback can be. Here is what to check in Claude Code.


Generative UI agent instructions: 2,326 vs 12,720 tokens
Generative UI needs instructions that teach an agent to build cards. A short block cost 2326 tokens, a full guide 12,720, so keep the short block.


Claude Code context window: what fills it, how to free it
The Claude Code context window fills with memory files, history and tool output. /clear starts a new session, and a shorter CLAUDE.md cuts the fixed load.

