Skip to content

Configuration: Permissions, Models, and YOLO Mode

You run Claude Code on a production repo for the first time and it asks permission for every single file read, every grep, every test run. Fifteen approval prompts later, you have barely started your task. You know there has to be a better way to configure what Claude can do autonomously versus what requires your sign-off — but the settings system has four different scopes and two different file formats.

This guide shows you how to configure Claude Code’s permissions, model selection, and auto-approve behavior so it works with you, not against you.

  • A settings.json with sensible permission rules for your workflow
  • Understanding of managed, user, project, and local scopes
  • Model configuration that balances quality and speed
  • Knowledge of when to use (and when to avoid) bypass-permissions mode

Claude Code reads configuration from multiple locations, each with different scope and precedence. From highest to lowest priority:

ScopeFile LocationWho It AffectsShared?
Managed/Library/Application Support/ClaudeCode/ (macOS)All users on the machineDeployed by IT
Local.claude/settings.local.jsonJust you, in this projectNo (gitignored)
Project.claude/settings.jsonAll collaboratorsYes (committed)
User~/.claude/settings.jsonYou, across all projectsNo

Higher-scoped settings override lower ones. If a managed policy denies a permission, nothing else can override it. If a project setting denies Bash(curl *), your user settings cannot allow it.

The permissions system controls what Claude can do without asking. This is the single most impactful configuration for your daily workflow.

Create or edit ~/.claude/settings.json for your personal defaults:

{
"$schema": "https://json.schemastore.org/claude-code-settings.json",
"permissions": {
"allow": [
"Bash(npm run lint)",
"Bash(npm run test *)",
"Bash(npm run build)",
"Bash(git diff *)",
"Bash(git log *)",
"Bash(git status)",
"Bash(git branch *)"
],
"deny": [
"Bash(curl *)",
"Bash(wget *)",
"Read(./.env)",
"Read(./.env.*)",
"Read(./secrets/**)"
]
}
}

This lets Claude run your standard dev commands without prompting, while blocking network requests and access to secrets.

Rules follow the pattern Tool or Tool(specifier) with wildcard support:

