--add-dir | Add additional working directories for Claude to access (validates each path exists as a directory) | claude --add-dir ../apps ../lib |
--agent | Specify an agent for the current session (overrides the agent setting) | claude --agent my-custom-agent |
--agents | Define custom subagents dynamically via JSON (see below for format) | claude --agents '{"reviewer":{"description":"Reviews code","prompt":"You are a code reviewer"}}' |
--allowedTools | A list of tools that should be allowed without prompting the user for permission, in addition to settings.json files | "Bash(git log:*)" "Bash(git diff:*)" "Read" |
--append-system-prompt | Append custom text to the end of the default system prompt (works in both interactive and print modes) | claude --append-system-prompt "Always use TypeScript" |
--betas | Beta headers to include in API requests (API key users only) | claude --betas interleaved-thinking |
--continue, -c | Load the most recent conversation in the current directory | claude --continue |
--dangerously-skip-permissions | Skip permission prompts (use with caution) | claude --dangerously-skip-permissions |
--debug | Enable debug mode with optional category filtering (for example, "api,hooks" or "!statsig,!file") | claude --debug "api,mcp" |
--disallowedTools | A list of tools that should be disallowed without prompting the user for permission, in addition to settings.json files | "Bash(git log:*)" "Bash(git diff:*)" "Edit" |
--fallback-model | Enable automatic fallback to specified model when default model is overloaded (print mode only) | claude -p --fallback-model sonnet "query" |
--fork-session | When resuming, create a new session ID instead of reusing the original (use with --resume or --continue) | claude --resume abc123 --fork-session |
--ide | Automatically connect to IDE on startup if exactly one valid IDE is available | claude --ide |
--include-partial-messages | Include partial streaming events in output (requires --print and --output-format=stream-json) | claude -p --output-format stream-json --include-partial-messages "query" |
--input-format | Specify input format for print mode (options: text, stream-json) | claude -p --output-format json --input-format stream-json |
--json-schema | Get validated JSON output matching a JSON Schema after agent completes its workflow (print mode only, see Agent SDK Structured Outputs) | claude -p --json-schema '{"type":"object","properties":{...}}' "query" |
--max-turns | Limit the number of agentic turns in non-interactive mode | claude -p --max-turns 3 "query" |
--mcp-config | Load MCP servers from JSON files or strings (space-separated) | claude --mcp-config ./mcp.json |
--model | Sets the model for the current session with an alias for the latest model (sonnet or opus) or a model’s full name | claude --model claude-sonnet-4-5-20250929 |
--output-format | Specify output format for print mode (options: text, json, stream-json) | claude -p "query" --output-format json |
--permission-mode | Begin in a specified permission mode | claude --permission-mode plan |
--permission-prompt-tool | Specify an MCP tool to handle permission prompts in non-interactive mode | claude -p --permission-prompt-tool mcp_auth_tool "query" |
--plugin-dir | Load plugins from directories for this session only (repeatable) | claude --plugin-dir ./my-plugins |
--print, -p | Print response without interactive mode (see SDK documentation for programmatic usage details) | claude -p "query" |
--resume, -r | Resume a specific session by ID, or by choosing in interactive mode | claude --resume abc123 "query" |
--session-id | Use a specific session ID for the conversation (must be a valid UUID) | claude --session-id "550e8400-e29b-41d4-a716-446655440000" |
--setting-sources | Comma-separated list of setting sources to load (user, project, local) | claude --setting-sources user,project |
--settings | Path to a settings JSON file or a JSON string to load additional settings from | claude --settings ./settings.json |
--strict-mcp-config | Only use MCP servers from --mcp-config, ignoring all other MCP configurations | claude --strict-mcp-config --mcp-config ./mcp.json |
--system-prompt | Replace the entire system prompt with custom text (works in both interactive and print modes) | claude --system-prompt "You are a Python expert" |
--system-prompt-file | Load system prompt from a file, replacing the default prompt (print mode only) | claude -p --system-prompt-file ./custom-prompt.txt "query" |
--tools | Specify the list of available tools from the built-in set (use "" to disable all, "default" for all, or tool names like "Bash,Edit,Read") | claude -p --tools "Bash,Edit,Read" "query" |
--verbose | Enable verbose logging, shows full turn-by-turn output (helpful for debugging in both print and interactive modes) | claude --verbose |
--version, -v | Output the version number | claude -v |