Every CLI flag, and where it lived
272 CLI flags One tick per build on this box, oldest on the left. A gap is a build the CLI flag was not in.○ not in v2.1.308, ◇ we found no documentation describing it.
CLI flagWhat it doesSpan v2.1.138 → v2.1.308 Status
--ablation ◇ Plugin eval prompts now go over stdin and runs ignore project settings, so long prompts survive intact.v2.1.198 → v2.1.308 ◆in the build
--add-dir Add additional working directories for Claude to read and edit files. Grants file access; Claude Code doesn't discover most .claude/ configuration from these directories. Validates that each path exists as a directory. You can't add most network paths, such as \\server\share. To persist these directories across sessions, set permissions.additionalDirectories in settingsv2.1.138 or earlier → v2.1.308 ◆in the build
--agent Specify an agent for the current session (overrides the agent setting)v2.1.138 or earlier → v2.1.308 ◆in the build
--agents Define custom subagents dynamically via JSON. Accepts the fields listed for CLI-defined subagents. With --print, the value can instead be the path to a JSON file holding the object; the file form requires Claude Code v2.1.281 or later. Claude Code validates the value at startup and exits on an invalid one; see Invalid --agents configuration for the message and for the flags and environment variable that skip the validation. Validation requires Claude Code v2.1.242 or laterv2.1.138 or earlier → v2.1.308 ◆in the build
--all ◇ Repos with lots of dead history are no longer squashed or rejected based on pack file size.v2.1.138 or earlier → v2.1.308 ◆in the build
--allow-dangerously-skip-permissions Add bypassPermissions to the Shift+Tab mode cycle without starting in it. Lets you begin in a different mode like plan and switch to bypassPermissions later. See permission modesv2.1.138 or earlier → v2.1.308 ◆in the build
--allow-real-servers ◇ claude plugin eval adds --trust-plugin for CI and --allow-real-servers to run real MCP servers without mocksv2.1.269 → v2.1.308 ◆in the build
--allow-tools ◇ Eval results now list which stand-in servers answered and count calls nothing covered.v2.1.198 → v2.1.308 ◆in the build
--allowed ◇ No description from anybody.v2.1.138 or earlier → v2.1.308 ◆in the build
--allowed-tools Tools that execute without prompting for permission. See permission rule syntax for pattern matching. To restrict which tools are available, use --tools instead. If you name one of the task-tracking tools here, Claude Code also opts the session inv2.1.138 or earlier → v2.1.308 ◆in the build
--allowedTools Tools that execute without prompting for permission. See permission rule syntax for pattern matching. To restrict which tools are available, use --tools instead. If you name one of the task-tracking tools here, Claude Code also opts the session innever mined ·never mined
--api-url ◇ The setup wizard spawns a detached runner into ./runner-setup and warns it outlives your session.never mined ·never mined
--append-system-prompt Append custom text to the end of the default system promptnever mined ·never mined
--author ◇ --author <name> is an option of claude plugin init <name>. It sets author.name in the scaffolded .claude-plugin/plugin.json, defaulting to git config user.name; when neither gives a name the manifest gets no author and --author-email is ignored with a warning. --author is also on the Bash permission check's read-only safe-flag lists for git log, git reflog, git rev-list, git shortlog, gh pr list, gh issue list and gh search issues|prs|commits, and Claude Code passes it itself to git log (your git email, when picking example files) and to gh issue list --author @me (your recently closed anthropics/claude-code issues).v2.1.157 → v2.1.308 ◆in the build
--author-email ◇ --author-email <email> is an option of claude plugin init <name>, which scaffolds a new plugin at ~/.claude/skills/<name>/. It sets the author email in the manifest, defaulting to git config user.email. It is also on the list of flags treated as safe for gh search commits.v2.1.157 → v2.1.308 ◆in the build
--autocompact Set the auto-compact window for this session without changing your saved settings. Accepts the same values as /autocompact; that section covers the value forms and what overrides the flag. Requires Claude Code v2.1.221 or laternever mined ·never mined
--available ◇ Option of claude plugin list that only acts together with --json; without --json it is accepted and ignored. With it the JSON becomes {installed, available}, where available lists the plugins in your configured marketplaces that are not already installed, each with its id, name, description, marketplace, version, source and install count. Errors while reading the marketplaces are swallowed, so available can come back short or empty.v2.1.138 or earlier → v2.1.308 ◆in the build
--background Start the session as a background agent and return immediately. Prints the session ID and management commands. Combine with --exec to run a shell command as a background job instead of a Claude session, or with --agent to run a specific subagent. Checks workspace trust for the directory before it starts. Can't be combined with -p/--print; see the error referencenever mined ·never mined
--bare Minimal mode: skip auto-discovery of hooks, skills, custom commands, subagents, installed plugins, MCP servers, auto memory, and CLAUDE.md so scripted calls start faster. Skills in a directory you pass with --add-dir still load. Claude has access to Bash, file read, and file edit tools. Sets CLAUDE_CODE_SIMPLE. See bare modev2.1.138 or earlier → v2.1.308 ◆in the build
--base-dir ◇ The setup wizard spawns a detached runner into ./runner-setup and warns it outlives your session.never mined ·never mined
--batch ◇ Uploaded git bundles are verified against your own checkout before being sent.never mined ·never mined
--betas Beta headers to include in API requests (API key users only)v2.1.138 or earlier → v2.1.308 ◆in the build
--bg Start the session as a background agent and return immediately. Prints the session ID and management commands. Combine with --exec to run a shell command as a background job instead of a Claude session, or with --agent to run a specific subagent. Checks workspace trust for the directory before it starts. Can't be combined with -p/--print; see the error referencenever mined ·never mined
--body ◇ Approving commit and PR permissions now allows only specific flags, not any git or gh arguments.never mined ·never mined
--cacheinfo ◇ Snapshots read git attributes from the right place in linked worktrees, and explain symlinked .gitattributes failures.never mined ·never mined
--callback-port ◇ When an MCP server rejects Claude Code's automatic sign-in registration, Claude Code now suggests concrete next steps instead of a bare errorv2.1.138 or earlier → v2.1.308 ◆in the build
--case ◇ Eval reports can now include advisory notes per case.v2.1.198 → v2.1.308 ◆in the build
--channels (Research preview) MCP servers whose channel notifications Claude should listen for in this session. Space-separated list of plugin:<name>@<marketplace> entries. Requires Anthropic authentication through claude.ai or a Console API keynever mined ·never mined
--chrome Enable Chrome browser integration for web automation and testingv2.1.138 or earlier → v2.1.308 ◆in the build
--claudeai ◇ You can now add a claude.ai-hosted plugin marketplace with a new --claudeai flag.v2.1.138 or earlier → v2.1.308 ◆in the build
--client-data-url ◇ --client-data-url or CLAUDE_CODE_CLIENT_DATA_URL loads a signed per-model configuration from Anthropic, and Claude Code will not start if it failsv2.1.283 → v2.1.286 ○gone
--client-id ◇ When an MCP server rejects Claude Code's automatic sign-in registration, Claude Code now suggests concrete next steps instead of a bare errorv2.1.138 or earlier → v2.1.308 ◆in the build
--client-label ◇ The runner command accepts --client-label <name>, listed in its help output.never mined ·never mined
--client-secret ◇ When an MCP server rejects Claude Code's automatic sign-in registration, Claude Code now suggests concrete next steps instead of a bare errorv2.1.138 or earlier → v2.1.308 ◆in the build
--cloud With a task description, create a new cloud session. With a session ID (session_... or cse_...) or a claude.ai/code URL, queue a message into that existing session instead, with -p. See send a follow-up message.never mined ·never mined
--comment ◇ The /review hint now spells out that you can pass a PR number, branch or path.never mined ·never mined
--concurrency ◇ claude plugin eval gains a --concurrency flag to run up to 8 test cases at oncev2.1.269 → v2.1.308 ◆in the build
--config ◇ docker logs and docker inspect stop running automatically as read-only when given connection flags or tilde pathsv2.1.147 → v2.1.308 ◆in the build
--configure-git ◇ --configure-git sets a commit identity and installs SSH commit signing backed by a code-sign subcommand.never mined ·never mined
--confine-repo-settings ◇ The runner can warn about or block repo-committed settings that grant access outside the workspace.never mined ·never mined
--console ◇ Option of claude auth login that signs in through the Anthropic Console authorize URL (API usage billing) instead of the default Claude subscription flow. Combining it with --claudeai exits with an error. A forceLoginMethod setting overrides it, and it has no effect when CLAUDE_CODE_OAUTH_REFRESH_TOKEN is set.v2.1.138 or earlier → v2.1.308 ◆in the build
--continue Load the most recent conversation in the current directory, including a background session that has finished; opening finished background sessions requires Claude Code v2.1.257 or later. Skips sessions created with claude -p or the Agent SDK, and sessions whose first prompt was /loop. claude -p --continue includes -p, SDK, and /loop sessions. Includes sessions that added this directory with /add-dirv2.1.138 or earlier → v2.1.308 ◆in the build
--correlation-id ◇ Start a cloud session on your own environment with claude --environment, plus hidden --ref and --on-branch companions.never mined ·never mined
--cwd ◇ On claude agents, --cwd <path> shows only background sessions started under <path>, and Claude Code passes it back when it relaunches that view to update. On the hidden claude import-conversations <exportPath> command (enabled by CLAUDE_IMPORT_CONVERSATIONS), --cwd <dir> is required and sets the directory the imported sessions anchor to. Claude Code also passes --cwd to other programs: WezTerm's start --cwd when opening a terminal in a directory, and bun run --cwd ${CLAUDE_PLUGIN_ROOT} in the .mcp.json that claude plugin init --with channel scaffolds.v2.1.141 → v2.1.308 ◆in the build
--dangerously-skip-permissions Skip permission prompts. Equivalent to --permission-mode bypassPermissions. See permission modes for what this does and does not skip. For sessions started with --bg, the mode persists when the supervisor restarts the sessionv2.1.138 or earlier → v2.1.308 ◆in the build
--data-size ◇ With --json, claude plugin list accepts --data-size to report how big a plugin's data folder is, and lists more details per pluginv2.1.285 → v2.1.308 ◆in the build
--debug Enable debug mode with optional category filtering, such as --debug='mcp,startup' or --debug='!1p'. The filter binds only in the = form; a space-separated filter enables debug mode without filteringv2.1.138 or earlier → v2.1.308 ◆in the build
--debug-file Write debug logs to a specific file path. Implicitly enables debug mode. Takes precedence over CLAUDE_CODE_DEBUG_LOGS_DIRv2.1.138 or earlier → v2.1.308 ◆in the build
--debug-to-stderr ◇ Debug logging now runs through one logger that keeps queued lines when it restarts.never mined ·never mined
--defer-shutdown-max-min ◇ Self-hosted runners can keep serving attached sessions on the first shutdown signal instead of draining.never mined ·never mined
--description ◇ --description <text> is an option of claude plugin init <name>. It sets the description field of the scaffolded .claude-plugin/plugin.json; without it the field reads TODO: describe what this plugin provides.v2.1.157 → v2.1.308 ◆in the build
--desktop ◇ --desktop opens the Claude Desktop app and now errors when combined with background or worktree optionsv2.1.285 → v2.1.308 ◆in the build
--disable-slash-commands Disable all skills and commands for this sessionv2.1.138 or earlier → v2.1.308 ◆in the build
--disabled ◇ Plugin listing now offers --enabled and --disabled filters in tab completion.never mined ·never mined
--disallow-tools ◇ A command that runs case files gains --disallow-tools, which keeps chosen built-in tools from Claude in every casev2.1.299 → v2.1.308 ◆in the build
--disallowed ◇ No description from anybody.v2.1.138 or earlier → v2.1.308 ◆in the build
--disallowed-tools Deny rules. A bare tool name removes the matching tools from Claude's context: "Edit" removes Edit, "" removes every tool, and "mcp__" removes every MCP tool. A scoped rule such as Bash(rm *) leaves the tool available and denies only calls that match as written. A rule naming EndConversation can't remove it while any other tool remainsv2.1.138 or earlier → v2.1.308 ◆in the build
--disallowedTools Deny rules. A bare tool name removes the matching tools from Claude's context: "Edit" removes Edit, "" removes every tool, and "mcp__" removes every MCP tool. A scoped rule such as Bash(rm *) leaves the tool available and denies only calls that match as written. A rule naming EndConversation can't remove it while any other tool remainsnever mined ·never mined
--disk-usage ◇ Repos with lots of dead history are no longer squashed or rejected based on pack file size.never mined ·never mined
--dry-run ◇ Pull requests you create could be reported to a cloud endpoint, but nothing is sent here.v2.1.138 or earlier → v2.1.308 ◆in the build
--effort Set the effort level for the current session. Options: low, medium, high, xhigh, max, or ultracode. Available levels depend on the model. ultracode requests xhigh effort with ultracode turned on, and requires Claude Code v2.1.203 or later. Overrides the modelSettings and effortLevel settings for this session and does not persistv2.1.142 → v2.1.308 ◆in the build
--email ◇ On claude auth login, --email <email> is sent as login_hint on the OAuth authorize URL so the sign-in page opens with the address filled in; it is not used when CLAUDE_CODE_OAUTH_REFRESH_TOKEN is set. --email is also on the Bash permission check's read-only safe-flag list for git shortlog.v2.1.138 or earlier → v2.1.308 ◆in the build
--enabled ◇ Plugin listing now offers --enabled and --disabled filters in tab completion.never mined ·never mined
--end-of-options ◇ Repo git hooks stay suppressed by default, tag pushes excepted, and GIT_CONFIG is now cleared.never mined ·never mined
--env ◇ -e, --env <env...> is an option of claude mcp add. Each value must be KEY=value (anything else is an error) and the pairs become the env of a stdio server; for HTTP and SSE transports the values are not used. Claude Code also passes --env KEY=value itself to its Windows sandbox runner for each variable of a sandboxed command, and the Bash permission parser treats --env as taking a value when it unwraps strace and GNU parallel commands.v2.1.138 or earlier → v2.1.308 ◆in the build
--environment Create a new cloud session that runs on the self-hosted environment with the given ID. Environment IDs start with ccpool_. See --environment dispatch behavior for dispatch behavior and the flag combinations it rejects. Requires Claude Code v2.1.224 or laternever mined ·never mined
--environment-secret-file ◇ Runner "pool" flags are renamed to "environment"; old names still work but warn.never mined ·never mined
--eval-dir ◇ claude plugin eval now checks which plugin is actually loaded before runningv2.1.235 → v2.1.308 ◆in the build
--eval-mock-server ◇ This is version 2.1.242, and the CLI gained an --eval-mock-server mode taking two arguments.never mined ·never mined
--expected-spawn-seconds ◇ An orchestrator subcommand polls for capacity hints and runs your own spawn-runner script to autoscale.never mined ·never mined
--fallback-model Enable automatic fallback to the specified model(s) when the primary model is overloaded or not available, for example a retired model. Accepts a comma-separated list tried in order. See Fallback model chains. To persist a chain across sessions, use the fallbackModel setting, which this flag overridesv2.1.138 or earlier → v2.1.308 ◆in the build
--file ◇ Flags that take values no longer swallow or drop their arguments, and -- is handled.v2.1.138 or earlier → v2.1.308 ◆in the build
--fix ◇ The /review hint now spells out that you can pass a PR number, branch or path.never mined ·never mined
--force ◇ Auto-memory file deletion now rejects every flag except -f or --force, so fewer commands slip through.v2.1.138 or earlier → v2.1.308 ◆in the build
--fork-session When resuming, create a new session ID instead of reusing the original (use with --resume or --continue)v2.1.138 or earlier → v2.1.308 ◆in the build
--forward-home-settings ◇ The hidden --no-home-settings flag becomes --forward-home-settings true or false, so you can force it on.never mined ·never mined
--forward-subagent-text Emit subagent text and thinking blocks in the output stream as assistant and user messages with parent_tool_use_id set, so you can reconstruct each subagent's transcript. Without this flag, Claude Code omits the text and thinking blocks of a subagent that runs in the foreground. Requires --print and --output-format stream-json. Claude Code also forwards messages from nested subagents, setting parent_tool_use_id to the ID of the Agent or Skill tool call that started each one; this requires Claude Code v2.1.219 or later, and messages of subagents that a forked skill spawns, and of nested forked skills, require v2.1.275 or later. The CLAUDE_CODE_FORWARD_SUBAGENT_TEXT environment variable enables the same behavior. Requires Claude Code v2.1.211 or laterv2.1.211 → v2.1.308 ◆in the build
--from-pr Open the session picker filtered to sessions linked to a specific pull request. Accepts a PR number, a GitHub or GitHub Enterprise PR URL, a GitLab merge request URL, or a Bitbucket pull request URL. Sessions are linked automatically when Claude creates the pull requestv2.1.138 or earlier → v2.1.308 ◆in the build
--header ◇ decode-token prints a session token's claims, verifying signature and expiry by default.v2.1.138 or earlier → v2.1.308 ◆in the build
--health-port ◇ The setup wizard spawns a detached runner into ./runner-setup and warns it outlives your session.never mined ·never mined
--hook-concurrency ◇ An orchestrator subcommand polls for capacity hints and runs your own spawn-runner script to autoscale.never mined ·never mined
--hook-timeout ◇ An orchestrator subcommand polls for capacity hints and runs your own spawn-runner script to autoscale.never mined ·never mined
--hooks-dir ◇ The runner now has Windows errors for hooks and orchestrator mode, but they never fire.never mined ·never mined
--id-token ◇ --id-token <jwt> is an option of claude mcp xaa login, which caches an identity-provider id_token so MCP servers added with --xaa authenticate silently. It writes the given JWT straight into that cache, skipping the OIDC browser login, and prints its expiry. It needs an IdP connection from claude mcp xaa setup first.v2.1.138 or earlier → v2.1.308 ◆in the build
--ide Automatically connect to IDE on startup if exactly one valid IDE is availablev2.1.138 or earlier → v2.1.308 ◆in the build
--ignore-submodules=none ◇ Repo git hooks stay suppressed by default, tag pushes excepted, and GIT_CONFIG is now cleared.never mined ·never mined
--include-hook-events Include hook lifecycle events in the output stream. SessionStart and Setup hook events are always included and don't need this flag. Some hook events, such as Notification, SessionEnd, PreCompact, and PostCompact, never produce a hook_started event, even with this flag. For those events, Claude Code still emits hook_progress while a command hook that runs for more than a second produces output, and emits hook_response only when a hook that runs in the background finishes. Requires --output-format stream-jsonv2.1.138 or earlier → v2.1.308 ◆in the build
--include-partial-messages Include partial streaming events in output. Requires --print and --output-format stream-jsonv2.1.138 or earlier → v2.1.308 ◆in the build
--includes ◇ Agent worktrees now ignore repo-supplied filter programs, and refuse to build when git config looks risky.never mined ·never mined
--init-only Run Setup and SessionStart hooks, then exit without starting a conversationnever mined ·never mined
--interactive ◇ The no-terminal message for eval init dropped a flag suggestion that would not have helped.v2.1.138 or earlier → v2.1.308 ◆in the build
--interview ◇ claude eval --interactive now appears in help; --interview remains a hidden alias.never mined ·never mined
--json ◇ Plugin eval JSON output is validated before printing, and suppressed with a stderr warning if invalid.v2.1.138 or earlier → v2.1.308 ◆in the build
--judge-model ◇ --judge-model <model> is an option of claude plugin eval [target], which runs a plugin's eval cases and reports scored results. It sets the model used by the LLM grader, default haiku.v2.1.198 → v2.1.308 ◆in the build
--keep-data ◇ Option of claude plugin uninstall <plugin>. Without it the uninstall deletes the plugin's persistent data directory (~/.claude/plugins/data/{id}/) unless another install still uses it; with it the directory is kept, and with --prune the dependencies removed in the same run keep theirs too. The --json result reports the outcome as keptData.v2.1.138 or earlier → v2.1.308 ◆in the build
--keep-temp ◇ Option of claude plugin eval [target]. It keeps each run's temporary sandbox directory (workspace and trace.jsonl) instead of removing it, printing kept temp: <path>; without it only runs that errored are kept, and none under --json. When a case scores below the threshold or a run errors, the text report suggests re-running with it.v2.1.198 → v2.1.308 ◆in the build
--kill-session-after-min ◇ New flags retire a runner at a set time, release idle sessions, and control drain behaviour.never mined ·never mined
--label ◇ --label <prefix> is an option of claude auto-mode defaults, which prints the default auto mode allow, soft_deny, hard_deny and environment rules as JSON. It keeps only rules whose label (the rule text before its first :, with * and bracketed parts removed) starts with the prefix, case-insensitively. --label is also on the Bash permission check's read-only safe-flag lists for grep, egrep, fgrep, gh pr list, gh issue list, gh search issues and gh search prs.v2.1.208 → v2.1.308 ◆in the build
--marketplace ◇ /plugin install now takes a --marketplace flag to add the marketplace source and install the plugin in one stepv2.1.292 → v2.1.308 ◆in the build
--max-budget-usd Maximum dollar amount to spend on API calls before stopping (print mode only). Spend from subagents counts toward the cap. When you return to a conversation with --continue or --resume, totals restored from earlier runs don't count toward it. Once spend reaches the cap, spawning another subagent fails with Budget limit reached, and Claude Code stops background subagents that are still running; the cap-enforcement behaviors require Claude Code v2.1.217 or laternever mined ·never mined
Nothing on this page matches that. Press Enter to search every CLI flag.