Skip to content

Settings Reference

Claude Code provides a layered configuration system through settings files, environment variables, and command-line arguments.

Configuration Scopes

ScopeLocationAffectsShared?
ManagedSystem managed-settings.jsonAll users on machineIT deployed
User~/.claude/ directoryYou, across all projectsNo
Project.claude/ in repositoryAll collaboratorsYes (git)
Local.claude/*.local.* filesYou, in this repo onlyNo (gitignored)

Precedence (High to Low)

  1. Managed settings (cannot be overridden)
  2. Command line arguments
  3. Local project settings
  4. Shared project settings
  5. User settings

Settings File Locations

FeatureUserProjectLocal
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.mdCLAUDE.mdCLAUDE.local.md

settings.json Options

Core Settings

KeyDescriptionExample
modelOverride default model"claude-sonnet-4-5-20250929"
languageResponse language"japanese"
cleanupPeriodDaysSession cleanup (days)20
alwaysThinkingEnabledEnable extended thinkingtrue

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

VariableDescription
ANTHROPIC_API_KEYAPI key
ANTHROPIC_AUTH_TOKENCustom Authorization header
ANTHROPIC_CUSTOM_HEADERSCustom request headers

Model Configuration

VariableDescription
ANTHROPIC_MODELPrimary model name
ANTHROPIC_DEFAULT_SONNET_MODELSonnet model
ANTHROPIC_DEFAULT_OPUS_MODELOpus model
CLAUDE_CODE_SUBAGENT_MODELSubagent model

Cloud Providers

VariableDescription
CLAUDE_CODE_USE_BEDROCKUse AWS Bedrock
CLAUDE_CODE_USE_VERTEXUse Google Vertex AI
CLAUDE_CODE_USE_FOUNDRYUse Microsoft Foundry

Other Controls

VariableDescription
DISABLE_AUTOUPDATERDisable auto-updates
DISABLE_TELEMETRYDisable telemetry
MAX_THINKING_TOKENSExtended thinking budget
HTTP_PROXY / HTTPS_PROXYProxy server

Available Tools

ToolDescriptionPermission
AskUserQuestionMulti-choice questionsNo
BashExecute shell commandsYes
EditPrecise file editsYes
GlobFile pattern matchingNo
GrepContent searchNo
ReadRead filesNo
WriteCreate/overwrite filesYes
WebFetchFetch URL contentYes
WebSearchWeb searchYes
TaskRun subagentNo
SkillExecute SkillYes

Permission Modes

ModeDescription
defaultStandard checks, confirm each operation
acceptEditsAuto-accept file edits
planPlan mode (read-only)
dontAskAuto-reject permission prompts
bypassPermissionsSkip all permissions (dangerous)

Toggle: Press Shift+Tab or claude --permission-mode <mode>


Managed Settings Locations

SystemPath
macOS/Library/Application Support/ClaudeCode/
Linux/WSL/etc/claude-code/
WindowsC:\Program Files\ClaudeCode\