Skip to main content
A comprehensive guide to all available configuration options in Claude Code’s settings.json files. As of February 2026, Claude Code exposes 38 settings and 84 environment variables (use the "env" field in settings.json to avoid wrapper scripts).

Settings Hierarchy

Claude Code settings use a 5-level user-writable override chain plus an enforced policy layer:
Policy layer: managed-settings.json is organization-enforced and cannot be overridden by local settings.
  • deny rules have highest safety precedence and cannot be overridden by lower-priority allow/ask rules.
  • Managed settings may lock or override local behavior even if local files specify different values.

Core Configuration

General Settings

string
default:"default"
Override default model. Accepts aliases (sonnet, opus, haiku) or full model IDs
string
Set the default agent for the main conversation. Value is the agent name from .claude/agents/. Also available via --agent CLI flag
string
default:"english"
Claude’s preferred response language
number
default:30
Sessions inactive longer than this are deleted at startup
string
default:"latest"
Release channel: "stable" or "latest"
boolean
default:false
Enable extended thinking by default for all sessions
boolean
default:false
Skip WebFetch blocklist check before fetching URLs
Example:

Plans Directory

Store plan files in a custom location relative to project root.
string
default:".claude/plans/"
Directory where /plan outputs are stored
Example:
Useful for organizing planning artifacts separately from Claude’s internal files, or for keeping plans in a shared team location.

Attribution Settings

Customize attribution messages for git commits and pull requests.
string
default:"Co-authored-by"
Git commit attribution (supports trailers)
string
Pull request description attribution
boolean
default:true
DEPRECATED - Use attribution instead
Example:
Set to empty string ("") to hide attribution entirely.

Permissions

Control what tools and operations Claude can perform.

Permission Structure

Permission Modes

Tool Permission Syntax

Wildcards can appear at any position
Example:

Hooks

Execute custom shell commands at various points in Claude Code’s lifecycle.

Hook Events (16 total)

When: New or resumed sessionMatcher Support: NoUse Cases: Load context, set environment
When: Session terminatesMatcher Support: NoUse Cases: Cleanup, logging
When: Before tool executionMatcher Support: YesUse Cases: Validate commands, modify inputs
When: After tool succeedsMatcher Support: YesUse Cases: Run linters, verify output
When: Claude finishes respondingMatcher Support: NoUse Cases: Block/continue decisions
When: Subagent spawnedMatcher Support: YesUse Cases: Per-agent setup
When: Subagent completesMatcher Support: YesUse Cases: Cleanup, validation

Hook Configuration Structure

Hook Exit Codes

MCP Servers

Configure Model Context Protocol servers for extended capabilities.
boolean
Auto-approve all .mcp.json servers
array
Allowlist specific server names
array
Blocklist specific server names
Example:

Sandbox

Configure bash command sandboxing for security.
boolean
default:false
Enable bash sandboxing
boolean
default:true
Auto-approve bash when sandboxed
array
default:[]
Commands to run outside sandbox
array
default:[]
Specific Unix socket paths accessible in sandbox
boolean
default:false
Allow binding to localhost ports (macOS)
Example:

Model Configuration

Model Aliases

Effort Level (Opus 4.6)

When Opus 4.6 is selected, the /model command exposes an effort level control that adjusts how much reasoning the model applies per response.
Run /model in Claude Code, select Default (recommended) — Opus 4.6, then use ← → arrow keys to adjust the effort level.

Display & UX

Display Settings

object
Custom status line configuration
string
default:"default"
Output style (e.g., "Explanatory")
boolean
default:true
Show tips while waiting
boolean
default:true
Show progress bar in terminal
boolean
default:true
Show turn duration messages
boolean
default:true
Respect .gitignore in file picker
Example:

Environment Variables (via env)

Set environment variables for all Claude Code sessions.

Common Environment Variables

  • ANTHROPIC_API_KEY — API key for authentication
  • ANTHROPIC_AUTH_TOKEN — OAuth token
  • ANTHROPIC_BASE_URL — Custom API endpoint
  • CLAUDE_CODE_USE_BEDROCK — Use AWS Bedrock (1 to enable)
  • CLAUDE_CODE_USE_VERTEX — Use Google Vertex AI (1 to enable)
  • CLAUDE_CODE_USE_FOUNDRY — Use Microsoft Foundry (1 to enable)
  • CLAUDE_AUTOCOMPACT_PCT_OVERRIDE — Auto-compact threshold percentage (1-100). Default is ~95%. Set lower (e.g., 50) to trigger compaction earlier
  • MAX_THINKING_TOKENS — Limit thinking token budget (set to 0 to disable)
  • MCP_TIMEOUT — MCP startup timeout in ms (default: 10000)
  • MAX_MCP_OUTPUT_TOKENS — Max MCP output tokens (default: 50000)
  • ENABLE_TOOL_SEARCH — MCP tool search threshold (e.g., auto:5)

Useful Commands

/model

Switch models and adjust Opus 4.6 effort level

/config

Interactive configuration UI

/memory

View/edit all memory files

/agents

Manage subagents

/mcp

Manage MCP servers

/hooks

View configured hooks

/plugin

Manage plugins

/permissions

View and manage permission rules

--doctor

Diagnose configuration issues

Sources

Settings Documentation

Official Claude Code settings reference

Settings JSON Schema

Complete schema definition

Configuration Guide

ClaudeLog configuration guide

GitHub Examples

Community settings examples