RuleWhat It Matches
BashAll bash commands
Bash(npm run *)Any npm run command
Read(./.env)Reading the .env file
Read(./secrets/**)Reading anything under secrets/
EditAll file edits
WebFetch(domain:example.com)Fetch requests to example.com

Rules are evaluated in order: deny first, then ask, then allow. The first matching rule wins.

For team-shared settings, create .claude/settings.json in your repo root:

{
"$schema": "https://json.schemastore.org/claude-code-settings.json",
"permissions": {
"allow": [
"Bash(make *)",
"Bash(go test ./...)",
"Bash(go build ./...)"
],
"deny": [
"Read(./.env)",
"Read(./config/credentials.json)",
"Bash(docker push *)"
]
}
}

Commit this file so every team member gets the same base configuration. Individual developers can override with .claude/settings.local.json.

Claude Code recommends Claude Sonnet 5 for everyday agentic coding. It is the account default on Pro, Team Standard, and Enterprise subscription seats. Opus 5 is the default on Max, Team Premium, Enterprise pay-as-you-go, the Anthropic API, Amazon Bedrock, Google Cloud’s Agent Platform, and Claude Platform on AWS; Microsoft Foundry defaults to Sonnet 4.5. Organization and managed settings can override these mappings. Fable 5 is the highest-capability tier but is never selected as the automatic account default; switch explicitly with /model fable.

Inside a session, use the /model command:

/model
# Select from available models

Fast mode is not a model switch. It runs the same Claude Opus 5 with a latency-optimized API configuration, delivering roughly 2.5x faster responses at higher per-token cost (about $10 input / $50 output per million tokens, versus the standard $5/$25). Quality and capabilities are identical — it is a speed-for-cost tradeoff, not a cheaper or weaker downgrade. Toggle it on by typing /fast and pressing Tab, or set it persistently in your user settings:

{
"fastMode": true
}

Fast mode persists across sessions and is best for interactive work where latency matters more than cost (live debugging, rapid iteration). When you toggle it off with /fast again, you stay on Opus 5 — use /model to switch to a genuinely cheaper model like Claude Sonnet 5.

In settings.json:

{
"model": "claude-sonnet-5"
}

Or via environment variable:

Terminal window
export ANTHROPIC_MODEL=claude-sonnet-5

If your team optimizes for velocity and quality over cost, you can set "model": "claude-fable-5" as the default instead. Define cheaper models explicitly in subagent frontmatter or with CLAUDE_CODE_SUBAGENT_MODEL; subagents do not universally auto-route to a cheaper tier.

ModelUse CaseTrade-off
Claude Fable 5 (/model fable)Hardest multi-file refactorings, building apps from scratch, long-running tasksTop capability; 2x Opus cost ($10/$50); included on Max and Team Premium at 50% of weekly limits, usage credits on Pro and Team Standard; unavailable with zero data retention
Claude Sonnet 5Everyday coding, agentic work, large context$2/$10 launch pricing through Aug 31; default on Pro, Team Standard, and Enterprise subscription seats
Claude Opus 5Architecture, complex refactoring, second-pass review$5/$25 premium tier; default on Max/Premium/pay-as-you-go/API and, since v2.1.207, Bedrock, Google Agent Platform, and Claude Platform on AWS
Claude Haiku 4.5High-volume, trivial edits, batch tasksCheapest (~$1/$5), least capable

Fast mode is a separate axis from model choice: it speeds up eligible Opus versions at a higher cost rather than swapping tiers. Prefer Sonnet 5 for routine work, use Opus/Fable when evals justify the premium, and use Haiku for scoped high-volume work.

Claude Code offers several permission modes that control how much you are prompted during a session:

ModeBehaviorActivate With
Manual (default)Read freely; ask before state-changing actionsDefault behavior or --permission-mode manual (v2.1.200+)
Accept Edits (acceptEdits)Auto-approve in-scope file edits and common filesystem commands; ask for other shell actions--permission-mode acceptEdits
Plan (plan)Read-only exploration and planning--permission-mode plan or /plan
Auto (auto)Background classifier checks tool calls instead of routine prompts--permission-mode auto when account/model/provider policy permits it
Don’t Ask (dontAsk)Deny anything not pre-approved by permissions.allow--permission-mode dontAsk
Bypass Permissions (bypassPermissions)Skip routine prompts; explicit ask rules and root/home deletion circuit breakers remain--dangerously-skip-permissions

To start every session in Accept Edits mode without passing the flag each time, set "permissions": {"defaultMode": "acceptEdits"} in your settings.json.

The --dangerously-skip-permissions flag skips routine approval prompts. Explicit permissions.ask rules and the root/home deletion circuit breakers still ask.

Terminal window
claude --dangerously-skip-permissions

When to use bypass mode legitimately:

  • CI/CD pipelines where Claude runs in a container and all changes go through PR review
  • Headless automation with claude -p for scripted tasks
  • Exploratory prototyping in a git branch you can discard

To prevent bypass mode entirely (for enterprise security):

// In managed-settings.json
{
"permissions": {
"disableBypassPermissionsMode": "disable"
}
}

Set environment variables that apply to every Claude Code session:

// In ~/.claude/settings.json
{
"env": {
"CLAUDE_CODE_ENABLE_TELEMETRY": "1",
"NODE_ENV": "development"
}
}

These are injected into Claude’s environment when it runs bash commands. Useful for setting up consistent dev environments across your team.

You can make extended thinking the default for all sessions:

{
"alwaysThinkingEnabled": true
}

For Opus 4.6 or Sonnet 4.6 only, you can restore the old fixed-budget mode and cap it:

Terminal window
# Opt out of adaptive thinking on Opus/Sonnet 4.6
export CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING=1
# Limit the fixed thinking budget (below the model's max output limit)
export MAX_THINKING_TOKENS=10000
# On the Anthropic API, disable thinking except on Fable 5
export MAX_THINKING_TOKENS=0

Fable 5, Sonnet 5, and Opus 4.7 or newer always use adaptive reasoning controlled by effort:

Terminal window
# Persistent env-var values: low, medium, high (default), xhigh, max
export CLAUDE_CODE_EFFORT_LEVEL=medium

Inside a session, run /effort (or use the slider in /model) to choose low, medium, high, xhigh, max, or ultracode. high is the default on Fable 5, Sonnet 5, and Opus 5; Opus 4.7 defaults to xhigh. max is session-only when selected interactively but is accepted by CLAUDE_CODE_EFFORT_LEVEL; persisted effortLevel settings accept only low, medium, high, or xhigh. ultracode is session-only, sends xhigh, and additionally enables Dynamic Workflows for substantive tasks.

For maximum security, enable sandboxing to isolate bash commands:

{
"sandbox": {
"enabled": true,
"autoAllowBashIfSandboxed": true,
"network": {
"allowedDomains": ["github.com", "*.npmjs.org", "registry.yarnpkg.com"],
"allowLocalBinding": true
}
}
}

When sandboxing is enabled, autoAllowBashIfSandboxed: true means Claude can run any bash command without prompting, since the sandbox prevents filesystem and network access outside your allowed rules.

The fastest way to explore and modify settings is the /config command inside a Claude Code session:

/config

This opens a tabbed interface where you can view your current settings, modify permissions, toggle features, and see which settings come from which scope.

“Permission denied” for commands you thought you allowed — Check for conflicting rules. Deny rules are evaluated first and take precedence. A deny rule of Bash(npm *) will block everything npm-related even if you allowed Bash(npm run test).

“Model not available” — If you set a specific model in settings.json and it is not available in your account tier, Claude Code may fail to start. Remove the model override or check your subscription level.

Settings not taking effect — Remember the precedence order. If your user setting is being overridden, check .claude/settings.json (project scope) and .claude/settings.local.json (local scope). Use /config to see the effective merged configuration.

“Cannot read settings file” — Invalid JSON syntax is the usual cause. Run your settings.json through a JSON validator. The $schema property gives you autocomplete and validation in VS Code.

With permissions and models configured, set up your IDE integration so Claude Code works alongside your editor.