~/.claude/settings.json
Use this for personal permissions, environment defaults, hooks, and preferences that should follow you across projects.
Practical settings.json reference
Choose the right file, start from a safe example, and verify which setting actually wins.
Most people need the user file. Move to a project scope only when the setting belongs to that repository.
~/.claude/settings.json%USERPROFILE%\.claude\settings.json<project>/.claude/settings.json<project>/.claude/settings.local.jsonIf CLAUDE_CONFIG_DIR is set, Claude Code uses that directory in place of ~/.claude for user configuration.
Safe starter settings.json
{
"$schema": "https://json.schemastore.org/claude-code-settings.json",
"permissions": {
"allow": [
"Bash(npm run test *)"
],
"deny": [
"Read(./.env)",
"Read(./.env.*)",
"Read(./secrets/**)"
]
}
}
The schema line enables editor autocomplete and inline validation. The permission example approves one narrow test command and denies common secret locations.
Adjust every rule to match your repository. A broad allow rule can remove useful approval prompts, while a broad deny rule can block normal work.
A correct value in the wrong scope still produces confusing behavior.
~/.claude/settings.jsonUse this for personal permissions, environment defaults, hooks, and preferences that should follow you across projects.
Commit .claude/settings.json when every collaborator should receive the same project behavior.
Use .claude/settings.local.json for machine-specific paths, experiments, or personal overrides. In a Git worktree, current Claude Code resolves this file to the main checkout root.
Organization policy can arrive from server delivery, operating-system policy, or a system-level managed settings file. It cannot be overridden by user or project settings.
Shared settings are part of the project's operating policy. Review them with the same care as build scripts and automation.
Use .claude/settings.json for rules, hooks, and supported settings that every collaborator should receive. Keep the file readable, explain non-obvious rules in the pull request, and avoid broad approvals that are hard to audit.
Use .claude/settings.local.json for personal experiments, machine paths, or one-project overrides. When Claude Code creates it in a Git repository, it adds the path to Git's global excludes. If you create it by hand, add it to .gitignore yourself, then confirm repository status before committing.
Claude Code uses several configuration files. Their jobs overlap less than their names suggest.
settings.json~/.claude.jsonCLAUDE.md.mcp.jsonFor scalar values, higher-priority sources override lower-priority ones.
Managed > command line > Local > Project > User
Do not edit several files at once. Use one observation to decide the next change.
Settings files are strict JSON, so remove comments and trailing commas. Run claude doctor for read-only details about rejected settings, or /doctor for the interactive checkup.
Run /status and read the Setting sources line. It confirms which files loaded, but it does not identify the source of every individual key.
Run /permissions to see the current allow, ask, and deny rules plus the settings file each rule came from.
Change one value, reproduce one action, and record the result. This separates a scope problem from a rule-pattern problem.
The CLI, VS Code, and JetBrains use the same scope system, but a different working directory, inherited environment, or project root can change what loads. Reproduce the issue from the same interface where you first saw it.
Put permissions and tool behavior in settings.json. Put project conventions and working guidance in CLAUDE.md. A well-written instruction can influence what Claude tries, but it cannot replace an enforced permission rule.
Some settings have scope restrictions. For example, permissions.defaultMode values auto and bypassPermissions do not take effect from shared project or local settings; some telemetry variables in env also ignore those scopes.
The published JSON schema is useful but can lag a newly documented field. Treat a warning on a recent official field as a reason to recheck the current documentation, not automatic proof that the field is invalid.
Local diagnostic
Run the browser-only checker to rank likely causes from your path, scope, version, launch surface, and redacted JSON.
User settings are stored in ~/.claude/settings.json. Shared project settings use .claude/settings.json, and personal project overrides use .claude/settings.local.json.
Commit it only when the settings are intended for the whole team. Keep machine-specific or personal project values in .claude/settings.local.json.
The file may be in the wrong location, contain invalid JSON, lose to a higher-precedence scope, or be affected by a command-line or environment override. Use /status, /doctor, and /permissions to inspect the active configuration.
No. ~/.claude/settings.json stores settings such as permissions, environment values, and hooks. ~/.claude.json stores application state and other global configuration.
Sources last reviewed September 27, 2026.