Last Updated: March 02, 2026
Session Management
Continue the most recent conversation in the current directory
Resume a specific session by ID or name, or show interactive picker
Resume sessions linked to a specific GitHub PR (accepts NUMBER or URL)
Create a new session ID when resuming (use with
--resume or --continue)Use a specific session ID (must be valid UUID)
Disable session persistence (print mode only)
Create a new web session on claude.ai
Resume a web session in your local terminal
Model & Configuration
Set model with alias (
sonnet, opus, haiku) or full model IDAuto-fallback model when default is overloaded (print mode only)
Beta headers to include in API requests (API key users only)
Permissions & Security
Skip ALL permission prompts. Use with extreme caution
Enable permission bypassing as an option without activating it
Begin in specified permission mode:
default, plan, acceptEdits, bypassPermissionsTools that execute without prompting (permission rule syntax)
Tools removed from model context entirely
Restrict which built-in tools Claude can use (use
"" to disable all)Specify MCP tool to handle permission prompts in non-interactive mode
Output & Format
Print response without interactive mode (headless/SDK mode)
Output format:
text, json, stream-jsonInput format:
text, stream-jsonGet validated JSON matching schema (print mode only)
Include partial streaming events (requires
--print and --output-format=stream-json)Enable verbose logging with full turn-by-turn output
System Prompt
Replace entire system prompt with custom text
Load system prompt from file, replacing default (print mode only)
Append custom text to default system prompt
Append file contents to default prompt (print mode only)
Agent & Subagent
Specify an agent for the current session
Define custom subagents dynamically via JSON
Set agent team display:
auto, in-process, tmuxMCP & Plugins
Load MCP servers from JSON file or string
Only use MCP servers from
--mcp-config, ignore all othersLoad plugins from directory for this session only (repeatable)
Directory & Workspace
Add additional working directories for Claude to access
Start Claude in an isolated git worktree (branched from HEAD)
Budget & Limits
Maximum dollar amount for API calls before stopping (print mode only)
Limit number of agentic turns (print mode only)
Integration
Enable Chrome browser integration for web automation
Disable Chrome browser integration for this session
Automatically connect to IDE on startup if exactly one valid IDE available
Initialization & Maintenance
Run initialization hooks and start interactive mode
Run initialization hooks and exit (no interactive session)
Run maintenance hooks and exit
Debug & Diagnostics
Enable debug mode with optional category filtering (e.g.,
"api,hooks")Settings Override
Path to settings JSON file or JSON string to load
Comma-separated list of sources to load:
user, project, localDisable all skills and slash commands for this session
Version & Help
Output the version number
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
