Overview
Settings control permissions, behavior, output style, and integrations in Claude Code. Configuration follows a hierarchy where more specific settings override broader ones.Settings Hierarchy
Settings are evaluated in order, with the first match winning:Project settings override user settings. CLI flags override everything. Use
.local.json for personal preferences and secrets.Permission Modes
Control how Claude Code requests approval for operations.Permission level for tool usage
| Mode | Behavior |
|---|---|
default | Ask for dangerous operations |
acceptEdits | Auto-approve file edits, ask for shell |
askEdits | Ask for everything including edits |
dontAsk | Auto-approve everything (trusted environments) |
viewOnly | Read-only, no modifications |
bypassPermissions | Skip all checks (CI/CD only) |
plan | Research and plan, require approval to execute |
Set via CLI
Permission Rules
Fine-grained control over tool access using allow/deny/ask rules.Wildcard Syntax
Permission rules support glob patterns for flexible matching:| Pattern | Matches |
|---|---|
Bash(npm run *) | Any npm script |
Edit(/src/**) | Any file under src/ recursively |
WebFetch(domain:*.github.com) | Any GitHub subdomain |
MCP(github:*) | Any tool from github MCP server |
Task(planner) | Only the planner subagent |
Agent(*) | Any agent type |
Core Settings
Output Style
Controls verbosity and tone of Claude’s responses
"Concise"- Minimal explanations, action-focused"Explanatory"- Balanced context and detail"Learning"- Educational mode with extra context"Custom:<instructions>"- Custom output instructions
Status Line
Configure the status bar displaySpace-separated list of:
model, branch, tokens, cost, timePlans Directory
Directory for storing plan mode artifacts
File Suggestion
Enable automatic file suggestions during conversation
Fast Mode
Enable fast mode by default (billed to extra usage)
Reduced Motion
Disable animations and spinners for accessibility
Context Management
Auto-Compact Threshold
Trigger automatic compaction at this percentage of context windowLower values (50-80) enable more proactive compaction for long sessions.
Why lower the threshold?
Why lower the threshold?
Default auto-compact triggers at ~95% context usage. Setting it lower (e.g.,
50 or 80) causes Claude to proactively compact context more frequently, which is useful for long sessions or complex codebases.UI Customization
Spinner Verbs
Customize loading spinner verbs
Spinner Tips
Override default loading tips
Attribution
Template for commit attribution footer
Template for pull request attribution footer
Set to empty strings to disable “Co-Authored-By” footers in commits and PRs.
Sandbox Configuration
Filesystem access restrictions
Network access restrictions
Environment Variables
Key environment variables that affect Claude Code behavior:| Variable | Purpose |
|---|---|
CLAUDE_AUTOCOMPACT_PCT_OVERRIDE | Trigger compaction earlier (default ~95) |
CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS | Enable agent teams feature |
CLAUDE_CODE_TMPDIR | Custom temp directory |
DISABLE_AUTOUPDATER | Prevent automatic updates |
CLAUDE_CODE_SIMPLE | Simplified output mode |
CLAUDE_SESSION_ID | Custom session identifier |
Scope: Global vs Project
Understand what configuration lives where:| Feature | Global Only | Dual Scope |
|---|---|---|
| Tasks & Task Lists | ✓ | |
| Agent Teams | ✓ | |
| Auto Memory | ✓ | |
| Credentials/Auth | ✓ | |
| Keybindings | ✓ | |
| MCP User Servers | ✓ | |
| CLAUDE.md | ✓ | |
| Settings | ✓ | |
| Agents | ✓ | |
| Commands | ✓ | |
| Skills | ✓ | |
| Hooks | ✓ | |
| MCP Project Servers | ✓ | |
| Rules | ✓ |
- Global =
~/.claude/ - Project =
.claude/
Production Example
CLI Flags
Override settings with command-line arguments:Next Steps
MCP Servers
Configure Model Context Protocol integrations
Quality Gates
Set up automated validation checks
Model Preferences
Configure task-specific model routing