All Flags
A flag changes how one claude run behaves.
claude --help shows 66 flags. Another 64 work but stay hidden from the help text.
This page lists both kinds in one place, grouped by what they do.
Pass a flag after claude, for example claude --model opus. Most flags last for one run only. A flag is on when you pass it, and some have a --no- twin, such as --no-chrome.
How to Read the Tables
- Documented means an official docs page names the flag, for example CLI Reference. The column
In --helpsays whether the help text shows it. - Undocumented means only the program has it. It can change or vanish in any release. Treat these flags as unstable.
- Hidden flags mostly serve the Agent SDK, the desktop app, IDE extensions, and teammate processes.
Example
# One answer, JSON out, with a spend cap
claude -p "Summarize README.md" --output-format json --max-budget-usd 1
# A careful planning session on a chosen model
claude --model opus --effort high --permission-mode plan
# Stop after three agent turns
claude -p --max-turns 3 "Fix the failing test"
Flags by Job
Start and Print Mode
Flags that choose how a run starts and how print mode reads input and writes output.
| Flag | Status | In --help | What it does |
|---|---|---|---|
- | Documented | ✅ | Prints the answer and exits, which suits pipes, and the trust dialog is skipped in this mode. |
-- | Documented | ✅ | Sets the output of print mode to text, json, or stream-. |
-- | Documented | ✅ | Sets the input of print mode to text or stream-. |
-- | Documented | ✅ | Checks the final answer against a JSON Schema. It works only with --. |
-- | Documented | ✅ | Adds the hook events to the stream, with --. |
-- | Documented | ✅ | Adds partial message chunks to the stream, with -- and stream-. |
-- | Documented | ✅ | Adds the text of subagents to the stream as assistant and user messages, with -- and stream-. |
-- | Documented | ✅ | Sends the user messages from stdin back on stdout as an acknowledgment. |
-- | Documented | ✅ | Stops at a spend limit in dollars, with -- only. |
-- | Documented | ❌ | Stops after a number of agent turns, with -- only. |
-- | Documented | ✅ | Saves nothing to disk, so the session cannot be resumed, with -- only. |
-- | Documented | ✅ | Turns on prompt suggestions, and print mode sends a prompt_ message after each turn. |
-- | Documented | ❌ | Runs Setup hooks with the init trigger and then goes on. |
-- | Documented | ❌ | Runs Setup and Session hooks and then exits. |
-- | Documented | ❌ | Runs Setup hooks with the maintenance trigger and then goes on. |
-- | Undocumented | ❌ | Writes transcript_ frames to stdout, for the SDK. |
-- | Undocumented | ❌ | Starts as a spare process for an SDK host and waits for a claim_ request. |
-- | Undocumented | ❌ | Reads the initialize request from stdin at startup so its fields apply like flags. |
-- | Undocumented | ❌ | Uses a WebSocket endpoint for SDK input and output, with - and stream-. |
-- | Undocumented | ❌ | Turns on auth status messages in SDK mode. |
-- | Undocumented | ❌ | Sets a workload tag for the attribution block, with -- only. |
-- | Undocumented | ❌ | Loads a signed configuration document from a URL and exits if it fails. |
-- | Undocumented | ❌ | With --, starts on a model that the document does not list. |
-- | Undocumented | ❌ | Gives policy settings as JSON from a parent process, for the SDK. |
-- | Undocumented | ❌ | Says that the token of the host is an organization sign-in, for desktop hosts. |
Safe Modes, Settings, and Debug
Flags that strip your setup down, load extra settings, or turn on logs.
| Flag | Status | In --help | What it does |
|---|---|---|---|
- | Documented | ✅ | Shows the help text and exits. |
- | Documented | ✅ | Prints the version number. |
- | Documented | ✅ | Turns on debug logs, and an optional filter picks the categories, such as -- or --. |
- | Undocumented | ❌ | Turns on debug mode and writes to stderr, and the flag is deprecated. |
-- | Documented | ✅ | Writes the debug logs to a file and turns on debug mode. |
-- | Documented | ✅ | Overrides the verbose setting of your config. |
-- | Documented | ✅ | Starts with a minimal setup: no hooks, no plugin sync, no auto memory, and no background work. |
-- | Documented | ✅ | Starts with all customizations off, such as CLAUDE., skills, plugins, hooks, and MCP servers. |
-- | Documented | ✅ | Removes the tools that run code and Web, and ignores user, project, and local settings. |
-- | Documented | ✅ | Draws flat text with no borders or animations, for screen readers. |
-- | Documented | ✅ | Loads more settings from a JSON file or a JSON string. |
-- | Documented | ✅ | Chooses which setting sources load: user, project, and local. |
-- | Undocumented | ❌ | Reads project settings and the . trees from another folder. |
Permissions and Tools
Flags that set the permission mode and the tools the model may use. See Permissions.
| Flag | Status | In --help | What it does |
|---|---|---|---|
-- | Documented | ✅ | Sets the permission mode of the session. |
-- | Undocumented | ❌ | Sets a permission mode from a parent session, used only when nothing else sets one. |
⚠️ -- | Documented | ✅ | Skips all permission checks, and you should use it only in a sandbox with no internet access. |
-- | Documented | ✅ | Makes skipping all permission checks a choice, without turning it on. |
-- | Documented | ✅ | Lists the tools that run without a permission prompt. |
-- | Documented | ✅ | Lists the tools that the model cannot use. |
-- | Documented | ✅ | Lists the built-in tools that the model can use. "default" uses the default set. |
-- | Documented | ✅ | Sets who answers permission prompts: host or none. |
-- | Documented | ❌ | Names an MCP tool that answers permission prompts, with -- only. |
-- | Undocumented | ❌ | Replaces the default steps of plan mode with your own text. |
Model and Thinking
Flags that pick the model and set how hard it thinks.
| Flag | Status | In --help | What it does |
|---|---|---|---|
-- | Documented | ✅ | Sets the model with an alias such as opus or with a full name. |
-- | Documented | ✅ | Sets the effort level of the session. |
-- | Documented | ✅ | Sets one or more models to try when the main model is overloaded or not available. |
-- | Documented | ✅ | Adds beta headers to API requests, for API key users only. |
-- | Documented | ❌ | Turns on the server-side advisor tool with the model that you name. |
-- | Undocumented | ❌ | Sets the thinking mode: enabled (the same as adaptive) or disabled. |
-- | Undocumented | ❌ | Sets how the thinking text appears in the response. |
⛔ -- | Undocumented | ❌ | Sets a thinking token limit, and the flag is deprecated in favor of --. |
-- | Undocumented | ❌ | Sets a task budget in tokens on the API side (output_). |
-- | Undocumented | ❌ | Turns fast mode on or off. |
-- | Undocumented | ❌ | Offers models that your account can use and this version does not know. |
-- | Documented | ✅ | Sets the auto-compact window to auto or to 100k to 1M tokens. |
System Prompt
Flags that replace or extend the system prompt. See System Prompt.
| Flag | Status | In --help | What it does |
|---|---|---|---|
-- | Documented | ✅ | Replaces the system prompt for the session. |
-- | Documented | ❌ | Reads the system prompt from a file. |
-- | Documented | ✅ | Adds text to the end of the default system prompt. |
-- | Documented | ❌ | Reads text from a file and adds it to the end of the default system prompt. |
-- | Documented | ❌ | Adds text to the system prompt of every subagent, with -- only. |
-- | Documented | ❌ | Reads text from a file and adds it to every subagent prompt, with -- only. |
-- | Documented | ✅ | Sets whether the system prompt is recorded once and reused on every request and resume. |
-- | Documented | ✅ | Moves the data of the machine from the system prompt to the first user message for better cache reuse. |
Sessions and Worktrees
Flags that continue, fork, name, or rewind a session, or run it in a worktree or the background. See Sessions and Storage.
| Flag | Status | In --help | What it does |
|---|---|---|---|
- | Documented | ✅ | Continues the newest conversation of the current folder. |
- | Documented | ✅ | Resumes a conversation by session ID or name, or opens the picker. |
-- | Documented | ✅ | Creates a new session ID when you resume, with -- or --. |
-- | Documented | ✅ | Resumes a session that links to a pull request. |
-- | Documented | ✅ | Uses a UUID that you give as the session ID. |
- | Documented | ✅ | Sets the display name of the session. |
-- | Undocumented | ❌ | Resumes only up to one message of the chain, with -- in print mode. |
-- | Undocumented | ❌ | Names the turn that a truncating resume drops, and the resume fails if more would go. |
-- | Undocumented | ❌ | Asks the model to reply at once when the transcript ends with a user message. |
-- | Undocumented | ❌ | Restores the files to the state at a user message and exits, and it needs --. |
-- | Documented | ✅ | Starts the session in the background and prints its ID. |
- | Documented | ✅ | Creates a new git worktree for the session. |
-- | Documented | ✅ | Creates a tmux session for the worktree, and it needs --. |
Agents, Plugins, MCP, and Context
Flags that add agents, plugins, MCP servers, folders, and files.
| Flag | Status | In --help | What it does |
|---|---|---|---|
-- | Documented | ✅ | Sets the agent of the session and overrides the agent setting. |
-- | Documented | ✅ | Defines custom agents with JSON or a file. |
-- | Documented | ✅ | Loads MCP servers from JSON files or strings. |
-- | Documented | ✅ | Uses only the MCP servers from --. |
-- | Documented | ✅ | Loads a plugin from a folder or a . file for this session only. |
-- | Documented | ✅ | Fetches a plugin . file from a URL for this session only. |
-- | Undocumented | ❌ | Works like -- but does not read the . of the plugin. |
-- | Documented | ✅ | Turns off all skills and commands. |
-- | Documented | ✅ | Gives the tools access to more folders. |
-- | Undocumented | ✅ | Turns on the Send tool so the agent can message the user. |
-- | Undocumented | ✅ | Downloads file resources at startup, in the form file_. |
-- | Documented | ❌ | Lists the MCP servers whose channel notifications may register this session. |
⚠️ -- | Documented | ❌ | Loads channel servers that are not on the allowlist, for local development only. |
-- | Undocumented | ❌ | Watches a Claude artifact for new versions and comments. |
-- | Undocumented | ❌ | Watches an artifact and does not react to it by itself. |
-- | Undocumented | ❌ | Sets the socket or pipe path of the cross-session messaging server. |
-- | Undocumented | ❌ | Sets the level of proactivity, and the bundle gives no help text. |
Teammate Flags
Flags that a lead agent passes to a teammate process it starts. You rarely set them by hand.
| Flag | Status | In --help | What it does |
|---|---|---|---|
-- | Undocumented | ❌ | Sets the ID of a teammate agent. |
-- | Undocumented | ❌ | Sets the display name of a teammate. |
-- | Undocumented | ❌ | Sets the team name for teammate coordination. |
-- | Undocumented | ❌ | Sets the UI color of a teammate. |
-- | Undocumented | ❌ | Requires plan mode before the teammate implements anything. |
-- | Documented | ❌ | Sets the mode of a teammate, and the bundle gives no help text. |
-- | Undocumented | ❌ | Sets a custom agent type for a teammate. |
-- | Undocumented | ❌ | Gives the parent session ID for analytics. |
IDE, Desktop, and Deep Links
Flags that connect to an IDE, the desktop app, or a deep link.
| Flag | Status | In --help | What it does |
|---|---|---|---|
-- | Documented | ✅ | Connects to the IDE at startup when exactly one valid IDE is open. |
-- | Documented | ✅ | Opens the session in the Claude Desktop app instead of the terminal. |
-- | Documented | ✅ | Turns on the Claude in Chrome integration. |
-- | Documented | ✅ | Turns off the Claude in Chrome integration. |
-- | Undocumented | ❌ | Fills the prompt box with text and does not send it. |
-- | Undocumented | ❌ | Fills the prompt box with base64url text, for deep links. |
-- | Undocumented | ❌ | Says that a deep link started this session. |
-- | Undocumented | ❌ | Gives the repo slug that the deep link resolved to the current folder. |
-- | Undocumented | ❌ | Gives the time of the last fetch of the repo, in milliseconds. |
-- | Undocumented | ❌ | Gives the working folder as base64url text, for deep links. |
Cloud and Remote Sessions
Flags for cloud sessions and Remote Control.
| Flag | Status | In --help | What it does |
|---|---|---|---|
-- | Documented | ✅ | Resumes a teleport session. |
-- | Documented | ✅ | Creates a cloud session, or attaches to one by session ID or claude. URL. |
-- | Documented | ✅ | Creates a cloud session on a self-hosted environment. |
-- | Documented | ✅ | Starts an interactive session with Remote Control turned on. |
-- | Documented | ❌ | Is an alias for --. |
-- | Documented | ✅ | Sets the prefix of the names that Remote Control makes, and the default is the host name. |
⛔ -- | Documented | ❌ | Is a deprecated alias for --. |
⛔ -- | Undocumented | ❌ | Is a deprecated alias for --. |
-- | Undocumented | ❌ | Sets an ID that goes back to the environment orchestrator, and it needs --. |
-- | Documented | ❌ | Sets the branch, tag, or SHA to check out in the remote session, and it needs -- or --. |
-- | Undocumented | ❌ | Works directly on a branch in the remote session, with checkout and push. |
-- | Undocumented | ❌ | Sets whether this machine sends its settings to the cloud session. |
-- | Undocumented | ❌ | Attaches a helper to a cloud session, and the desktop app starts it. |
Related Pages
- CLI Overview
- Subcommands
- Environment Variables for variables that match many flags.
- Permission Modes for the values of
--permission-mode.