Settings files
- Global (user)
- Local (personal project)
- Managed (enterprise)
Location:
~/.claude/settings.jsonApplies to every Claude Code session you run, across all projects. This is where you set personal preferences like your preferred model, theme, and cleanup policy.Opening settings
Run/config inside any Claude Code session to open the settings UI. This opens the Config tab of the settings panel, where you can browse and edit the currently active settings for each scope.
You can also edit the JSON files directly. Claude Code reloads settings automatically when it detects file changes.
Settings precedence
Settings merge from lowest to highest priority. Later sources override earlier ones for scalar values; arrays are concatenated and deduplicated.Managed (policy) settings always take final precedence. An administrator setting
permissions.defaultMode to "default" cannot be overridden by users or project files.Settings reference
model
model
Type:
string | Scope: AnyOverride the default model used by Claude Code. Accepts any model ID supported by your configured provider.permissions
permissions
Type:
object | Scope: AnyControls which tools Claude can use and in what mode. See Permissions for full documentation on rule syntax.| Field | Type | Description |
|---|---|---|
allow | string[] | Rules for operations Claude may perform without asking |
deny | string[] | Rules for operations Claude is always blocked from |
ask | string[] | Rules for operations that always prompt for confirmation |
defaultMode | string | Default permission mode: "default", "acceptEdits", "plan", or "bypassPermissions" |
disableBypassPermissionsMode | "disable" | Prevent users from entering bypass permissions mode |
additionalDirectories | string[] | Extra directories Claude may access |
hooks
hooks
Type:
object | Scope: AnyRun custom shell commands before or after tool executions. See Hooks for full documentation.Supported hook events: PreToolUse, PostToolUse, Notification, UserPromptSubmit, SessionStart, SessionEnd, Stop, SubagentStop, PreCompact, PostCompact.cleanupPeriodDays
cleanupPeriodDays
Type:
integer (non-negative) | Default: 30 | Scope: AnyNumber of days to retain chat transcripts. Setting to 0 disables session persistence entirely — no transcripts are written and existing ones are deleted at startup.env
env
Type:
object | Scope: AnyEnvironment variables to inject into every Claude Code session. Values are coerced to strings.availableModels
availableModels
Type:
string[] | Scope: ManagedEnterprise allowlist of models users can select. Accepts family aliases ("opus" allows any Opus version), version prefixes, or full model IDs. If undefined, all models are available. If an empty array, only the default model is available.allowedMcpServers / deniedMcpServers
allowedMcpServers / deniedMcpServers
Type:
object[] | Scope: AnyEnterprise allowlist and denylist for MCP servers. Each entry must have exactly one of serverName, serverCommand, or serverUrl. The denylist takes precedence — if a server matches both lists, it is blocked.worktree
worktree
Type:
object | Scope: AnyConfiguration for --worktree flag behavior.| Field | Type | Description |
|---|---|---|
symlinkDirectories | string[] | Directories to symlink from the main repo into worktrees (e.g., "node_modules") |
sparsePaths | string[] | Paths to check out in sparse mode, for faster worktrees in large monorepos |
attribution
attribution
Type:
object | Scope: AnyCustomize the attribution text Claude appends to commits and pull request descriptions.| Field | Type | Description |
|---|---|---|
commit | string | Attribution text (including any git trailers). Empty string removes attribution. |
pr | string | Attribution text for PR descriptions. Empty string removes attribution. |
language
language
Type:
string | Scope: AnyPreferred language for Claude responses and voice dictation. Accepts plain language names.sandbox
sandbox
Type:
object | Scope: AnySandbox configuration for isolating Claude’s tool executions. Contact your administrator for sandbox setup details.alwaysThinkingEnabled
alwaysThinkingEnabled
Type:
boolean | Default: true | Scope: AnyWhen false, extended thinking is disabled. When absent or true, thinking is enabled automatically for models that support it.effortLevel
effortLevel
Type:
"low" | "medium" | "high" | Scope: AnyPersisted effort level for models that support adjustable thinking budgets.autoMemoryEnabled
autoMemoryEnabled
Type:
boolean | Scope: User, localEnable or disable auto-memory for this project. When false, Claude does not read from or write to the auto-memory directory.autoMemoryDirectory
autoMemoryDirectory
Type:
string | Scope: User, localCustom path for auto-memory storage. Supports ~/ for home directory expansion. Ignored if set in project settings (.claude/settings.json) for security reasons. Defaults to ~/.claude/projects/<sanitized-cwd>/memory/.claudeMdExcludes
claudeMdExcludes
Type:
string[] | Scope: AnyGlob patterns or absolute paths of CLAUDE.md files to exclude from loading. Patterns are matched against absolute paths using picomatch. Only applies to User, Project, and Local memory types — Managed files cannot be excluded.disableAllHooks
disableAllHooks
Type:
boolean | Scope: AnySet to true to disable all hook and statusLine execution.respectGitignore
respectGitignore
Type:
boolean | Default: true | Scope: AnyWhether the file picker respects .gitignore files. .ignore files are always respected regardless of this setting.defaultShell
defaultShell
Type:
"bash" | "powershell" | Default: "bash" | Scope: AnyDefault shell for ! commands in the input box.forceLoginMethod
forceLoginMethod
Type:
"claudeai" | "console" | Scope: ManagedForce a specific login method. Use "claudeai" for Claude Pro/Max accounts, or "console" for Anthropic Console billing.apiKeyHelper
apiKeyHelper
Type:
string | Scope: User, managedPath to a script that outputs authentication values. The script is called to retrieve credentials dynamically instead of reading a static API key.syntaxHighlightingDisabled
syntaxHighlightingDisabled
Type:
boolean | Scope: AnyDisable syntax highlighting in diffs.prefersReducedMotion
prefersReducedMotion
Type:
boolean | Scope: AnyReduce or disable animations (spinner shimmer, flash effects, etc.) for accessibility.Managed settings (enterprise)
Administrators can push settings to all users via platform-native mechanisms. Managed settings take precedence over all user and project settings.- macOS
- Windows
- File-based
Deploy a plist file to
/Library/Preferences/ or via MDM (Jamf, Kandji, etc.) targeting com.anthropic.claudecode.| Setting | Description |
|---|---|
allowManagedHooksOnly | When true, only hooks defined in managed settings run. User, project, and local hooks are ignored. |
allowManagedPermissionRulesOnly | When true, only permission rules from managed settings are respected. |
allowManagedMcpServersOnly | When true, the allowedMcpServers allowlist is only read from managed settings. |
strictPluginOnlyCustomization | Lock specific customization surfaces ("skills", "agents", "hooks", "mcp") to plugin-only sources. Pass true to lock all four, or an array of surface names. |
JSON schema
Add$schema to your settings file for editor autocompletion and validation: