Last Updated: March 02, 2026
Session Management
flag
default:"-c"
Continue the most recent conversation in the current directory
flag
default:"-r"
Resume a specific session by ID or name, or show interactive picker
string
Resume sessions linked to a specific GitHub PR (accepts NUMBER or URL)
flag
Create a new session ID when resuming (use with
--resume or --continue)string
Use a specific session ID (must be valid UUID)
flag
Disable session persistence (print mode only)
flag
Create a new web session on claude.ai
flag
Resume a web session in your local terminal
Model & Configuration
string
Set model with alias (
sonnet, opus, haiku) or full model IDstring
Auto-fallback model when default is overloaded (print mode only)
string
Beta headers to include in API requests (API key users only)
Permissions & Security
flag
Skip ALL permission prompts. Use with extreme caution
flag
Enable permission bypassing as an option without activating it
string
Begin in specified permission mode:
default, plan, acceptEdits, bypassPermissionsstring
Tools that execute without prompting (permission rule syntax)
string
Tools removed from model context entirely
string
Restrict which built-in tools Claude can use (use
"" to disable all)string
Specify MCP tool to handle permission prompts in non-interactive mode
Output & Format
flag
default:"-p"
Print response without interactive mode (headless/SDK mode)
string
Output format:
text, json, stream-jsonstring
Input format:
text, stream-jsonstring
Get validated JSON matching schema (print mode only)
flag
Include partial streaming events (requires
--print and --output-format=stream-json)flag
Enable verbose logging with full turn-by-turn output
System Prompt
string
Replace entire system prompt with custom text
string
Load system prompt from file, replacing default (print mode only)
string
Append custom text to default system prompt
string
Append file contents to default prompt (print mode only)
Agent & Subagent
string
Specify an agent for the current session
json
Define custom subagents dynamically via JSON
string
Set agent team display:
auto, in-process, tmuxMCP & Plugins
string
Load MCP servers from JSON file or string
flag
Only use MCP servers from
--mcp-config, ignore all othersstring
Load plugins from directory for this session only (repeatable)
Directory & Workspace
string
Add additional working directories for Claude to access
flag
default:"-w"
Start Claude in an isolated git worktree (branched from HEAD)
Budget & Limits
number
Maximum dollar amount for API calls before stopping (print mode only)
number
Limit number of agentic turns (print mode only)
Integration
flag
Enable Chrome browser integration for web automation
flag
Disable Chrome browser integration for this session
flag
Automatically connect to IDE on startup if exactly one valid IDE available
Initialization & Maintenance
flag
Run initialization hooks and start interactive mode
flag
Run initialization hooks and exit (no interactive session)
flag
Run maintenance hooks and exit
Debug & Diagnostics
string
Enable debug mode with optional category filtering (e.g.,
"api,hooks")Settings Override
string
Path to settings JSON file or JSON string to load
string
Comma-separated list of sources to load:
user, project, localflag
Disable all skills and slash commands for this session
Version & Help
flag
default:"-v"
Output the version number
flag
default:"-h"
Show help information
Subcommands
These are not flags but top-level subcommands run asclaude <subcommand>:
Environment Variables
These environment variables modify Claude Code behavior at startup:Experimental Features
Experimental Features
CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1— Enable experimental agent teamsCLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1— Disable experimental beta features
Performance & Optimization
Performance & Optimization
CLAUDE_CODE_TMPDIR— Override temp directory for internal filesCLAUDE_CODE_DISABLE_BACKGROUND_TASKS— Disable background task functionalityUSE_BUILTIN_RIPGREP=0— Use system ripgrep instead of built-in (Alpine Linux)
Model Configuration
Model Configuration
MAX_THINKING_TOKENS— Limit thinking token budget (set to0to disable)CLAUDE_CODE_EFFORT_LEVEL— Control thinking depth:low,medium,highCLAUDE_AUTOCOMPACT_PCT_OVERRIDE— Auto-compact threshold percentage
System Behavior
System Behavior
CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD=1— Enable additional directory CLAUDE.md loadingDISABLE_AUTOUPDATER=1— Disable auto-updatesCLAUDE_CODE_ENABLE_TASKS=false— Disable new task management system, revert to old todosCLAUDE_CODE_SHELL— Override automatic shell detectionCLAUDE_BASH_NO_LOGIN=1— Skip login shell for BashTool
File & Output
File & Output
CLAUDE_CODE_FILE_READ_MAX_OUTPUT_TOKENS— Override default file read token limitCLAUDE_CODE_EXIT_AFTER_STOP_DELAY— Auto-exit SDK mode after idle duration (ms)
Simple Mode
Simple Mode
CLAUDE_CODE_SIMPLE— Enable simple mode (Bash + Edit tools only)
Usage Examples
Sources
CLI Reference
Official CLI documentation
Headless Mode
Guide to non-interactive usage
Setup Guide
Installation and configuration
CHANGELOG
Latest updates and features
