Comprehensive reference for Claude Code configuration. Use as a resource for building profiles, managed deployments, and automation.
Configuration Scopes & Files
Scope
File
Precedence
Shared?
Managed
managed-settings.json (system dirs), MDM, server
1 (highest)
IT-deployed
CLI flags
--permission-mode, --model, etc.
2
No
Local
.claude/settings.local.json
3
No (gitignored)
Project
.claude/settings.json
4
Yes (committed)
User
~/.claude/settings.json
5 (lowest)
No
System dirs for managed settings:
macOS: /Library/Application Support/ClaudeCode/
Linux/WSL: /etc/claude-code/
Windows: C:\Program Files\ClaudeCode\
Other config files:
~/.claude.json — global prefs, OAuth, MCP servers (user/local scope), per-project state
.mcp.json — project-scoped MCP servers
~/.claude/CLAUDE.md — user-scope instructions
CLAUDE.md or .claude/CLAUDE.md — project-scope instructions
.claude/agents/*.md — subagent definitions
.claude/skills/ — skill definitions
Permission Modes (permissions.defaultMode)
Mode
Auto-approves
Best for
Shift+Tab cycle
default
File reads only
Sensitive work, getting started
Yes
acceptEdits
File reads + edits
Iterating on code you review
Yes
plan
File reads only (no edits/commands)
Exploring, planning refactors
Yes
auto
All actions (classifier checks)
Long tasks, reducing prompt fatigue
Yes (with --enable-auto-mode)
dontAsk
Only pre-approved tools
CI, locked-down envs
Never in cycle
bypassPermissions
Everything, no checks
Containers/VMs only
Only if started with it
Set mode:
{"permissions":{"defaultMode":"acceptEdits"}}
CLI:
claude --permission-mode plan
claude --dangerously-skip-permissions# = bypassPermissions
claude --enable-auto-mode# adds auto to Shift+Tab cycle
claude --allow-dangerously-skip-permissions# adds bypass to cycle without activating
Permission Rules
Evaluation order: deny > ask > allow (first match wins)
| Pattern | Matches | |—|—| | Bash or Bash(*) | All Bash commands | | Bash(npm run *) | Commands starting with npm run | | Bash(* --version) | Commands ending with ` –version | | Bash(git * main) | git checkout main, git merge main, etc. | | Read(./.env) | Specific file relative to cwd | | Read(./secrets/*) | Recursive glob (gitignore spec) | | Read(~/Documents/.pdf) | Home-relative path | | Read(//Users/alice/file) | Absolute path (// prefix) | | Edit(/src/*/.ts) | Project-root-relative | | WebFetch(domain:example.com) | Domain filter | | mcp__puppeteer | All tools from MCP server | | mcp__puppeteer__puppeteer_navigate | Specific MCP tool | | Agent(Explore)` | Specific subagent |
Note:Bash(ls *) (with space) enforces word boundary — matches ls -la but not lsof. Bash(ls*) matches both.
All settings.json Keys
Core Settings
Key
Type
Description
Example
model
string
Default model
"claude-sonnet-4-6"
availableModels
string[]
Restrict /model choices
["sonnet", "haiku"]
modelOverrides
object
Map model IDs to provider IDs (Bedrock ARNs)
{"claude-opus-4-6": "arn:..."}
effortLevel
string
Persist effort level: low, medium, high
"medium"
language
string
Response language
"japanese"
outputStyle
string
Adjust system prompt style
"Explanatory"
agent
string
Run main thread as a named subagent
"code-reviewer"
autoUpdatesChannel
string
"stable" or "latest"
"stable"
Permission Settings
Key
Type
Description
permissions.allow
string[]
Auto-approve rules
permissions.ask
string[]
Force-prompt rules
permissions.deny
string[]
Block rules
permissions.defaultMode
string
Default permission mode
permissions.additionalDirectories
string[]
Extra working dirs
permissions.disableBypassPermissionsMode
string
Set "disable" to block bypass mode
Environment
Key
Type
Description
Example
env
object
Env vars for every session
{"FOO": "bar"}
apiKeyHelper
string
Script to generate auth
/bin/gen_key.sh
forceLoginMethod
string
"claudeai" or "console"
"console"
forceLoginOrgUUID
string
Auto-select org during login
UUID
awsAuthRefresh
string
AWS credential refresh script
aws sso login --profile x
awsCredentialExport
string
AWS credential export script
/bin/gen_aws.sh
Hooks
Key
Type
Description
hooks
object
Hook event → handler arrays
disableAllHooks
bool
Kill switch for all hooks
allowManagedHooksOnly
bool
(Managed) Only managed/SDK hooks
allowedHttpHookUrls
string[]
URL allowlist for HTTP hooks
httpHookAllowedEnvVars
string[]
Env var allowlist for HTTP hook headers
Status Line & UI
Key
Type
Description
Example
statusLine
object
Custom status bar
{"type":"command","command":"..."}
fileSuggestion
object
Custom @ file picker
{"type":"command","command":"..."}
respectGitignore
bool
@ picker respects .gitignore (default: true)
false
spinnerVerbs
object
Custom spinner text
{"mode":"append","verbs":["Pondering"]}
spinnerTipsEnabled
bool
Show tips in spinner (default: true)
false
spinnerTipsOverride
object
Custom spinner tips
{"excludeDefault":true,"tips":["..."]}
prefersReducedMotion
bool
Reduce UI animations
true
showClearContextOnPlanAccept
bool
Show “clear context” on plan accept
true
companyAnnouncements
string[]
Startup announcements
["Welcome to Acme Corp"]
Session & Memory
Key
Type
Description
cleanupPeriodDays
int
Delete sessions older than N days (default: 30). 0 = disable persistence
autoMemoryDirectory
string
Custom auto-memory dir (not in project settings)
plansDirectory
string
Custom plan files dir (default: ~/.claude/plans)
alwaysThinkingEnabled
bool
Enable extended thinking by default
includeGitInstructions
bool
Include git workflow in system prompt (default: true)
MCP Servers
Key
Type
Description
enableAllProjectMcpServers
bool
Auto-approve all project .mcp.json servers
enabledMcpjsonServers
string[]
Specific MCP servers to approve
disabledMcpjsonServers
string[]
Specific MCP servers to reject
allowManagedMcpServersOnly
bool
(Managed) Only admin-approved MCP servers
allowedMcpServers
object[]
(Managed) MCP server allowlist
deniedMcpServers
object[]
(Managed) MCP server denylist
Worktree
Key
Type
Description
worktree.symlinkDirectories
string[]
Dirs to symlink into worktrees
worktree.sparsePaths
string[]
Sparse checkout paths
Teams & Collaboration
Key
Type
Description
teammateMode
string
auto, in-process, or tmux
fastModePerSessionOptIn
bool
Require /fast each session
voiceEnabled
bool
Push-to-talk voice dictation
feedbackSurveyRate
float
Survey probability (0–1)
attribution
object
Git commit/PR attribution text
Auto Mode Classifier
{"autoMode":{"environment":["Source control: github.example.com/acme-corp","Trusted cloud buckets: s3://acme-builds","Trusted internal domains: *.corp.example.com"],"allow":["Deploying to staging is allowed"],"soft_deny":["Never run database migrations outside the migrations CLI"]}}
Warning: Setting allow or soft_denyreplaces the entire default list. Always start with claude auto-mode defaults.
CLI commands:
claude auto-mode defaults # print built-in rules
claude auto-mode config # effective config (your settings + defaults)
claude auto-mode critique # AI feedback on your custom rules
{"decision":"block","reason":"Tests not passing yet"}
Prompt/Agent hook response:
{"ok":false,"reason":"Not all tasks are complete"}
Hook Configuration Format
{"hooks":{"PostToolUse":[{"matcher":"Edit|Write","hooks":[{"type":"command","command":"jq -r '.tool_input.file_path' | xargs prettier --write","timeout":30}]}],"Stop":[{"hooks":[{"type":"prompt","prompt":"Check if all tasks are complete.","model":"haiku"}]}],"PreToolUse":[{"matcher":"Bash","hooks":[{"type":"agent","prompt":"Verify this command is safe. $ARGUMENTS","timeout":60}]}],"PostToolUse":[{"hooks":[{"type":"http","url":"http://localhost:8080/hooks/tool-use","headers":{"Authorization":"Bearer $MY_TOKEN"},"allowedEnvVars":["MY_TOKEN"]}]}]}}
{"permissions":{"defaultMode":"dontAsk","allow":["Bash(npm test)","Bash(npm run build)","Bash(npm run lint)","Read","Glob(*)","Grep(*)"],"deny":["Bash(npm publish *)","Bash(git push *)","WebFetch"]}}