Settings Reference
Claude Code provides a layered configuration system through settings files, environment variables, and command-line arguments.
Configuration Scopes
| Scope | Location | Affects | Shared? |
|---|---|---|---|
| Managed | System managed-settings.json | All users on machine | IT deployed |
| User | ~/.claude/ directory | You, across all projects | No |
| Project | .claude/ in repository | All collaborators | Yes (git) |
| Local | .claude/*.local.* files | You, in this repo only | No (gitignored) |
Precedence (High to Low)
- Managed settings (cannot be overridden)
- Command line arguments
- Local project settings
- Shared project settings
- User settings
Settings File Locations
| Feature | User | Project | Local |
|---|---|---|---|
| Settings | ~/.claude/settings.json | .claude/settings.json | .claude/settings.local.json |
| Subagents | ~/.claude/agents/ | .claude/agents/ | — |
| MCP | ~/.claude.json | .mcp.json | ~/.claude.json (per-project) |
| Memory | ~/.claude/CLAUDE.md | CLAUDE.md | CLAUDE.local.md |
settings.json Options
Core Settings
| Key | Description | Example |
|---|---|---|
model | Override default model | "claude-sonnet-4-5-20250929" |
language | Response language | "japanese" |
cleanupPeriodDays | Session cleanup (days) | 20 |
alwaysThinkingEnabled | Enable extended thinking | true |
Permission Configuration
{
"permissions": {
"allow": [
"Bash(npm run lint)",
"Bash(npm run test:*)"
],
"deny": [
"Bash(curl:*)",
"Read(./.env)",
"Read(./secrets/**)"
],
"additionalDirectories": ["../docs/"],
"defaultMode": "default"
}
}Sandbox Configuration
{
"sandbox": {
"enabled": true,
"autoAllowBashIfSandboxed": true,
"excludedCommands": ["docker", "git"],
"network": {
"allowUnixSockets": ["/var/run/docker.sock"],
"allowLocalBinding": true
}
}
}Environment Variables
Authentication
| Variable | Description |
|---|---|
ANTHROPIC_API_KEY | API key |
ANTHROPIC_AUTH_TOKEN | Custom Authorization header |
ANTHROPIC_CUSTOM_HEADERS | Custom request headers |
Model Configuration
| Variable | Description |
|---|---|
ANTHROPIC_MODEL | Primary model name |
ANTHROPIC_DEFAULT_SONNET_MODEL | Sonnet model |
ANTHROPIC_DEFAULT_OPUS_MODEL | Opus model |
CLAUDE_CODE_SUBAGENT_MODEL | Subagent model |
Cloud Providers
| Variable | Description |
|---|---|
CLAUDE_CODE_USE_BEDROCK | Use AWS Bedrock |
CLAUDE_CODE_USE_VERTEX | Use Google Vertex AI |
CLAUDE_CODE_USE_FOUNDRY | Use Microsoft Foundry |
Other Controls
| Variable | Description |
|---|---|
DISABLE_AUTOUPDATER | Disable auto-updates |
DISABLE_TELEMETRY | Disable telemetry |
MAX_THINKING_TOKENS | Extended thinking budget |
HTTP_PROXY / HTTPS_PROXY | Proxy server |
Available Tools
| Tool | Description | Permission |
|---|---|---|
AskUserQuestion | Multi-choice questions | No |
Bash | Execute shell commands | Yes |
Edit | Precise file edits | Yes |
Glob | File pattern matching | No |
Grep | Content search | No |
Read | Read files | No |
Write | Create/overwrite files | Yes |
WebFetch | Fetch URL content | Yes |
WebSearch | Web search | Yes |
Task | Run subagent | No |
Skill | Execute Skill | Yes |
Permission Modes
| Mode | Description |
|---|---|
default | Standard checks, confirm each operation |
acceptEdits | Auto-accept file edits |
plan | Plan mode (read-only) |
dontAsk | Auto-reject permission prompts |
bypassPermissions | Skip all permissions (dangerous) |
Toggle: Press Shift+Tab or claude --permission-mode <mode>
Managed Settings Locations
| System | Path |
|---|---|
| macOS | /Library/Application Support/ClaudeCode/ |
| Linux/WSL | /etc/claude-code/ |
| Windows | C:\Program Files\ClaudeCode\ |