Advanced Configuration: Models, Permissions, and Profiles
Claude Code's behavior is shaped by a layered configuration system that lets you control everything from which AI model runs your tasks to which files can be edited. Mastering this configuration turns Claude Code from a general-purpose assistant into a precision tool calibrated for your exact workflow.
What You Will Learn
- Model selection strategies for different task types
- Fast mode versus standard mode
- The permission system in depth: tiers, allowlists, and deny lists
- Settings.json structure and all key options
- Environment-specific configuration patterns
Model Selection
Claude Code supports multiple Anthropic models, each with different strengths and cost profiles. You can switch models at any time during a session.
Available Models
| Model | Best For | Cost | Context |
|---|---|---|---|
| Claude Opus 4.6 | Complex architecture, multi-file refactoring, nuanced decisions | Highest | 1M tokens |
| Claude Sonnet 4.5 | Default. General coding, feature implementation, debugging | Medium | 200K tokens |
| Claude Haiku 3.5 | Quick edits, formatting, simple lookups, high-volume tasks | Lowest | 200K tokens |
Switching Models
In an active session:
/model claude-opus-4-6
/model claude-sonnet-4-5
/model claude-haiku-3-5
Or set the default in settings:
\{
"model": "claude-sonnet-4-5"
\}
Or via command line:
claude --model claude-opus-4-6
When to Use Each Model
Use Opus for tasks requiring deep reasoning:
- Designing system architecture from scratch
- Complex multi-file refactoring with many interdependencies
- Debugging subtle race conditions or memory leaks
- Writing comprehensive test suites that cover edge cases
Use Sonnet (default) for everyday development:
- Implementing features from a clear specification
- Writing CRUD endpoints and UI components
- Code reviews and documentation
- Most interactive coding sessions
Use Haiku for high-volume, low-complexity tasks:
- Formatting and style fixes across many files
- Adding type annotations to untyped code
- Generating boilerplate code
- Quick lookups and explanations
Model Selection in Subagents
You can assign different models to different subagents for cost optimization:
---
# Expensive agent for architecture decisions
model: claude-opus-4-6
---
---
# Cheaper agent for test writing
model: claude-sonnet-4-5
---
Fast Mode vs Standard Mode
Fast mode changes how Claude approaches problems by reducing deliberation and favoring quick action over careful analysis.
Standard mode: Claude considers multiple approaches, explains its reasoning, and takes a methodical path. Best for complex tasks where correctness matters more than speed.
Fast mode: Claude acts more directly with less deliberation. Best for routine tasks, quick fixes, and when you know exactly what you want.
Toggle fast mode during a session:
/fast # Enable fast mode
/fast off # Disable fast mode
Fast mode is particularly effective when combined with Haiku for simple tasks, giving you the fastest possible response times.
The Permission System in Depth
Permission Tiers
Claude Code uses a tiered permission system:
Tier 1 - Always Allowed (Built-in): Tools that cannot modify state. Includes file reads, text search, pattern matching, code navigation, and plan-mode transitions. These never require approval.
Tier 2 - Configurable: Tools that modify state but can be allowlisted. Includes file edits, shell commands, and MCP tool calls. You control which of these require approval.
Tier 3 - Always Ask: Potentially destructive operations that always require explicit approval unless in --dangerously-skip-permissions mode.
Configuring Permissions
Permissions are configured in settings.json under the permissions key:
\{
"permissions": \{
"allow": [
"Edit",
"Write",
"Bash(git:*)",
"Bash(npm test:*)",
"Bash(npx eslint:*)",
"Bash(npx prettier:*)",
"mcp__playwright__browser_navigate"
],
"deny": [
"Bash(rm -rf:*)",
"Bash(curl -X POST:*)",
"Bash(docker rm:*)"
]
\}
\}
Pattern Matching in Permissions
The Bash() permission supports glob-style matching:
Bash(git:*)ā Allow any git commandBash(npm test:*)ā Allow npm test with any argumentsBash(npx turbo build:*)ā Allow turbo buildsBash(node scripts/*.js:*)ā Allow running any JS file in scripts/
The /permissions Command
Use /permissions during a session to interactively manage your allowlist:
/permissions
Current permissions:
Allow: Edit, Bash(git:*), Bash(npm test:*)
Deny: Bash(rm -rf:*)
> Add: Bash(npx prettier:*)
> Remove: Bash(npm test:*)
Auto Mode Restrictions
When entering auto mode, Claude Code automatically removes certain dangerous permissions even if you have allowlisted them:
- Blanket shell access (
Bash(*)) - Wildcarded script interpreters (
Bash(python:*),Bash(node:*)) - Package manager run commands without specific targets
This prevents auto mode from executing arbitrary code, even if your settings would normally allow it.
Settings.json Deep Dive
The settings file supports many configuration options beyond permissions and hooks:
\{
"model": "claude-sonnet-4-5",
"permissions": \{
"allow": ["Edit", "Bash(git:*)"],
"deny": ["Bash(rm -rf:*)"]
\},
"hooks": \{
"PostToolUse": [
\{
"matcher": "Edit",
"command": "npx prettier --write $FILE_PATH",
"timeout": 10000
\}
]
\},
"mcpServers": \{
"playwright": \{
"command": "npx",
"args": ["@anthropic-ai/mcp-playwright"]
\}
\},
"disableAllHooks": false,
"autoMemory": true
\}
Settings File Locations
| Location | Scope | Example Path |
|---|---|---|
| User settings | All projects | ~/.claude/settings.json |
| Project settings | This project only | .claude/settings.json |
Project settings override user settings for the same keys.
Environment-Specific Configuration
Different environments often need different configurations. Here are patterns for managing this:
Development vs CI
For local development, you want interactive permissions and rich hooks:
// .claude/settings.json (committed to repo)
\{
"permissions": \{
"allow": ["Edit", "Bash(git:*)", "Bash(npm:*)"]
\},
"hooks": \{
"PostToolUse": [
\{
"matcher": "Edit",
"command": "npx prettier --write $FILE_PATH"
\}
]
\}
\}
For CI, you want headless mode with different constraints:
# CI pipeline
claude --dangerously-skip-permissions \
--model claude-sonnet-4-5 \
-p "Run the test suite and fix any failures"
Per-Developer Overrides
Each developer can have their own preferences in ~/.claude/settings.json while the team shares .claude/settings.json in the repository:
// ~/.claude/settings.json (personal, not committed)
\{
"model": "claude-opus-4-6",
"hooks": \{
"Notification": [
\{
"command": "osascript -e 'display notification \"Claude task done\"'"
\}
]
\}
\}
Monorepo Configuration
In a monorepo, you can have settings at multiple levels:
monorepo/
āāā .claude/
ā āāā settings.json # Shared across all apps
āāā apps/
ā āāā frontend/
ā ā āāā .claude/
ā ā āāā settings.json # Frontend-specific settings
ā āāā backend/
ā āāā .claude/
ā āāā settings.json # Backend-specific settings
āāā CLAUDE.md # Monorepo-wide instructions
Key Takeaways
- Choose models strategically: Opus for complex reasoning, Sonnet for everyday coding, Haiku for high-volume simple tasks
- Fast mode reduces deliberation for routine tasks; standard mode is better for complex problems
- The permission system uses tiers with configurable allowlists and deny lists
- Auto mode adds extra safety restrictions on top of your configured permissions
- Settings.json supports model selection, permissions, hooks, MCP servers, and memory configuration
- Use project-level settings for team conventions and user-level settings for personal preferences
- In monorepos, layer settings at the root and per-app levels for granular control

