settings.json file controls Claude Code’s behavior, permissions, and features. Settings can be configured at multiple levels with a clear hierarchy.
Settings Hierarchy
Settings are loaded from multiple locations in priority order:Managed settings cannot be overridden by users when enterprise policies are enforced.
Permission Settings
Basic Permissions
Control which tools Claude can use:Tools that are auto-approved without prompting.
Tools that require user approval before execution.
Tools that are completely blocked.
Permission Patterns
Disable Bypass Mode
When set to
"disable", prevents users from using --dangerously-skip-permissions flag.Managed Permissions
When
true, only managed settings can define permission rules. User and project-level allow/ask/deny are ignored.Sandbox Settings
Configure bash command sandboxing for enhanced security.Enable Sandbox
Enable bash command sandboxing.
Auto-approve bash commands when running in sandbox mode.
Network Restrictions
Allow binding to local network interfaces.
Allow access to all Unix sockets.
Specific Unix sockets that are allowed (e.g., Docker socket).
Domain whitelist. Supports wildcards (
*.example.com).HTTP proxy port for sandbox network access.
SOCKS proxy port for sandbox network access.
Excluded Commands
Commands that bypass the sandbox (run normally).
When
false, blocks commands in excludedCommands instead of running them unsandboxed.Full Sandbox Example
settings-bash-sandbox.json
Plugin Settings
Plugin Marketplaces
When set to empty array
[], blocks all public plugin marketplaces. Users can only install from extraKnownMarketplaces.Additional plugin marketplaces to make available.Each entry has:
name- Display nameurl- Marketplace JSON URL
Enabled Plugins
Plugins can ship a
settings.json file with default configuration that is automatically applied when the plugin is enabled.Hook Settings
When
true, only managed hooks execute. User and project hooks are ignored.When
true, disables all hooks including managed hooks.Note: disableAllHooks in non-managed settings cannot disable managed hooks when allowManagedHooksOnly is set.UI Settings
Theme
Color theme name (e.g., “dark”, “light”, “monokai”).
Enable reduced motion mode for accessibility.
Spinner Customization
Custom verbs for spinner display (e.g., “Thinking”, “Analyzing”).
Customize spinner tips.
tips- Array of custom tip stringsexcludeDefault- Whentrue, only shows custom tips
Show duration messages like “Cooked for 1m 6s”.
Model Settings
Default Model
Default model to use for new sessions.Available models:
claude-sonnet-4.6claude-opus-4.6claude-sonnet-4.5claude-haiku-4
Override model temperature (0.0 - 1.0). Default is 1.0.
Thinking Mode
Enable extended thinking mode for all requests.
Show thinking blocks and detailed processing information.
Context Settings
Custom directory for storing plan files.
Disable all skills (built-in and custom).
Tool Settings
Disallowed Tools
Tools that are completely unavailable (not shown to Claude).Common tools:
Bash,Read,Write,Edit,MultiEditGrep,Glob,FileSearchWebSearch,WebFetchMCPSearch,MCPToolTask,TaskUpdate,TaskStop
MCP Tool Search
Configure MCP tool search behavior.
"auto"- Enable when tools exceed 10% of context"auto:15"- Enable when tools exceed 15% of context"always"- Always use tool search"never"- Load all tools upfront
Environment Variables
Settings can reference environment variables:Example Configurations
Strict Security
Maximum security for enterprise environments:settings-strict.json
Permissive Development
Relaxed settings for local development:settings-lax.json
Sandbox Only
Enforce sandboxing for all bash commands:settings-bash-sandbox.json
Managed Settings Deployment
Enterprise organizations can deploy managed settings via:macOS (plist)
Windows (Registry)
Environment Variable
Validation
Before deploying settings:-
Validate JSON syntax
-
Test locally
-
Check for conflicts
- Ensure managed settings take precedence
- Verify permission rules are correct
- Test with actual workflows
Troubleshooting
Settings not taking effect
Settings not taking effect
Check:
- JSON is valid (use
jqto validate) - File is in correct location
- Restart Claude Code after changes
- Check for higher-priority settings overriding
Permission rules not working
Permission rules not working
Verify:
- Pattern syntax is correct (
Bash(git:*)) - No typos in tool names
allowManagedPermissionRulesOnlyisn’t blocking user rules- Check
/configto see active permissions
Sandbox not working
Sandbox not working
Check:
sandbox.enabledistrue- Required dependencies installed
- Platform support (Linux, macOS)
- Run
/sandboxto see status
Managed settings being overridden
Managed settings being overridden
Ensure:
- Using correct managed settings path
- File permissions are correct
allowManagedPermissionRulesOnlyis set in managed file- No
disableAllHooksin user settings
Next Steps
CLAUDE.md
Configure project context with CLAUDE.md files
plugin.json
Learn about plugin configuration