Slash Commands
Interactive commands typed at the start of a Claude Code message
Session
/clear Clear conversation history and free context window
/compact [focus] Compact conversation context. Optional focus text tells Claude what to preserve.
/branch [name] Branch the conversation into a new named thread
alias: /fork
/usage Show token usage, cost, and cache breakdown for the current session. Replaces /cost and /stats.
/context Visualize context window usage as a grid — see what's consuming space
/diff Open an interactive diff viewer for current changes
/copy [N] Copy the last (or Nth) response to clipboard
/recap Summarize session context when returning after a break
/rewind Undo the last action, including file edits and bash commands
alias: /undo
/export Export the current conversation to a file
/plan [desc] Enter plan mode — Claude presents a plan before executing any action
/resume [session] Resume a previous session by ID or name
/focus Toggle focus view in fullscreen terminal mode
/cost Show token usage and estimated cost (deprecated — use /usage instead)
Config
/model [model] Switch the AI model. Use ← → arrows to also adjust effort level. Selection persists across restarts.
/fast [on|off] Toggle fast mode — Opus 4.6 with faster output (not a model downgrade)
/theme [name] Create and switch named custom themes, including "Auto (match terminal)" dark/light mode
/permissions View and update tool permissions for this session, including recent auto-mode denials
/effort [level] Set effort level: low / medium / high / xhigh / max. Opens interactive slider when called without args.
/color [color] Set the prompt-bar accent color
/keybindings View and customize keyboard shortcuts
/terminal-setup Install recommended terminal integrations (shell hooks, key bindings)
Tools
/init Create a CLAUDE.md in the current project to give Claude persistent context
/memory Edit CLAUDE.md files, toggle auto memory, and view current memory entries
/mcp Open the MCP server management UI — add, remove, and inspect servers
/hooks View and manage Claude Code lifecycle hooks
/skills List available built-in and custom skills
/agents View and manage agent configurations
/review [PR] Review the current git diff (or a specific PR) using code review heuristics
/ultrareview [PR#] Deep multi-agent cloud code review. No args reviews local diff; PR# reviews a GitHub PR.
/simplify [focus] Code review + fix workflow using 3 parallel agents
/security-review Scan the current diff for security vulnerabilities
/less-permission-prompts Add the current session's tool usage to the allowlist to reduce future permission prompts
/loop [interval] [prompt] Schedule a recurring task at a set interval. Alias /proactive.
/chrome Open Claude Code's Chrome integration settings
/ide Show IDE integration status (VS Code, JetBrains)
/reload-plugins Hot-reload all plugins without restarting Claude Code
/add-dir <path> Add an additional working directory to this session's allowed set
/doctor Check Claude Code installation health and diagnose issues
Special
/btw <question> Ask a side question without adding it to the conversation context. Zero context cost.
/extra-usage Request extra usage capacity when rate limited
/voice Toggle push-to-talk voice dictation (20 languages supported)
/insights Analyze your session history and generate a usage report
/desktop Continue the current session in the Claude Desktop app
/rename [name] Rename the current session
/help Show all available slash commands and keyboard shortcuts
/feedback Submit feedback or report a bug to Anthropic
alias: /bug
CLI Flags
Command-line flags for the claude command
Core Commands
Main CLI entry points and subcommands
claude Start an interactive Claude Code session
claude "prompt" Start a session with an initial prompt pre-filled
claude -p "prompt" Non-interactive (headless/SDK) mode — print response and exit
claude -c Continue the most recent conversation session
claude -r "name" Resume a session by ID or name
claude update Update Claude Code to the latest version
claude auth login Sign in to your Anthropic account (supports --sso and --console flags)
claude agents List all configured agent definitions
claude mcp Manage MCP server configuration
claude plugin Plugin management — install, remove, and list plugins
Core Flags
--print "prompt" Non-interactive mode — print response to stdout and exit. Use with --output-format for scripting.
alias: -p
--continue Continue the most recent conversation session
alias: -c
--resume <session-id-or-name> Resume a specific previous conversation by ID or name
alias: -r
--name <name> Set a name for this session (makes it easier to resume later)
alias: -n
--version Print the installed version number and exit
alias: -v
--help Show help information and available flags
alias: -h
Model & Behavior
--model <model-id> Specify the Claude model (e.g. claude-opus-4-7, claude-sonnet-4-6, claude-haiku-4-5-20251001)
--effort <level> Set thinking effort: low / medium / high / xhigh / max
--output-format <format> Output format for --print mode: text (default), json, streaming-json
--json-schema <schema> Constrain --print output to a specific JSON schema (structured output)
--max-turns <n> Maximum number of agentic turns before pausing for input
--max-budget-usd <amount> Cap total spend for this session (e.g. --max-budget-usd 5)
--system-prompt "prompt" Override the default system prompt (use with --print)
--append-system-prompt "text" Append additional text to the default system prompt
--agent <name> Launch with a specific named agent configuration
--agents <json> Define one or more agents inline as a JSON string
Permissions
--permission-mode <mode> Permission mode: default (prompts) · acceptEdits (auto-accept edits) · plan (read-only) · auto · dontAsk (deny unless allowed) · bypassPermissions (skip all)
--allowedTools <tools> Comma-separated list of tools Claude is allowed to use without prompting
--disallowedTools <tools> Comma-separated list of tools Claude cannot use in this session
--allow-dangerous-mode Add bypassPermissions to the Shift+Tab permission mode cycle
--dangerously-skip-permissions Bypass all permission prompts. Only use in trusted, sandboxed CI environments.
Context & Files
--add-dir <path> Add an additional directory to Claude's allowed working set
alias: -a
--mcp-config <path> Path to a custom MCP configuration file (overrides default .mcp.json)
--settings <file> Load a specific settings JSON file for this session
--no-mcp Disable all MCP server connections for this session
--bare Minimal mode — no hooks, MCP servers, or memory files loaded
--exclude-dynamic-context Exclude dynamic context from prompt caching to improve cache hit rates
Remote & Integration
--remote Start a web session on claude.ai instead of running locally
--remote-control Enable Remote Control mode for external orchestration
alias: --rc
--ide Enable IDE integration mode — used by VS Code and JetBrains extensions
--chrome Enable Chrome browser integration
--no-chrome Disable Chrome browser integration for this session
--channels Enable MCP push notification channels
Output & Debugging
--verbose Show full turn-by-turn conversation including system messages
--debug [filter] Enable debug-level logging, optionally filtered by a keyword
Keyboard Shortcuts
Keyboard shortcuts available within a Claude Code session
General Controls
Ctrl+C Cancel current input or interrupt a running generation
Ctrl+D Exit the Claude Code session
Ctrl+L Clear prompt input and force a full screen redraw
Ctrl+O Toggle transcript viewer showing verbose tool usage; cycles focus in fullscreen
Ctrl+U Clear the entire input buffer
Ctrl+Y Restore the last cleared input buffer
Ctrl+G Open current input in your $EDITOR (same as Ctrl+X Ctrl+E)
Ctrl+R Reverse-search command history (standard bash Ctrl+R)
Ctrl+X Ctrl+K Kill all background agents. Press twice to confirm.
Ctrl+B Show background running tasks
Ctrl+T Toggle the task list panel
Esc Esc Rewind the last action or summarize the session
Mode Switching
Shift+Tab Cycle through permission modes: default → acceptEdits → plan → …
Input
\+Enter Insert a newline without submitting — for multi-line input
v Enter vim visual mode (character selection + operators) in the prompt editor
V Enter vim visual-line mode in the prompt editor
Input Prefixes
Special characters at the start of a prompt that change how Claude interprets input
/ Start a slash command (e.g. /clear, /compact, /help)
! Run input directly as a bash command without Claude interpreting it
@ Mention a file — triggers autocomplete for file paths in the project
Mac Option Keys
Mac-specific shortcuts. Enable Option as Meta key via /terminal-setup or iTerm2 settings.
⌥P Switch the active model
mac only
⌥T Toggle extended thinking on/off
mac only
⌥O Toggle fast mode on/off
mac only
⌥+← Move cursor one word to the left
mac only
⌥+→ Move cursor one word to the right
mac only
⌥+Backspace Delete the word to the left of the cursor
mac only
Ctrl+A Move cursor to beginning of line
mac only
Ctrl+E Move cursor to end of line
mac only
Environment Variables
Environment variables that configure Claude Code behavior
Authentication
ANTHROPIC_API_KEY Anthropic API key for direct API access. Set this to use your own key instead of the logged-in account.
ANTHROPIC_AUTH_TOKEN Alternative to ANTHROPIC_API_KEY. Bearer token for API authentication.
ANTHROPIC_BASE_URL Override the Anthropic API base URL. Useful for proxies or enterprise gateways.
ANTHROPIC_BETAS Comma-separated list of additional beta feature headers to send with API requests.
ANTHROPIC_CUSTOM_MODEL_OPTION Add a custom model ID as an entry in the /model picker.
Model Providers
CLAUDE_CODE_USE_BEDROCK 1 Route requests through AWS Bedrock instead of the Anthropic API direct endpoint.
CLAUDE_CODE_USE_VERTEX 1 Route requests through Google Cloud Vertex AI instead of the Anthropic API.
AWS_PROFILE AWS named profile to use when CLAUDE_CODE_USE_BEDROCK is set.
AWS_REGION AWS region for Bedrock (e.g. us-east-1). Required when using Bedrock.
GOOGLE_APPLICATION_CREDENTIALS Path to GCP service account JSON key file when using Vertex AI.
Behavior
CLAUDECODE 1 Set to 1 inside a Claude Code session — use to detect Claude Code in shell scripts.
MAX_THINKING_TOKENS Override the maximum thinking token budget. Set to 0 to disable extended thinking.
CLAUDE_CODE_MAX_OUTPUT_TOKENS Override the default maximum output tokens per response.
API_TIMEOUT_MS API request timeout in milliseconds. Default is 600000 (10 minutes).
MCP_TIMEOUT MCP server startup timeout in milliseconds.
CLAUDE_CODE_API_KEY_HELPER_TTL_MS TTL in milliseconds for API keys fetched via an external helper script.
CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC 1 Disable all non-essential network requests — telemetry, update checks, stats pings.
DISABLE_NON_ESSENTIAL_MODEL_CALLS 1 Suppress model calls not directly requested by the user (e.g. auto-summaries).
CLAUDE_CODE_ENABLE_AWAY_SUMMARY 1 Force a session recap when telemetry is disabled (normally auto-detected).
Updates & Reporting
DISABLE_AUTOUPDATER 1 Prevent Claude Code from auto-checking and installing updates.
DISABLE_UPDATES Block all update paths — auto-updater and manual update commands.
DISABLE_BUG_COMMAND 1 Disable the /feedback command and remove bug reporting functionality.
DISABLE_ERROR_REPORTING 1 Opt out of automatic error reporting sent to Anthropic.
Prompt Caching
ENABLE_PROMPT_CACHING_1H 1 Opt into the 1-hour prompt cache TTL (longer cache, better hit rates for long sessions).
FORCE_PROMPT_CACHING_5M 1 Force the 5-minute prompt cache TTL even when the 1-hour TTL is available.
DISABLE_PROMPT_CACHING Disable prompt caching. Claude Code shows a startup warning when this is set.
Context & Compaction
CLAUDE_CODE_DISABLE_1M_CONTEXT 1 Disable the 1M token context window even on models that support it.
CLAUDE_AUTOCOMPACT_PCT_OVERRIDE Override the context percentage threshold that triggers auto-compact (default ~95%).
CLAUDE_CODE_AUTO_COMPACT_WINDOW Set the rolling window size (in tokens) for auto-compact thrash detection.
Memory & Agents
CLAUDE_CODE_DISABLE_AUTO_MEMORY 1 Disable the auto memory system — Claude will not automatically save or load memory files.
CLAUDE_CODE_FORK_SUBAGENT 1 Enable forked subagents on external builds for improved isolation.
CLAUDE_CODE_DISABLE_CRON 1 Disable all scheduled (cron-style) tasks defined in settings.
Networking
HTTP_PROXY HTTP proxy for outbound connections (e.g. http://proxy.corp.example:8080).
HTTPS_PROXY HTTPS proxy for outbound connections.
NO_PROXY Comma-separated list of hostnames to bypass the configured proxy.
CLAUDE_CODE_CERT_STORE Path to a custom certificate store for TLS verification in corporate environments.
Development
CLAUDE_CODE_ENABLE_TELEMETRY 1 Enable detailed usage telemetry collection. Off by default.
CLAUDE_CODE_SKIP_PERMISSIONS_WARNING 1 Suppress the warning shown when running with elevated permission modes.
Workflows
Built-in Claude Code modes, workflow patterns, and power-user tips
Plan Mode
Shift+Tab Cycle permission modes: Normal → Auto-Accept Edits → Plan (read-only) → …
/plan [desc] Enter plan mode for the current request. Claude presents a plan before executing.
--permission-mode plan Start Claude Code in plan mode via CLI flag — good for CI review pipelines.
plan file naming Plan files are named after your prompt (e.g. fix-auth-race-snug-otter.md) and saved in the project.
Thinking & Effort
think Include "think" in your prompt to enable extended thinking for deeper reasoning.
think hard Higher thinking budget — more thorough reasoning on complex problems.
think harder Near-maximum thinking budget. Use for the hardest architectural or algorithmic problems.
ultrathink Maximum thinking budget. Alias for "think harder". Slowest and most thorough.
⌥T Toggle extended thinking on/off without changing your prompt.
mac only
Ctrl+O Open transcript viewer to see thinking output (verbose tool usage view).
/effort [level] Set effort level interactively: ○ low · ◐ medium · ● high · ★ xhigh · ★★ max
--effort <level> Set thinking effort for non-interactive (--print) mode. low/medium/high/xhigh/max.
Voice Mode
/voice Enable push-to-talk voice dictation. Claude transcribes speech in 20 languages.
Space (hold) Hold to record your message, release to send it (when voice mode is active).
voice languages EN, ES, FR, DE, CZ, PL and 14 more — auto-detected from your speech.
Context Management
/context Visualize context window usage and get optimization tips.
/compact [focus] Compress conversation history with optional focus — preserves key decisions.
/clear Wipe conversation history entirely. Full context window reset.
auto-compact Triggers automatically at ~95% context capacity. Includes thrash detection (3x threshold).
1M context Opus 4.6 supports 1M token context on Max, Team, and Enterprise plans.
CLAUDE.md Memory files survive compaction — always re-loaded after a /compact or auto-compact.
Auto-Mode Permission Denied
When Claude Code denies a tool in auto/dontAsk mode, you can inspect and retry
/permissions Open the permissions panel — the Recent tab shows all recently denied tool calls.
R (in permissions) Retry a denied tool call from the Recent tab after reviewing and approving it.
Git Worktrees
Git worktrees let Claude work on isolated branches without disturbing your working tree
git worktree add <path> <branch> Create a git worktree for an isolated checkout. Claude can work here in parallel.
--worktree <name> Start Claude Code scoped to a named worktree branch.
isolation: worktree Agent frontmatter — run the agent in its own temporary git worktree.
sparsePaths Sparse checkout — check out only the directories needed for the task.
workspace.git_worktree Status line JSON field — contains the linked worktree path when inside a worktree.
/batch Auto-creates 5–30 worktrees to run large parallel changes across the codebase.
Session Power Moves
claude -c Continue the most recent conversation from the terminal.
claude -r "name" Resume a named session from the terminal — use /rename to name sessions.
/btw <question> Ask a side question without adding it to the conversation — zero context cost.
/recap Ask Claude to summarize the session so far — useful when returning after a break.
Headless / SDK Mode
Non-interactive mode for scripting, CI, and piping Claude into other tools
claude -p "prompt" Run non-interactively, print response to stdout, and exit.
claude -p --output-format json "prompt" Output structured JSON — good for parsing response in scripts.
echo "prompt" | claude -p Read prompt from stdin — compose complex prompts in shell pipelines.
claude -p --max-turns 10 "task" Allow up to N agentic turns before stopping.
claude -p --max-budget-usd 5 "task" Cap total API spend for this headless run.
Scheduling & Remote
/loop 5m <message> Run a recurring task every 5 minutes (supports s, m, h units).
--remote Start a web session on claude.ai instead of running locally.
MCP Servers
MCP (Model Context Protocol) servers extend Claude Code with external tools, APIs, and data sources
Management Commands
claude mcp add <name> <command> [args...] Add a stdio MCP server by command. Defaults to user scope.
claude mcp add --transport http <name> <url> Add a remote HTTP MCP server by URL (recommended for remote servers).
claude mcp add --transport sse <name> <url> Add a remote SSE MCP server by URL.
claude mcp add -s project <name> <cmd> Add a project-scoped MCP server (stored in .mcp.json, shareable via git).
claude mcp add -s local <name> <cmd> Add a local-only server (user settings, overrides project scope, not committed).
claude mcp remove <name> Remove a named MCP server from configuration.
claude mcp list List all configured MCP servers and their connection status.
claude mcp get <name> Show full configuration details for a specific MCP server.
claude mcp reset-project-choices Reset saved MCP server approval decisions for the current project.
/mcp Open the interactive MCP server management UI inside Claude Code.
Transports
--transport http Remote HTTP transport (recommended). Server exposes REST endpoints; Claude makes HTTP requests.
--transport stdio Local process transport (default). Server runs as a child process, communicates via stdin/stdout.
--transport sse Server-Sent Events transport. Server runs independently; Claude connects to its URL.
Scopes
local Stored in ~/.claude.json. Applies to you only — not shared. Default scope when adding servers.
project Stored in .mcp.json at the project root. Commit this to share servers with your team.
user Stored in ~/.claude.json globally. Active across all projects for your account.
Config Files
.mcp.json Project-level MCP config at the repo root. Commit this to share servers with your team.
~/.claude.json User-level config file. Stores OAuth tokens, MCP server definitions, and session state.
Advanced
maxResultSizeChars Set _meta["anthropic/maxResultSizeChars"] in a tool result to raise the per-tool text threshold up to 500K chars.
Memory Files
CLAUDE.md files give Claude persistent context about your project and preferences
CLAUDE.md Locations
Claude loads all CLAUDE.md files it finds, from user-level down to the current directory
./CLAUDE.md Project-level memory at the project root. Commit this to share context with your whole team.
./.claude/CLAUDE.md Alternate project-level location inside the hidden .claude directory.
./CLAUDE.local.md Local personal project notes — gitignored, not shared with the team.
~/.claude/CLAUDE.md User-level memory. Loaded for every project. Good for personal coding preferences.
/etc/claude-code/CLAUDE.md Managed policy file (Linux/WSL). Set by IT/DevOps — applies org-wide, users cannot override.
[subdirectory]/CLAUDE.md Directory-level memory. Loaded when Claude operates in or below that subdirectory.
Rules Files
Rules files in .claude/rules/ are loaded automatically based on context
.claude/rules/*.md Project-level rules files. Loaded for matching paths or globally if no paths filter is set.
~/.claude/rules/*.md User-level rules files. Applied across all projects.
paths: [globs] YAML frontmatter in a rules file: limit the file to specific path patterns (e.g. ["src/**/*.ts"]).
Import & Reference Syntax
@path/to/file Import another file's contents into CLAUDE.md. Path is relative to the CLAUDE.md file location.
@~/.claude/shared.md Import a user-level shared file into any project CLAUDE.md — useful for shared team rules.
Auto Memory
Claude can automatically save and load memory entries without manual CLAUDE.md editing
~/.claude/projects/<proj>/memory/ Auto memory directory for a project. MEMORY.md auto-loads at startup (first 25KB / 200 lines); topic files load on demand.
CLAUDE_CODE_DISABLE_AUTO_MEMORY 1 Disable the auto memory system entirely.
Recommended Sections
# Project overview What the project does, its stack, and key architectural decisions.
# Commands Build, test, lint, and deploy commands. Claude reads these to avoid asking.
# Code style Naming conventions, formatting preferences, and patterns to follow or avoid.
# Important files Key files Claude should always be aware of (entrypoints, config, schemas).
# Do not Explicit list of actions Claude should never take in this project.
Config Files
Configuration files that control Claude Code settings, permissions, and policies
Settings Files
Applied in order — later files override earlier ones
~/.claude/settings.json User-level settings. Applies to all projects. Do not commit this file.
.claude/settings.json Project-level settings. Safe to commit — shared with team via git.
.claude/settings.local.json Local project overrides. Add to .gitignore — machine-specific config only.
~/.claude.json OAuth tokens, MCP server state, and other runtime state managed by Claude Code.
.mcp.json Project MCP server definitions. Commit this to share MCP servers with your team.
managed-settings.d/ Drop-in policy fragments directory. Files here are merged in alphabetical order.
Key Settings
permissions.allow Array of tool patterns Claude can use without prompting. E.g. ["Bash(git *)", "Read", "Write(**/*.ts)"]
permissions.deny Array of tool patterns always blocked. Overrides the allow list. E.g. ["Bash(rm *)"]
model Default model to use for this project or user scope.
modelOverrides Map model picker names to custom model IDs — e.g. { "claude-opus-4-7": "my-custom-opus" }.
autoMemoryDirectory Override the default directory for auto memory storage.
mcpServers Map of MCP server configs: { name: { command, args, env, scope } }
env Environment variables automatically injected into every Claude Code session.
hooks Shell commands triggered on lifecycle events: PreToolUse, PostToolUse, Stop, SubagentStop, Notification, PermissionDenied.
hooks: if Conditional hook execution using permission rule syntax — only run the hook when the condition matches.
hooks: defer Pause a headless session and wait for external input before resuming.
type: mcp_tool Hook step that invokes an MCP tool directly instead of running a shell command.
showThinkingSummaries Show extended thinking summaries in the transcript viewer. Off by default — opt in to see them.
allowedChannelPlugins Admin allowlist for which channel plugins users may install.
disableSkillShellExec Block !`cmd` dynamic context injection in skills — prevents shell execution inside skill prompts.
worktree.sparsePaths Sparse checkout paths for git worktrees — only check out specified directories.
sandbox.failIfUnavailable Exit with an error if the sandboxed execution environment is not available.
refreshInterval Re-run the custom status line command every N seconds to update it dynamically.
Hooks Events
Hook scripts run in response to Claude Code lifecycle events
PreToolUse Runs before Claude executes any tool. Can block execution by exiting non-zero.
PostToolUse Runs after a tool completes. Receives tool name and result in environment.
Stop Runs when Claude finishes responding and returns to the prompt.
SubagentStop Runs when a spawned sub-agent completes.
Notification Runs when Claude sends a notification (e.g. "waiting for input").
PermissionDenied Runs when a tool call is denied in auto/dontAsk mode — useful for logging or alerting.
Managed Policy
Enterprise-administered policy files that users cannot override
/etc/claude-code/CLAUDE.md Managed policy on Linux/WSL. Set by IT/DevOps; applies org-wide.
/etc/claude/policy.json Managed JSON policy on Linux and macOS. Overrides all user and project settings.
C:\ProgramData\Claude\policy.json Managed policy on Windows.
Skills & Agents
Custom skill files, built-in agents, and sub-agent configurations for Claude Code
Built-in Skills
Skills that ship with Claude Code and are available via slash commands
/init Create or update a CLAUDE.md for the project
/review [PR] Code review heuristics on the current git diff or a specific PR
/ultrareview [PR#] Deep multi-agent cloud review — parallel analysis of a diff or GitHub PR
/simplify [focus] Code review + fix using 3 parallel agents
/security-review Scan the current diff for security vulnerabilities
/batch Large parallel changes using 5–30 git worktrees automatically
/debug [desc] Troubleshoot from debug log output
/loop [interval] Schedule a recurring task at a set interval
/claude-api Load Claude API and SDK reference into context
Custom Skill Locations
.claude/skills/<name>/ Project-level skill. Active only in this project.
~/.claude/skills/<name>/ User-level skill. Available across all projects.
Skill Frontmatter
YAML frontmatter fields at the top of a SKILL.md file
description When to auto-invoke this skill. Claude reads this to decide which skill to activate.
allowed-tools Tool allowlist for this skill — lets it skip per-tool permission prompts.
model Override the model for this skill (e.g. claude-opus-4-7). Inherits from parent if omitted.
effort Override the effort level for this skill: low / medium / high / xhigh / max.
paths: [globs] Limit skill activation to specific file paths (YAML list, e.g. ["src/**/*.ts"]).
context: fork Run this skill in a subagent (isolated context) rather than the main session.
$ARGUMENTS Placeholder for user-provided arguments when the skill is invoked with extra text.
${CLAUDE_SKILL_DIR} Expands to the skill's own directory path — useful for referencing skill-local files.
!`cmd` Dynamic context injection — run a shell command and insert its output into the skill prompt.
plugin bin/ Ship executables in a bin/ subdirectory that the Bash tool can call during the skill.
Built-in Agent Types
Named agent types available via subagent_type in the Agent tool
general-purpose Default agent. Full tool access. Use for broad multi-step tasks.
Explore Fast read-only agent (Haiku model). Glob, Grep, Read, WebFetch only. Good for codebase research.
Plan Architect agent for designing implementation plans. No write tools — analysis only.
Bash Terminal agent with a separate context. Specialized for shell-heavy tasks.
Agent Tool Parameters
Parameters for the Agent tool when spawning sub-agents
description Short label shown in the UI when the agent is running (3–5 words).
prompt The task for the agent. Brief it like a colleague — include context, goal, and constraints.
subagent_type References a named skill to give the spawned agent specialized capabilities.
model Optional model override for this agent (e.g. claude-haiku-4-5-20251001 for speed).
run_in_background true — spawn the agent asynchronously and continue without waiting for it.
isolation "worktree" — agent works in an isolated git worktree. Auto-cleaned if no changes made.
Agent Frontmatter
YAML frontmatter fields in an agent definition file
permissionMode default · acceptEdits · plan · dontAsk · bypassPermissions
isolation: worktree Run this agent in a dedicated git worktree for full isolation.
memory: user|project|local Enable persistent memory for this agent — stored at user, project, or local scope.
background: true Run as a background task — caller continues immediately without waiting.
maxTurns Hard limit on the number of agentic turns this agent can take.
initialPrompt Automatically submit this prompt when the agent starts (no user interaction needed).
SendMessage Resume a running or paused agent by sending it a message (replaces the old resume API).
@agent-name Mention a named subagent in a prompt to delegate part of the task to it.