← Blog

How-to5 min read

Claude Code settings.json: where it is, which file wins, and the settings worth changing

Where Claude Code keeps settings.json, the four settings files and which one wins, and the keys people change most: model, permissions, env and language.

Claude Code's own terminal interface running unmodified inside a Mirasim paneClaude Code's own terminal interface running unmodified inside a Mirasim pane

The short answer

FileWho it affectsUse it for
settings.json in the .claude folder in your home folderYou, in every project on this computerYour theme, default model, your own permission rules
.claude/settings.json in the projectEveryone working in the project, once you commit itTeam permissions, hooks, plugins, the environment variables the project needs
.claude/settings.local.json in the projectYou, in this project onlyPersonal overrides for one project
Managed settings from your organizationEveryone it is deployed toSecurity policy; you can't override it

Installing Claude Code creates none of these. Claude Code writes the user file when you save a personal setting such as the theme, and writes settings.local.json when you answer “Yes, and don't ask again” on a permission prompt. Create the others yourself. On Windows, the home folder is your user folder, so the user file is in %USERPROFILE%\.claude.

What goes in it

A settings.json with the keys people change most
{
  "$schema": "https://json.schemastore.org/claude-code-settings.json",
  "model": "claude-sonnet-5",
  "language": "chinese",
  "permissions": {
    "defaultMode": "acceptEdits",
    "allow": ["Bash(npm run lint)", "Bash(npm run test *)"],
    "deny": ["Read(./.env)", "Read(./.env.*)"]
  },
  "env": {
    "DISABLE_AUTO_COMPACT": "1"
  }
}
$schema
Points your editor at the published schema, so VS Code, Cursor and others autocomplete and check the keys.
model
The model new sessions start with. /model still switches mid-session, and --model or the ANTHROPIC_MODEL variable override it.
permissions
allow runs the listed tool uses without asking, ask always asks, deny blocks them, including reads of files that hold secrets. defaultMode picks the mode new sessions start in: default, acceptEdits, plan, auto, dontAsk or bypassPermissions; auto and bypassPermissions don't take effect from project files, so set those in your user file.
env
Environment variables for every session and the commands it runs. A value here overrides the same variable in your shell. Values are plain text, so keep API keys out of it.
language
The language Claude replies in, such as "chinese"; it also sets voice dictation and session titles.
hooks, statusLine
Your own commands at points in Claude Code's lifecycle, and your own command for the line under the prompt.

The file is strict JSON: a // comment or a trailing comma is an error, and Claude Code shows a Settings Error when it starts. Instructions for Claude don't go here; they go in CLAUDE.md.

Which file wins

  • When the same key is set in several places, the highest one here wins:
  • 1. Managed settings from your organization. Nothing below overrides them.
  • 2. The command line: JSON passed with --settings for one session
  • 3. The project's .claude/settings.local.json
  • 4. The project's .claude/settings.json
  • 5. Your user settings.json

Lists such as permissions.allow are combined across files rather than replaced, so each file can add rules. Environment variables aren't a level in this stack; each variable and key pair has its own rule, for example ANTHROPIC_MODEL in your shell beats model in any file.

Try a value for one session without saving it
claude --settings '{"model": "claude-opus-5-5"}'

Change a setting and check it applied

  • /config lists a short set of personal options, such as theme and editor mode, and saves them for you. It doesn't show every key; edit the file for the rest.
  • Claude Code watches the files and applies most edits to the running session, including permissions and hooks. model and the effort level are read when a session starts; switch them with /model and /effort.
  • Run /status: the Setting sources line lists every settings file it loaded, and shows when managed settings are in force.
  • Committed project settings wait until each teammate trusts the folder, and some keys don't take effect from a repository file at all.

Claude Code's settings in Mirasim

Mirasim runs the Claude Code CLI itself, in a pane next to Codex and other agents. The project's .claude/settings.json and settings.local.json sit in the repository, so Claude Code sessions in Mirasim read them as they do in your terminal. The model is picked per session in Mirasim's model menu.

If another tool wrote an API address and token into your user settings.json, Mirasim can import it as a model provider: Settings › Models › Import existing setup. It only reads the file and never changes it.

Questions

settings.json, .claude.json, CLAUDE.md: what's the difference?
settings.json changes how Claude Code behaves. .claude.json in your home folder is a file Claude Code writes for itself, with your account, MCP servers and per-project state; you don't need to edit it. CLAUDE.md holds instructions for Claude.
Should I commit settings.local.json?
No. When Claude Code creates it in a git repository, it adds it to your global git excludes. If you made the file by hand, add it to .gitignore yourself.
My setting doesn't apply
Run /status to see which files loaded and whether managed settings are in force. Then look for the same key in a higher file, a flag such as --model, or an environment variable such as ANTHROPIC_MODEL. claude doctor lists entries Claude Code rejected.
Where do MCP servers go?
Not in settings.json: in .mcp.json in the project, or in .claude.json through claude mcp add.

Sources

Checked on November 26, 2026 against Anthropic's Claude Code documentation at code.claude.com/docs: Settings files and precedence, and the settings reference. Claude Code changes often, so check those pages for the latest keys.

Keep reading