Cheat sheet · Checked Oct 28, 2026

Claude Code cheat sheet

Every Claude Code feature I could find in the official docs, 1,540 in all, sorted into beginner (444), intermediate (590) and advanced (506), each with a link to an official page that documents it. The release list on this page refreshes from the official changelog every day.

Latest Claude Code · released Oct 27, 2026
claude-code 2.1.312
Features on this sheet · released Oct 28, 2026
1,540 with official links
A clay diorama of a friendly robot at a terminal console with small floating tools orbiting it

Explore with AI

Browse by topic

Showing 1540 of 1540 features

Topic 1 of 7

Start here

Pick your level, then see the big ideas explained.

Beginner, intermediate or advanced?

Every feature on this sheet carries a level. Beginner means useful in your first week. Intermediate means daily power use. Advanced means teams, CI, security and rollout. The three columns below are my suggested order for learning. Every row in the tables keeps the level the research gave it, and the level buttons above the tables show only that level.

beginner

Get productive in a day

The habits that make the first week smooth.

  • Install Claude Codecurl -fsSL https://claude.ai/install.sh | bash
  • Start in your projectclaude
  • Write a CLAUDE.md/init
  • Plan before you editShift+Tab, or claude --permission-mode plan
  • Undo a mistakeEsc Esc, or /rewind
  • Keep the context small/context, /compact, /clear
  • Ask a side question/btw what does this do?
  • Pick a model/model
  • Pick up where you left offclaude --continue, or claude --resume
  • Run a shell command in the chat! git status
  • Check your installclaude doctor
  • Point at a file@path/to/file
intermediate

Make it yours

Rules, tools and automation for daily use.

  • Permission rulespermissions.allow and permissions.deny in .claude/settings.json
  • Rules for some files only.claude/rules/*.md with paths: frontmatter
  • Skills.claude/skills/name/SKILL.md
  • Subagents.claude/agents/name.md
  • Connect a toolclaude mcp add --transport http notion https://mcp.notion.com/mcp
  • Scripts and CIclaude -p "prompt" --output-format json
  • Parallel sessionsclaude -w feature-auth
  • Keep going until done/goal all tests pass
  • Repeat on a timer/loop 5m check the deploy
  • Add Claude to your pull requests/install-github-app
  • Background sessionsclaude --bg "task", then claude agents
  • A custom status linethe statusLine key in settings.json
advanced

Run it for a team

Guardrails, scale and cloud rollout.

  • Hooks that blockexit code 2 in a PreToolUse hook
  • A skill that forkscontext: fork with agent: Explore
  • Plugins/plugin, and claude plugin validate --strict
  • Sandboxthe sandbox key in settings.json
  • Managed settingsorganization policy in managed-settings.json
  • Safe automationclaude --bare -p --max-budget-usd 5.00, with ANTHROPIC_API_KEY
  • Schema checked output--json-schema, then read .structured_output
  • Cloud sessionsclaude --cloud, then --teleport
  • A CI tokenclaude setup-token, for runs without --bare
  • BedrockCLAUDE_CODE_USE_BEDROCK=1
  • TelemetryCLAUDE_CODE_ENABLE_TELEMETRY=1
  • The Agent SDKpip install claude-agent-sdk

The big ideas, explained

Plan before you edit

beginner

Plan mode lets Claude read your code and propose a plan. Nothing is edited until you approve it.

A tiny robot with a pencil over a blueprint and a clay house model, with the real building site untouched
Plan mode
Shell
#!/usr/bin/env bash
# Start in plan mode: Claude reads and proposes a plan, no edits until you approve.
# In a session, Shift+Tab cycles modes and /plan <task> enters plan mode.
# Source: https://code.claude.com/docs/en/permission-modes#analyze-before-you-edit-with-plan-mode
claude --permission-mode plan
  • Shift+Tab cycles the permission modes. /plan <task> jumps straight into plan mode.
  • claude --permission-mode plan starts a session already in plan mode.
  • The model alias opusplan plans on Opus and runs the plan on Sonnet.
  • The old ultraplan feature was removed on Aug 4, 2026. Plan mode replaces it.

Sources: Permission modes

Undo with checkpoints, or branch the chat

beginner

Claude Code takes a checkpoint before every prompt, so you can roll back the code, the conversation or both.

A tiny robot turns a big dial with a curved arrow and a clock beside a path with flags
Rewind
Shell
#!/usr/bin/env bash
# Branch a conversation: resume it under a NEW session id so the original stays untouched.
# Inside a session, /branch does the same thing.
# Source: https://code.claude.com/docs/en/sessions#branch-a-session
claude --continue --fork-session
  • Press Esc twice on an empty prompt, or type /rewind, to restore code, conversation, or both.
  • The 100 most recent checkpoints are kept. Changes made only through Bash, by subagents or outside Claude Code are not restored, so it does not replace Git.
  • claude --continue --fork-session or /branch resumes a conversation under a new session ID and leaves the original alone.

Sources: Checkpointing · Sessions

Teach it your project with CLAUDE.md

beginner

CLAUDE.md is a plain file Claude reads at the start of every session. Put your commands, conventions and workflow in it.

A tiny robot at a cork wall with a notebook and sticky notes
CLAUDE.md
Markdown
# Project instructions (CLAUDE.md)

<!-- Block-level HTML comments like this one are stripped before the file is sent to Claude, so they cost no context tokens. -->

## Commands
- Build: `npm run build`
- Test one file: `npm test -- path/to/file.test.ts`
- Lint before every commit: `npm run lint`

## Conventions
- Use 2-space indentation.
- API handlers live in `src/api/handlers/`.
- Use the standard error response format from `src/api/errors.ts`.

## Workflow
- Run `npm test` before committing.
- Never push directly to `main`; open a pull request.

## Compact instructions
When you are using compact, please focus on test output and code changes.

<!-- Keep this file under about 200 lines. Move rules that only matter for some files into .claude/rules/ with `paths:` frontmatter. -->
  • /init writes a starting CLAUDE.md from your codebase.
  • Block level HTML comments are stripped before Claude sees the file, so they cost no context.
  • @path imports pull in other files, up to four hops deep.
  • Rules in .claude/rules/*.md with paths: frontmatter load only when Claude touches matching files.

Sources: How Claude remembers your project

Keep the context window healthy

beginner

Everything Claude has read sits in the context window, and a full window gets worse answers and costs more.

Colored beads flow from a tall jar through a funnel into a small jar
The context window
  • /context shows a coloured grid of what fills the window, with hints to trim it.
  • /compact [instructions] summarizes the conversation to free space. Add a focus, such as the failing tests.
  • /clear starts a fresh conversation. The old one stays available through /resume.
  • A /clear plus a better prompt usually beats a third round of corrections.

Sources: The context window · Commands reference

Decide what Claude may do on its own

intermediate

Permission rules allow, ask about or deny a tool call. They live in settings files and apply in every mode.

A tiny robot at a locked door beside a green tray and a red tray
Permissions
JSON
{
  "$schema": "https://json.schemastore.org/claude-code-settings.json",
  "permissions": {
    "defaultMode": "acceptEdits",
    "allow": [
      "Bash(npm run *)",
      "Bash(git commit *)",
      "Bash(git diff *)",
      "WebFetch(domain:docs.anthropic.com)",
      "mcp__puppeteer__*",
      "Read(~/.zshrc)"
    ],
    "ask": [
      "Bash(git push *)"
    ],
    "deny": [
      "Read(./.env)",
      "Read(./.env.*)",
      "Read(./secrets/**)",
      "Bash(curl *)",
      "Bash(rm -rf *)"
    ],
    "additionalDirectories": [
      "../shared-config"
    ]
  }
}
  • Deny beats ask beats allow. An allow rule can never carve an exception out of a deny.
  • A .claudeignore file does nothing. Block files with Read(...) deny rules.
  • Bash deny rules are not a security boundary: /usr/bin/curl or sh -c can slip past a rule for curl. Use the sandbox for real isolation.
  • "Yes, and do not ask again" writes the rule to .claude/settings.local.json, and Claude keeps that file out of Git.
  • /permissions lets you review and edit the rules.

Sources: Configure permissions · Sandboxed Bash tool

Run Claude Code from scripts and CI

intermediate

Print mode runs one prompt and exits. Pipe it, parse its JSON and put it in a pipeline.

Paper sheets slide into a pipe and neat identical cubes drop into a crate
Print mode
Shell
#!/usr/bin/env bash
# Structured output that must match a JSON Schema. The answer is in .structured_output.
# Check that the field exists before you use it: it is absent if the run ended without valid output.
# Source: https://code.claude.com/docs/en/headless#get-structured-output
claude -p "Extract the main function names from auth.py" \
  --output-format json \
  --json-schema '{"type":"object","properties":{"functions":{"type":"array","items":{"type":"string"}}},"required":["functions"]}' \
  | jq '.structured_output'
  • -p is print mode. --output-format takes text, json or stream-json.
  • --json-schema makes the answer match a schema and puts it in .structured_output. The field is missing when the run ended without valid output, so check for it.
  • --max-budget-usd caps spend, though it is a client side estimate and can be overshot, so leave headroom. --bare skips hooks, skills, plugins, MCP, auto memory and CLAUDE.md.
  • --bare ignores OAuth and keychain logins, including the one year token from claude setup-token, so pair it with ANTHROPIC_API_KEY.

Sources: Run Claude Code programmatically · CLI reference

Run sessions in parallel without collisions

intermediate

A worktree gives each session its own folder and branch, so two Claudes never edit the same files.

A tree trunk splitting into three branches, each with a tiny robot at a workbench
Worktrees
Shell
#!/usr/bin/env bash
# Parallel, isolated sessions: each name gets its own git worktree and branch (worktree-<name>).
# Needs at least one commit. Add .claude/worktrees/ to .gitignore.
# Source: https://code.claude.com/docs/en/worktrees#start-claude-in-a-worktree
claude --worktree feature-auth          # terminal 1
claude -w bugfix-123                    # terminal 2 (short flag)
claude -w "#1234"                       # branch the worktree from a pull request
  • claude -w name creates a git worktree under .claude/worktrees/name. The repo needs at least one commit.
  • Add .claude/worktrees/ to .gitignore. claude -w "#1234" branches the worktree from a pull request.
  • isolation: worktree in an agent definition gives that subagent its own worktree.
  • claude --bg "task" runs a background session, and claude agents lists them.

Sources: Worktrees

Connect Claude to your tools with MCP

intermediate

MCP servers give Claude new tools, such as your tracker, database or browser.

A tiny robot plugs a cable into one socket of a wide power strip
MCP
Shell
#!/usr/bin/env bash
# Adding MCP servers. Every flag below appears in `claude mcp add --help` (v2.1.296)
# and in https://code.claude.com/docs/en/mcp.md#installing-mcp-servers
# Do not run blindly: these add real servers to your config.

# 1) Remote HTTP server (recommended transport)
claude mcp add --transport http notion https://mcp.notion.com/mcp

# 2) Remote HTTP server with a bearer header, saved for ALL your projects
claude mcp add --transport http secure-api https://api.example.com/mcp \
  --scope user \
  --header "Authorization: Bearer your-token"

# 3) Remote SSE server (deprecated transport; HTTP is tried first on v2.1.265+)
claude mcp add --transport sse asana https://mcp.asana.com/sse

# 4) Local stdio server. `--` separates Claude's flags from the server command.
#    Put another option between --env and the server name.
claude mcp add --env AIRTABLE_API_KEY=YOUR_KEY --transport stdio airtable \
  -- npx -y airtable-mcp-server

# 5) Share a server with the team: writes .mcp.json in the project root
claude mcp add --transport http shared-server --scope project https://example.com/mcp

# 6) Pre-registered OAuth: fixed callback port and client id (prompts for the secret)
claude mcp add --transport http --callback-port 8080 --client-id your-client-id \
  --client-secret my-server https://mcp.example.com/mcp

# 7) Paste a JSON block (type is required for url entries: http | sse | ws)
claude mcp add-json weather-api \
  '{"type":"http","url":"https://api.weather.com/mcp","headers":{"Authorization":"Bearer token"}}'

# 8) WebSocket servers can only be added with add-json
claude mcp add-json events-server \
  '{"type":"ws","url":"wss://mcp.example.com/socket","headers":{"Authorization":"Bearer YOUR_TOKEN"}}'

# 9) Import from Claude Desktop (macOS and WSL only)
claude mcp add-from-claude-desktop --scope user
  • HTTP is the recommended transport. SSE is deprecated. A stdio server needs -- before its command.
  • --scope is local, project or user. Project scope writes a .mcp.json the whole team can commit.
  • WebSocket servers can only be added with claude mcp add-json.
  • MCP resources are @server:protocol://path mentions, and MCP prompts appear as /mcp__server__prompt commands.
  • claude mcp serve turns Claude Code itself into an MCP server.

Sources: Connect Claude Code to tools via MCP

Package a workflow as a skill

intermediate

A skill is a folder with a SKILL.md. Claude loads it when the task matches, or you run it as a slash command.

A tiny robot slides a folder out of a small filing cabinet
Skills
Markdown
---
name: deploy
description: Deploy the application to staging or production. Use when the user asks to ship, release or deploy a build.
when_to_use: Trigger phrases such as "deploy to staging", "ship it", "release v2".
argument-hint: "[environment] [version]"
arguments: [environment, version]
disable-model-invocation: true
allowed-tools: Bash(${CLAUDE_SKILL_DIR}/scripts/deploy.sh *) Read Grep
model: inherit
effort: high
paths: "src/**,deploy/**"
shell: bash
---

Deploy $environment (version $version) as follows:

1. Run the test suite and stop if anything fails.
2. Run `${CLAUDE_SKILL_DIR}/scripts/deploy.sh $environment $version`.
3. Verify the deployment and report the URL.

Current branch: !`git branch --show-current`

Reference material lives next to this file and loads only when needed:
see [reference.md](reference.md) for the rollback runbook.

Session: ${CLAUDE_SESSION_ID}
  • disable-model-invocation: true stops Claude running the skill on its own, so only you can.
  • A line like !git branch --show-current runs the command and inlines its live output.
  • context: fork with agent: Explore runs the skill as isolated research in a subagent.
  • Custom slash commands were merged into skills in January 2026. Skills hot reload without a restart.
  • /skill-doctor shows each skill's context cost and usage, so you can drop the ones you never use.

Sources: Extend Claude with skills

Hand work to a subagent

intermediate

A subagent runs in its own context window with its own tools, and sends back only a summary.

A larger robot hands envelopes to three smaller robots, each with a different tool
Subagents
Markdown
---
name: code-reviewer
description: Reviews code for quality, security and best practices. Use proactively after code changes.
tools: Read, Glob, Grep, Bash
disallowedTools: Write, Edit
model: sonnet
permissionMode: default
maxTurns: 25
effort: medium
skills:
  - api-conventions
memory: project
background: false
color: blue
---

You are a senior code reviewer. When invoked:

1. Run `git diff` to see recent changes.
2. Review the modified files for correctness, security and readability.
3. Report findings grouped by severity: critical, warning, suggestion.
4. Update your agent memory with recurring issues you find in this repo.
  • Agent files live in .claude/agents/. tools and disallowedTools set what each agent can use.
  • Explore is a fast read only search agent, and general-purpose has every tool. Claude delegates to them on its own.
  • The /agents editor was removed on Jul 1, 2026. Ask Claude to write the file or edit it yourself.
  • claude agents is a different feature: the background session view.
  • claude --agents '{...}' defines agents inline with no files, and claude --agent name runs one.

Sources: Create custom subagents

Enforce rules with hooks

advanced

Hooks run your own scripts at fixed points, such as before a tool call, so a rule holds no matter what Claude decides.

Parcels pass one at a time through a scanner arch with a lamp on top
Hooks
JSON
{
  "hooks": {
    "PreToolUse": [
      {
        "matcher": "Bash",
        "hooks": [
          {
            "type": "command",
            "command": "python3",
            "args": [
              "${CLAUDE_PROJECT_DIR}/.claude/hooks/hook_block_rm.py"
            ],
            "if": "Bash(rm *)",
            "timeout": 10,
            "onFailure": "block"
          }
        ]
      }
    ]
  }
}
  • There are 33 hook events. A matcher narrows when one fires, and /hooks lists everything configured.
  • A hook script reads JSON on stdin. On PreToolUse, exit code 2 blocks the call. Exit code 1 is a non blocking error and the tool still runs, unless the handler sets onFailure to block, as the settings above do.
  • A hook deny holds even in bypassPermissions mode.
  • @ file mentions bypass PreToolUse hooks, so do not rely on a hook to hide a file.
  • A PreToolUse hook can return additionalContext to give Claude more to go on.

Sources: Hooks reference · Automate actions with hooks

Python
#!/usr/bin/env python3
"""PreToolUse hook for the Bash tool: block `rm -rf` style deletes.

Register in .claude/settings.json (see hooks_settings.json):
  matcher "Bash", type "command", command "python3 .claude/hooks/hook_block_rm.py"

Contract (hooks.md#exit-code-output):
  stdin  = JSON event (tool_name, tool_input.command, ...)
  exit 0 = no decision, normal permission flow continues
  exit 2 = blocking error, stderr is shown to Claude as the reason
  any other non-zero exit = non-blocking error, the tool call still runs
"""
import json
import re
import sys

BLOCKED = re.compile(r"(^|[;&|]\s*|\s)rm\s+(-[a-zA-Z]*r[a-zA-Z]*f|-[a-zA-Z]*f[a-zA-Z]*r)\b")


def main() -> int:
    try:
        event = json.load(sys.stdin)
    except json.JSONDecodeError as exc:
        # Exit 1 is a NON-blocking error: the tool call would still run.
        print(f"hook_block_rm: invalid JSON on stdin: {exc}", file=sys.stderr)
        return 1

    if event.get("tool_name") != "Bash":
        return 0

    command = (event.get("tool_input") or {}).get("command", "")
    if BLOCKED.search(command):
        print("Blocked: recursive forced delete (rm -rf) is not allowed here.", file=sys.stderr)
        return 2  # blocking error

    return 0


if __name__ == "__main__":
    sys.exit(main())
The script the settings above point to. Exit code 2 is the block.

Topic 2 of 7

Install and everyday use

Install, the CLI, keys, slash commands and sessions.

Install, update and sign in

$ curl -fsSL https://claude.ai/install.sh | bash

That is the native installer for macOS, Linux and WSL, and it keeps itself updated. Every other install method is in the table, with the docs link beside it.

Install, update, uninstall, doctor30

FeatureWhat it doesHowSinceDocs
Native installer (macOS, Linux, WSL)beginnerInstalls the native binary; recommended; auto updates in backgroundcurl -fsSL https://claude.ai/install.sh | bashDocs ↗
Native installer (Windows PowerShell)beginnerSame, from PowerShell (prompt shows PS C:\)irm https://claude.ai/install.ps1 | iexDocs ↗
Native installer (Windows CMD)beginnerSame, from CMDcurl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmdDocs ↗
HomebrewbeginnerInstalls via cask; no auto update. claude-code = stable channel (about a week behind), claude-code@latest = latest channelbrew install --cask claude-code or brew install --cask claude-code@latest; upgrade with brew upgrade claude-codeDocs ↗
WinGetbeginnerInstalls via WinGet; no auto updatewinget install Anthropic.ClaudeCode; upgrade winget upgrade Anthropic.ClaudeCodeDocs ↗
Linux package managers (apt, dnf, apk)intermediateSigned repos with stable and latest channels; updates through your normal system upgradesudo apt install claude-code after adding the repo (key from https://downloads.claude.ai/keys/claude-code.asc); apt upgrade: sudo apt update && sudo apt upgrade claude-code; apk: apk add claude-codeDocs ↗
npm global installintermediateInstalls the same native binary through a per platform optional dependency; needs Node.js 22+ (older Node only warns EBADENGINE). Discrepancy: the GitHub README marks npm "Deprecated" and its badge says Node 18+; the setup docs still document npmnpm install -g @anthropic-ai/claude-code; upgrade npm install -g @anthropic-ai/claude-code@latest (avoid npm update -g, never sudo)Docs ↗
Desktop appbeginnerGraphical alternative to the terminalDownload for macOS, Windows, Linux (links on the setup page)Docs ↗
System requirementsbeginnermacOS 13+, Windows 10 1809+ / Server 2019+, Ubuntu 20.04+, Debian 10+, Alpine 3.19+; 4 GB+ RAM; x64 or ARM64; internet; Bash, Zsh, PowerShell or CMDNoneDocs ↗
Native Windows vs WSLintermediateNative Windows: no sandboxing, Git for Windows optional (gives Git Bash; otherwise PowerShell tool). WSL 2: sandboxing supportedInstall inside WSL for Linux toolchainsDocs ↗
Alpine / musladvancedNeeds bash curl libgcc libstdc++ ripgrep and USE_BUILTIN_RIPGREP=0 in settings envapk add bash curl libgcc libstdc++ ripgrepDocs ↗
Verify installbeginnerPrints the version, e.g. 2.1.211 (Claude Code)claude --version (or claude -v)Docs ↗
claude doctor (shell)beginnerRead only install and settings diagnostics without starting a session; shows last auto update resultclaude doctorchangelog 2.0.33Docs ↗
/doctor (in session)beginnerSetup checkup that diagnoses install, settings, extensions, CLAUDE.md and proposes fixes Claude applies after you confirm; /doctor prompt-audit audits instructions/doctor (alias /checkup)`prompt-audit` needs 2.1.283Docs ↗
Fix "command not found: claude"beginnerInstaller puts claude at ~/.local/bin/claude (%USERPROFILE%\.local\bin\claude.exe on Windows); add that dir to PATHSee the per-shell commands on the pageDocs ↗
Auto update (native)beginnerChecks on startup and periodically, installs in background, applies next launchautomaticDocs ↗
claude update / claude upgradebeginnerCheck for updates now and installclaude updatechangelog 2.0.67Docs ↗
Release channelintermediatelatest (default) or stable (about one week old, skips releases with major regressions)/config then Auto-update channel, or "autoUpdatesChannel": "stable" in settings.jsonDocs ↗
Minimum version flooradvancedAuto update and claude update refuse versions below the pin"minimumVersion": "2.1.100" in settings.jsonDocs ↗
Disable auto updatesintermediateStops the background check only (claude update still works)"env": {"DISABLE_AUTOUPDATER": "1"}; to block all update paths set DISABLE_UPDATESDocs ↗
Package manager auto upgradeadvancedLets Claude Code run the Homebrew or WinGet upgrade for youenv CLAUDE_CODE_PACKAGE_MANAGER_AUTO_UPDATE=1Docs ↗
Install a specific version or channelintermediatePass a version number, stable or latest to the installercurl -fsSL https://claude.ai/install.sh | bash -s 2.1.89; or claude install stableDocs ↗
claude install [target]intermediateInstall or reinstall the native binary; --force reinstallsclaude install latestDocs ↗
Verify binary integrityadvancedGPG signed manifest.json with SHA256 per platform (signatures from 2.1.89); macOS and Windows binaries are code signedgpg --verify manifest.json.sig manifest.json; codesign --verify --verbose ./claude2.1.89Docs ↗
Install on network storageadvancedWarns that a running session reads its executable lazily; keep installs local and per version, set DISABLE_UPDATESSee pageDocs ↗
Uninstall (native)beginnerRemove the launcher and versions dirrm -f ~/.local/bin/claude && rm -rf ~/.local/share/claudeDocs ↗
Uninstall (brew / winget / npm / apt)beginnerPackage specific removalbrew uninstall --cask claude-code; winget uninstall Anthropic.ClaudeCode; npm uninstall -g @anthropic-ai/claude-code; sudo apt remove claude-codeDocs ↗
Remove config and historyintermediateDeletes all settings, allowed tools, MCP config and session historyrm -rf ~/.claude && rm ~/.claude.json (and project .claude, .mcp.json)Docs ↗
claude purge [path]advancedDeletes local state for one project (transcripts, tasks, debug logs, file edit history, prompt history lines, ~/.claude.json entry); --dry-run, -y, -i, --allclaude purge ~/work/repo --dry-run2.1.288 (renamed from `claude project purge`)Docs ↗
Fully local diagnosticsadvancedclaude --safe-mode starts with all customizations off to find a broken configclaude --safe-mode2.1.169Docs ↗

First run and authentication17

FeatureWhat it doesHowSinceDocs
First runbeginnerRun claude in a project folder; a browser opens to log in on first launchcd your-project && claudeDocs ↗
Accounts that workbeginnerPro, Max, Team, Enterprise, or Console account; the free claude.ai plan has no Claude Code accessNoneDocs ↗
Browser login tipsbeginnerIf the browser does not open press c to copy the URL; if the browser shows a code, paste it at Paste code here if prompted (common in WSL2, SSH, containers)at the login promptDocs ↗
Claude subscription loginbeginnerLog in with a Pro, Max, Team or Enterprise claude.ai account/login in session, or claude auth login (default --claudeai)Docs ↗
Console (API billing) loginintermediateSign in with Anthropic Console for pay as you go API billingclaude auth login --consoleDocs ↗
Force SSO / prefill emailintermediateSSO flow or prefilled login emailclaude auth login --sso --email you@company.comDocs ↗
API key from environmentintermediateIf ANTHROPIC_API_KEY is set and you approve it once, login is skipped; in -p mode the key is always usedexport ANTHROPIC_API_KEY=...Docs ↗
Cloud providersadvancedAmazon Bedrock, Google Cloud's Agent Platform (Vertex), Microsoft Foundry via env varsCLAUDE_CODE_USE_BEDROCK=1, CLAUDE_CODE_USE_VERTEX=1, CLAUDE_CODE_USE_FOUNDRY=1; wizards /setup-bedrock, /setup-vertexDocs ↗
Auth precedenceadvancedOrder: cloud provider, ANTHROPIC_AUTH_TOKEN, ANTHROPIC_API_KEY, apiKeyHelper, CLAUDE_CODE_OAUTH_TOKEN, profile/federation, subscription /loginNoneDocs ↗
claude setup-tokenadvancedGenerates a one year OAuth token for CI and scripts; prints it, does not save it; needs a subscription; token cannot start Remote Control or fetch claude.ai connectors; --bare ignores itclaude setup-token then export CLAUDE_CODE_OAUTH_TOKEN=...local 2.1.296 has it (changelog mention 2.1.212)Docs ↗
claude auth statusintermediateAuth state as JSON (--text for readable); exit 0 if logged in, 1 if not; JSON has authMethodclaude auth status --text`configDirectory` field needs 2.1.268Docs ↗
LogoutbeginnerSign out/logout or claude auth logoutDocs ↗
Renew expiring loginbeginnerStartup warns 3 days before expiry/loginDocs ↗
Multiple accountsintermediateSeparate config dir per account (own settings, history, login)alias claude-work='CLAUDE_CONFIG_DIR=~/.claude-work claude'Docs ↗
Credential storageadvancedmacOS Keychain; ~/.claude/.credentials.json (mode 0600) on Linux, Windows, or when Keychain write failsNoneDocs ↗
Restrict login / providers (admins)advancedforceLoginMethod, forceLoginOrgUUID, allowedProviders in managed settingsmanaged settingsDocs ↗
Team auth optionsintermediateClaude for Teams/Enterprise, Console, cloud provider, or self hosted Claude apps gatewayNoneDocs ↗

The claude command: subcommands and flags

Shell
#!/usr/bin/env bash
# JSON output: one result object with the text in .result and the session id in .session_id.
# Source: https://code.claude.com/docs/en/headless#get-structured-output
claude -p "Summarize this project" --output-format json | jq -r '.result'

CLI subcommands28

FeatureWhat it doesHowSinceDocs
Start interactivebeginnerOpens a session in the current folderclaudeDocs ↗
Start with a promptbeginnerInteractive session with an opening promptclaude "explain this project"Docs ↗
claude -pbeginnerOne shot non interactive query then exit (pipes, scripts)claude -p "explain this function"Docs ↗
Pipe contentbeginnerProcess piped stdincat logs.txt | claude -p "explain"Docs ↗
claude -cbeginnerContinue most recent conversation in this directoryclaude -c, claude -c -p "Check for type errors"changelog 0.2.93Docs ↗
claude -rbeginnerResume by ID or name, or open the pickerclaude -r "auth-refactor" "Finish this PR"changelog 0.2.93Docs ↗
claude update / upgradebeginnerUpdate to latestclaude updatechangelog 2.0.67Docs ↗
claude install [target]intermediate(Re)install native build; --forceclaude install stableDocs ↗
claude auth login/logout/statusbeginnerAccount managementclaude auth status --textDocs ↗
claude doctorbeginnerRead only health checkclaude doctorchangelog 2.0.33Docs ↗
claude setup-tokenadvancedLong lived CI tokenclaude setup-tokenDocs ↗
claude agentsintermediateOpens agent view to monitor and dispatch parallel background sessions; --json (add --all for completed), --cwd <path>, plus --permission-mode, --model, --effort, --agent, --add-dir, --settings, --mcp-config, --plugin-dirclaude agents --jsonchangelog 2.1.50 (agent view research preview 2.1.139)Docs ↗
claude attach <id|name>intermediateOpen a background session in this terminal (part of a running session's name works from 2.1.290)claude attach 7c5dcf5dDocs ↗
claude logs <id|name>intermediatePrint a background session's recent outputclaude logs 7c5dcf5dDocs ↗
claude stop / kill <id>intermediateStop a background session (conversation kept)claude stop 7c5dcf5dDocs ↗
claude respawn <id>|--alladvancedRestart background sessions on the current binaryclaude respawn --allDocs ↗
claude rm <id>advancedRemove a background session and its worktree if safe; --discard-unpushed, --force-remove-worktreeclaude rm 7c5dcf5d`--discard-unpushed` 2.1.260, `--force-remove-worktree` 2.1.268Docs ↗
claude daemonadvancedBackground session supervisor: status, logs, run, stop --any [--keep-workers], uninstall (local help: service install disabled, runs on demand)claude daemon statusDocs ↗
claude mcpintermediateConfigure MCP servers (add, list, get, remove, login, logout...)claude mcp add --transport http sentry https://mcp.sentry.dev/mcpDocs ↗
claude mcp login/logout <server>intermediateRun or clear a server's OAuth flow from the shell (--no-browser over SSH)claude mcp login sentryDocs ↗
claude plugin / pluginsintermediateManage plugins (install, enable, disable, details, configure, eval...)claude plugin install code-review@claude-plugins-officialDocs ↗
claude auto-modeadvancedconfig (effective rules as JSON), defaults [--label], critique, reset [-y] for the auto mode classifierclaude auto-mode defaults --label 'Git Destructive'defaults 2.1.208, reset 2.1.212Docs ↗
claude import [source]intermediateBring config from codex, gemini or cursor; --dry-run, --yesclaude import codex --dry-run2.1.213Docs ↗
claude ultrareview [target]advancedCloud multi agent code review of the branch or a PR; --json, --timeout <min> (default 45), --post/--no-postclaude ultrareview 1234 --json`--post` 2.1.227Docs ↗
claude remote-controlintermediateServer mode so claude.ai or the Claude app can drive local sessionsclaude remote-control --name "My Project"changelog 2.1.51Docs ↗
claude gatewayadvancedAdmin: run the self hosted Claude apps gateway (needs --config gateway.yaml)claude gateway --config gateway.yamlDocs ↗
claude self-hosted-runneradvancedRegister this machine as a self hosted cloud session runner (setup, doctor, orchestrator)claude self-hosted-runner setup2.1.224Docs ↗
Typo helpbeginnerA mistyped subcommand suggests the nearest match and exitsclaude udpate prints "Did you mean claude update?"Docs ↗

Print mode, output and automation19

FeatureWhat it doesHowSinceDocs
-p, --printbeginnerPrint the response and exit; skips the workspace trust dialog, so use only in directories you trustclaude -p "query"Docs ↗
--output-formatintermediatetext (default), json (single result object with result, session_id, metadata), stream-json (newline delimited events)claude -p "Summarize this project" --output-format json | jq -r '.result'changelog 0.2.66Docs ↗
--input-formatadvancedtext or stream-json (realtime streaming input) for print modeclaude -p --output-format stream-json --input-format stream-json --verboseDocs ↗
--json-schemaadvancedValidated structured output in a structured_output field; invalid schema errors out; format is annotation onlyclaude -p "Extract function names" --output-format json --json-schema '{"type":"object",...}', (docs: print mode)Docs ↗
--include-partial-messagesadvancedStream partial token events (needs --print and stream-json)claude -p --output-format stream-json --verbose --include-partial-messages "query"Docs ↗
--include-hook-eventsadvancedInclude hook lifecycle events in the streamadd to a stream-json runDocs ↗
--replay-user-messagesadvancedEcho stdin user messages back on stdout (stream json in and out)claude -p --input-format stream-json --output-format stream-json --verbose --replay-user-messagesDocs ↗
--forward-subagent-textadvancedEmit subagent text and thinking blocks with parent_tool_use_idclaude -p --output-format stream-json --verbose --forward-subagent-text "query"2.1.211Docs ↗
--prompt-suggestionsadvancedEmit a prompt_suggestion message after each turn (print + stream json + verbose)claude -p --prompt-suggestions --output-format stream-json --verbose "query"Docs ↗
--max-turnsintermediateLimit agentic turns in print mode; errors out when reachedclaude -p --max-turns 3 "query"docs only (not in local 2.1.296 `--help`)Docs ↗
--max-budget-usdintermediateStop once estimated API spend reaches the cap (client side estimate, can overshoot, includes subagents)claude -p --max-budget-usd 5.00 "query"changelog 2.0.28; cap enforcement on subagents 2.1.217Docs ↗
--no-session-persistenceintermediateDo not save the session to disk (print only)claude -p --no-session-persistence "query"Docs ↗
--permission-promptsadvancedWho answers prompts in print mode: host (default) or none (deny automatically)claude -p --permission-prompts none "query"2.1.259Docs ↗
--permission-prompt-tooladvancedMCP tool that answers permission prompts non interactivelyclaude -p --mcp-config ./mcp.json --permission-prompt-tool mcp__permissions__approve "query"Docs ↗
--bareintermediateMinimal mode for scripts: skips hooks, skills, plugins, MCP, auto memory, CLAUDE.md, keychain/OAuth (auth only via ANTHROPIC_API_KEY or apiKeyHelper)claude --bare -p "query"changelog 2.1.81Docs ↗
--init, --init-only, --maintenanceadvancedRun Setup hooks (init/maintenance matchers) before a print run, or run Setup and SessionStart hooks then exitclaude --init-onlydocs onlyDocs ↗
--restrictedadvancedFor eval harnesses on shared machines: no command running tools, loads only managed settings and --settingsclaude --restricted -p "query"2.1.248Docs ↗
--exclude-dynamic-system-prompt-sectionsadvancedMove cwd/env/memory-path/git status out of the system prompt for better cross machine cache reuseclaude -p --exclude-dynamic-system-prompt-sections "query"Docs ↗
Exit codesintermediate-p exits 0 on success, non zero on failure; SIGTERM gives 143claude -p "..." ; echo $?Docs ↗

Sessions15

FeatureWhat it doesHowSinceDocs
-c, --continuebeginnerLoad the most recent conversation in this directory (skips -p/SDK sessions unless combined with -p)claude --continuechangelog 0.2.93Docs ↗
-r, --resume [value]beginnerResume by ID, name, .jsonl transcript path, or open the picker with optional search termclaude --resume auth-refactorchangelog 0.2.93; names 2.0.64Docs ↗
--fork-sessionintermediateWhen resuming, create a new session ID instead of reusing the originalclaude --resume abc123 --fork-sessionchangelog 2.0.73Docs ↗
-n, --namebeginnerDisplay name for the session (shown in /resume and terminal title)claude -n "my-feature-work"changelog 2.0.64 (named sessions)Docs ↗
--session-id <uuid>advancedUse a specific session UUIDclaude --session-id 550e8400-e29b-41d4-a716-446655440000changelog 2.0.73Docs ↗
--from-pr [value]intermediateOpen the picker filtered to sessions linked to a PR/MR (number, GitHub/GHE URL, GitLab MR URL, Bitbucket PR URL)claude --from-pr 123changelog 2.1.27Docs ↗
-w, --worktree [name]intermediateStart in an isolated git worktree at .claude/worktrees/<name>; accepts #123, a GitHub PR URL or GitLab MR URL to branch from a PR (GitLab MR needs 2.1.233)claude -w feature-authchangelog 2.1.49Docs ↗
--tmuxadvancedCreate a tmux session for the worktree (requires --worktree; iTerm2 panes when available, --tmux=classic for tmux)claude -w feature-auth --tmuxDocs ↗
--bg, --backgroundintermediateStart as a background agent and return immediately; cannot combine with -p; combine with --exec for shell jobs or --agentclaude --bg "investigate the flaky test"changelog 2.1.140 (background agent support 2.0.60)Docs ↗
--execadvancedRun a shell command as a PTY backed background job (use with --bg)claude --bg --exec 'pytest -x'docs onlyDocs ↗
--cloud [description|id|url]intermediateCreate a cloud session, or queue a message into an existing one with -pclaude --cloud "Fix the login bug"`--remote` is the deprecated aliasDocs ↗
--teleport [session]intermediateResume a cloud session in your local terminalclaude --teleportDocs ↗
--remote-control [name], --rcintermediateStart an interactive session also controllable from claude.ai or the Claude appclaude --remote-control "My Project"Docs ↗
--desktopintermediateOpen the Claude Desktop app on this directory (with --continue or --resume <id> to open that session); macOS and x64 Windows, subscription onlyclaude --desktop2.1.285Docs ↗
--system-prompt-snapshot on|offadvancedWhether a conversation keeps its first request system prompt on resumeclaude --system-prompt-snapshot off2.1.257Docs ↗

Model, thinking and prompts13

FeatureWhat it doesHowSinceDocs
--modelbeginnerModel for this session: alias (sonnet, opus, haiku, fable, best, opusplan, sonnet[1m], opus[1m]) or full nameclaude --model claude-sonnet-5Docs ↗
--effortintermediateEffort for this session: low, medium, high, xhigh, max, ultracode (levels depend on model; not persisted)claude --effort high`ultracode` 2.1.203; `xhigh` changelog 2.1.111Docs ↗
--fallback-modeladvancedComma list of models tried in order when the primary is overloaded or unavailableclaude --fallback-model sonnet,haikuchangelog 2.1.143Docs ↗
--advisor <model>advancedEnable the server side advisor tool (second model consulted at key moments) for this sessionclaude --advisor opusDocs ↗
--autocompact <auto|tokens>advancedAuto compact window for this launch (100K to 1M tokens, or auto)claude --autocompact 500k2.1.221Docs ↗
--system-promptadvancedReplace the entire default system promptclaude --system-prompt "You are a Python expert"Docs ↗
--system-prompt-fileadvancedReplace the prompt with a file's contentsclaude --system-prompt-file ./prompts/review.txtchangelog 1.0.55; docs only (not in local `--help`)Docs ↗
--append-system-promptintermediateAppend text to the default prompt (keeps tool guidance and safety)claude --append-system-prompt "Always use TypeScript"changelog 1.0.51Docs ↗
--append-system-prompt-fileintermediateAppend a file's contents; both append flags can be combined from 2.1.283claude -p --append-system-prompt-file ./style.md "Summarize README.md"docs onlyDocs ↗
--append-subagent-system-prompt[-file]advancedAppend text to every subagent's system prompt (print mode only)claude -p --append-subagent-system-prompt "Cite file paths" "query"2.1.205 / `-file` 2.1.261Docs ↗
--betasadvancedBeta headers (API key users only)claude --betas interleaved-thinkingDocs ↗
--briefadvancedEnable the SendUserMessage tool for agent to user messagesclaude --brieflocal `--help` only; not in the docs flag table (UNVERIFIED in docs)Docs ↗
--file <specs...>advancedDownload file resources at startup, file_id:relative_pathclaude --file file_abc:doc.txtlocal `--help` only; not in the docs flag table (UNVERIFIED in docs)Docs ↗

Permissions and tools8

FeatureWhat it doesHowSinceDocs
--permission-modebeginnerStart in default (alias manual), acceptEdits, plan, auto, dontAsk, bypassPermissionsclaude --permission-mode plan`manual` alias 2.1.200Docs ↗
--allowedTools, --allowed-toolsintermediateTools that run without prompting; uses permission rule syntaxclaude -p "..." --allowedTools "Bash(git log *)" "Bash(git diff *)" "Read"Docs ↗
--disallowedTools, --disallowed-toolsintermediateDeny rules; a bare tool name removes it from Claude's contextclaude --disallowedTools "Bash(git log *)" "Edit"Docs ↗
--toolsadvancedRestrict which built in tools exist: "" none, "default", or namesclaude --tools "Bash,Edit,Read"changelog 2.1.0 (interactive)Docs ↗
--dangerously-skip-permissionsadvancedSkip all permission prompts (same as bypassPermissions); sandboxes onlyclaude --dangerously-skip-permissionschangelog 1.0.7Docs ↗
--allow-dangerously-skip-permissionsadvancedAdds bypassPermissions to the Shift+Tab cycle without starting in itclaude --permission-mode plan --allow-dangerously-skip-permissionsDocs ↗
--add-dirintermediateExtra working directories Claude can read and edit (most .claude/ config in them is not discovered)claude --add-dir ../apps ../libchangelog 1.0.18Docs ↗
--disable-slash-commandsadvancedDisable all skills and commands for the sessionclaude --disable-slash-commandsDocs ↗

Config, MCP, agents, plugins10

FeatureWhat it doesHowSinceDocs
--settingsintermediateSettings JSON file (2 MiB max) or inline JSON overriding file settings for this sessionclaude --settings ./settings.jsonchangelog 1.0.61Docs ↗
--setting-sourcesadvancedWhich sources to load: user, project, localclaude --setting-sources user,projectDocs ↗
--mcp-configintermediateLoad MCP servers from JSON files or strings; with -p it waits for servers (up to MCP_TIMEOUT, 30s)claude --mcp-config ./mcp.jsonchangelog 0.2.75Docs ↗
--strict-mcp-configadvancedOnly use servers from --mcp-configclaude --strict-mcp-config --mcp-config ./mcp.jsonDocs ↗
--agentsadvancedDefine subagents as JSON (file path allowed with --print from 2.1.281)claude --agents '{"reviewer":{"description":"Reviews code","prompt":"You are a code reviewer"}}'changelog 2.0.0Docs ↗
--agentadvancedRun the session as a named agent (overrides agent setting)claude --agent my-custom-agentchangelog 2.0.59Docs ↗
--plugin-diradvancedLoad a plugin directory, .zip, or folder of plugins for this session (repeatable)claude --plugin-dir ./my-pluginfolder form 2.1.265Docs ↗
--plugin-urladvancedFetch a plugin .zip from a URL for this sessionclaude --plugin-url https://example.com/plugin.zipDocs ↗
--teammate-modeadvancedHow agent team teammates display: in-process, auto, tmux, iterm2claude --teammate-mode autodocs onlyDocs ↗
--channelsadvanced(Research preview) MCP channel notifications to listen forclaude --channels plugin:my-notifier@my-marketplacedocs onlyDocs ↗

Environment, debugging, display11

FeatureWhat it doesHowSinceDocs
--verbosebeginnerFull turn by turn output; required with stream-jsonclaude --verboseDocs ↗
-d, --debug [filter]intermediateDebug logs with optional category filter; the filter binds only in = formclaude --debug='mcp,startup' or --debug='!mcp'changelog 0.2.117Docs ↗
--debug-file <path>intermediateWrite debug logs to a file (implies debug)claude --debug-file /tmp/claude-debug.logDocs ↗
--chrome / --no-chromeintermediateEnable or disable Claude in Chrome integrationclaude --chromechangelog 2.0.72 (Chrome beta)Docs ↗
--ideintermediateAuto connect to the IDE on startup if exactly one valid IDE is availableclaude --ideDocs ↗
--ax-screen-readerintermediateFlat, screen reader friendly output; forces the classic rendererclaude --ax-screen-reader2.1.181Docs ↗
-v, --versionbeginnerPrint the versionclaude -vDocs ↗
-h, --helpbeginnerList flags and subcommands (not exhaustive)claude --help, claude <sub> --helpDocs ↗
--environment, --refadvancedRun a cloud session on a self hosted environment (ccpool_...), optionally from a refclaude -p "Run the smoke test" --environment ccpool_abc123 --ref main2.1.224Docs ↗
--dangerously-load-development-channelsadvancedTest channels not on the allowlist (interactive only)claude --dangerously-load-development-channels server:webhookdocs onlyDocs ↗
--enable-auto-modebeginnerREMOVED in 2.1.111; auto mode is already in the Shift+Tab cycleuse --permission-mode autoremoved 2.1.111Docs ↗

Keyboard shortcuts and input

Interactive mode: keyboard, input, display50

FeatureWhat it doesHowSinceDocs
Interrupt or clearbeginnerInterrupts a running operation; if idle, first press clears the input, second exitsCtrl+CDocs ↗
ExitbeginnerFirst press shows a hint, second within 800 ms exits (deletes a char if the prompt has text)Ctrl+D or /exitDocs ↗
Stop Claude mid turnbeginnerStops the current response or tool call; work done so far is kept; also closes dialogsEscDocs ↗
Clear draft, or rewindbeginnerWith text in the prompt, double Esc clears it (saved to history); with an empty prompt it opens the rewind menuEsc Escchangelog 2.1.83 (clear)Docs ↗
Bring back a cleared draftintermediatePress Up right after Ctrl+C clears (2.1.288), or Up after sending to step back to one of the last ten cleared drafts (2.1.292)Up2.1.288 / 2.1.292 (newer than local)Docs ↗
Cycle permission modesbeginnerManual, acceptEdits, plan, then auto/bypass when availableShift+Tab (or Alt+M on Windows when VT input mode is off)changelog 1.0.56 (Windows fix)Docs ↗
Reverse history searchbeginnerSearches prompt history; in fullscreen opens a dialog (Ctrl+S cycles session / project / all projects)Ctrl+Rchangelog 0.2.54 (full output toggle at the time)Docs ↗
History navigationbeginnerUp/Down moves the cursor first in multiline input, then historyUp / Down or Ctrl+P / Ctrl+NDocs ↗
Background a running taskintermediateMoves running Bash commands and agents to the background (tmux: press twice)Ctrl+Bchangelog 2.1.0 (unified)Docs ↗
Task checklistintermediateShow or hide Claude's to do checklist (up to five items shown)Ctrl+TDocs ↗
Transcript viewerintermediateDetailed tool use and timestamps; expands collapsed linesCtrl+ODocs ↗
Toggle extended thinkingintermediatePer session switch; no effect on models that always think (Opus 5.5, Sonnet 5.5, Haiku 5.5, Fable)Option+T (macOS) / Alt+Tchangelog 2.0.72 (moved from Tab)Docs ↗
Switch modelintermediateChanges model without clearing your promptOption+P / Alt+PDocs ↗
Toggle fast modeintermediateOn or offOption+O / Alt+ODocs ↗
Paste an imagebeginnerInserts an [Image #N] chipCtrl+V (Cmd+V in iTerm2, Alt+V on Windows/WSL)changelog 0.2.59Docs ↗
Stash and restore promptintermediateStash the text; press again on an empty prompt to restore (including ! shell mode)Ctrl+SDocs ↗
Edit prompt in your editorintermediateOpens the prompt (or a plan) in $EDITORCtrl+G or Ctrl+X Ctrl+EDocs ↗
Redraw screenbeginnerFixes garbled output, keeps input and historyCtrl+LDocs ↗
Suspend (Unix)intermediateSuspends to the shell; fg resumesCtrl+ZDocs ↗
Stop all background subagentsadvancedPress twice within 3 secondsCtrl+X Ctrl+KDocs ↗
Queue messages while Claude worksintermediatePress Enter while Claude is busy; messages go out when tool calls finish or the turn ends; Up takes them backtype + EnterDocs ↗
Send queued messages nowintermediateSends the queue (and your draft) immediatelyCtrl+Enter or Ctrl+X Ctrl+S2.1.275Docs ↗
Multiline entrybeginnerNewline without sending\ then Enter (any terminal), Ctrl+J (any terminal), Shift+Enter (iTerm2, WezTerm, Ghostty, Kitty, Warp, Apple Terminal, Windows Terminal), Option+Enter (macOS with Option as Meta); run /terminal-setup once in VS Code, Cursor, Zed, old AlacrittyDocs ↗
Large pastebeginnerPastes over 800 characters or 3 lines collapse to [Pasted text #1 +120 lines] but Claude sees the full textpaste normallyDocs ↗
/ commands and skillsbeginnerStart of message runs a command or skill; / after a space completes mid prompttype /Docs ↗
! shell modebeginnerRuns a shell command directly; output enters the conversation and Claude responds; Tab completes from past ! commands; exit with Esc / Backspace / Ctrl+U on empty prompt; runs outside the sandbox in most sessions! npm testchangelog 0.2.66Docs ↗
@ file mentionsbeginnerAutocompletes paths and includes file content (up to 25,000 tokens; text files over 256 KB are not included); directories show listings; @server:resource pulls MCP resourcesExplain @src/utils/auth.jschangelog 0.2.75Docs ↗
: emoji shortcodesbeginner:heart: inserts the emoji; :he shows suggestionstype :name:Docs ↗
? shortcut helpbeginnerShows the shortcut panel on an empty input?Docs ↗
# quick memorybeginnerNot documented. No # shortcut appears in the interactive mode or memory pages (searched fresh). Use /memory or ask Claude to edit CLAUDE.md.NoneUNVERIFIED (treat as not a current feature)Docs ↗
Prompt suggestionsbeginnerGreyed next prompt suggestion; Tab or Right arrow places it, Enter submits (Enter to submit added 2.0.70); costs a small cached requestTab / Right arrow; toggle in /configchangelog 2.0.70Docs ↗
Vim editor modeintermediateVim style prompt editing: mode keys, hjkl, w/e/b, 0 $ ^, gg G, f/F/t/T, x r dd D cc C yy p >>, etc. (% and d0 need newer versions)Enable in /config then Editor mode (/vim was removed in 2.1.92)`%` 2.1.301, `d0` 2.1.281 (newer than local)Docs ↗
Voice dictationintermediateHold Space to record (or /voice tap); needs a claude.ai login and a local mic; not in SSH/cloud sessions; transcription does not use tokens/voice [hold|tap|off]Docs ↗
Spell checkintermediateUnderlines misspellings in the prompt box (off by default)see the page (off by default)2.1.235Docs ↗
Side question /btwbeginnerQuick question that never enters the conversation history/btw what does X do?changelog 2.1.79 areaDocs ↗
/diff panelbeginnerReview uncommitted changes without leaving; side panel in fullscreen, dialog otherwise/diffdiff panel changelog 2.1.260Docs ↗
Session recapbeginnerOne line "while you were away" summary after 3+ minutes; /recap on demand/recapchangelog 2.1.108Docs ↗
Auto continue after usage limitintermediateWaits for a claude.ai limit reset then continues; Esc cancelsautomatic; /rate-limit-options2.1.234Docs ↗
PR status in footerbeginnerClickable PR #446 link coloured by review state (green approved, yellow pending, red changes requested, gray draft)automatic on a branch with an open PRDocs ↗
Invisible character strippingintermediateRemoves zero width and bidi tag characters from pasted text on Enter, then asks you to press Enter againautomaticDocs ↗
Text editing shortcutsintermediateCtrl+A/E line start/end, Ctrl+K delete to end, Ctrl+U delete to start, Ctrl+W delete word/path, Ctrl+Y paste deleted text, Alt+B/F/D word moves, Ctrl+_ undokeys listedDocs ↗
Fullscreen renderingintermediateFlicker free alternate screen UI with mouse support, fixed input box, transcript search/tui fullscreen (/tui default to return)changelog 2.1.110Docs ↗
Transcript viewer keys (fullscreen)advanced? help, { } prompt jumps, [ dump to scrollback, v open in editor, q/Esc exitinside Ctrl+O viewDocs ↗
Customize shortcutsadvancedRebind any action by context (Global, Chat, Autocomplete, Confirmation...)edit ~/.claude/keybindings.json or /keybindingsDocs ↗
Status lineintermediateShows model, context %, cost, git etc. at the bottom; your script gets session JSON on stdin and prints the text/statusline show model name and context percentage or "statusLine": {"type":"command","command":"~/.claude/statusline.sh"}changelog 1.0.71Docs ↗
ThemesbeginnerLight/dark/auto, daltonized, ANSI, custom themes from ~/.claude/themes//themeDocs ↗
Terminal bell / notificationsintermediateNotify when Claude finishes or needs permission (use a Notification hook for a sound)see pageDocs ↗
Screen reader modeintermediateFlat text, numbered menus, terminal bell on attentionclaude --ax-screen-reader or CLAUDE_AX_SCREEN_READER2.1.181Docs ↗
Prompt bar colourbeginnerPer session prompt bar colour (red, blue, green, yellow, purple, orange, pink, cyan)/color bluechangelog 2.1.75Docs ↗
Deep linksadvancedclaude-cli://open?... URLs open a session in a directory with a prefilled (never auto run) promptopen "claude-cli://open?..." (see page for params)Docs ↗

Slash commands

Type / in a session to see every command. Some are skills that ship with Claude Code, and the list changes often, so check the changelog below for new ones.

Conversation and context25

FeatureWhat it doesHowSinceDocs
/clear [name] (aliases /reset, /new)beginnerNew conversation with empty context; the old one stays resumable with /resumeNoneDocs ↗
/compact [instructions]beginnerSummarize the conversation to free context; optional focus textNonechangelog 2.0.31 mentionDocs ↗
/context [all]beginnerColoured grid of context usage plus optimization hints; all expands the breakdownNonechangelog 1.0.86Docs ↗
/resume [session]beginnerResume by ID or name, or open the picker (background sessions marked bg)Nonechangelog 1.0.27Docs ↗
/rewind (aliases /checkpoint, /undo)beginnerRoll back code and/or conversation to an earlier prompt, or summarize from a selected messageNonechangelog 2.0.0Docs ↗
/branch [name]intermediateFork the conversation at this point and switch into the branch; original stays in /resumeNonechangelog 2.1.77 (renamed from `/fork`)Docs ↗
/fork [prompt]intermediateCopy the conversation into a new background session and keep working hereNoneDocs ↗
/subtask <task>advancedSpawn a forked subagent that inherits the full conversation; result returns when doneNoneDocs ↗
/rename [name]beginnerName the session (auto generates a name with no argument)Nonechangelog 2.0.64Docs ↗
/export [filename]beginnerExport the conversation as plain text to clipboard or a fileNonechangelog 1.0.44Docs ↗
/copy [N]beginnerCopy the last (or Nth latest) response; picker for code blocksNoneDocs ↗
/recapbeginnerOne line summary of the session so farNonechangelog 2.1.108Docs ↗
/btw [question]beginnerSide question that does not enter the conversationNoneDocs ↗
/add-dir <path>intermediateAdd a working directory for file access this sessionNonechangelog 1.0.42Docs ↗
/cd <path>intermediateMove the session to a new working directory, keeping the conversationNonechangelog 2.1.169Docs ↗
/diffbeginnerReview uncommitted changesNoneDocs ↗
/focusintermediateToggle focus view: last prompt, one line tool summary and final answer (fullscreen only)Nonechangelog 2.1.110Docs ↗
/plan [description]beginnerEnter plan mode from the promptNonechangelog 2.1.0Docs ↗
/goal [condition|clear]intermediateKeep working across turns until a condition is metNonechangelog 2.1.139Docs ↗
/loop [interval] [prompt]intermediateRepeat a prompt on an interval while the session is open (skill)Nonechangelog 2.1.71Docs ↗
/schedule [description] (alias /routines)intermediateCreate, update, list or run cloud scheduled tasksNoneDocs ↗
/background [prompt] (alias /bg)intermediateDetach this session to run as a background agentNoneDocs ↗
/stopintermediateStop the background session you are attached toNoneDocs ↗
/tasks (alias /bashes)intermediateView and manage background shells and subagentsNoneDocs ↗
/exit (alias /quit)beginnerExit the CLI (in an attached background session, detaches)NoneDocs ↗

Model, behaviour and display18

FeatureWhat it doesHowSinceDocs
/model [model]beginnerSwitch model and save it as the default (press s in the picker for this session only); left/right adjusts effortNonechangelog 1.0.77Docs ↗
/effort [level|auto|status|ultracode [on|off]]intermediateSet effort low to max or auto; max is session onlyNonechangelog 2.1.76Docs ↗
/fast [on|off]intermediateToggle fast mode (same model, lower latency, higher price)Nonechangelog 2.1.36Docs ↗
/advisor [model|off]advancedEnable a second model that is consulted at key momentsNonetext form changelog 2.1.260Docs ↗
/autocompact [auto|size]advancedSet the auto compact window (100K to 1M tokens)None2.1.221Docs ↗
/output-style [style]intermediateSwitch output style (Default, Proactive, Concise, Explanatory, Learning, custom)None2.1.269Docs ↗
/config [key=value ...]beginnerSettings UI; key=value sets directly (also in -p)Nonechangelog 0.2.34Docs ↗
/themebeginnerColour theme pickerNoneDocs ↗
/color [color|default]beginnerPrompt bar colourNoneDocs ↗
/tui [default|fullscreen]intermediateSwitch renderer and relaunch with the conversation intactNonechangelog 2.1.110Docs ↗
/scroll-speedadvancedMouse wheel speed (fullscreen only)NoneDocs ↗
/statuslineintermediateConfigure the status line from a descriptionNonechangelog 1.0.71Docs ↗
/terminal-setupbeginnerInstall Shift+Enter for VS Code, Cursor, Zed, old Alacritty; Option+Enter in Apple TerminalNoneDocs ↗
/keybindingsadvancedOpen the keybindings fileNoneDocs ↗
/voice [hold|tap|off]intermediateToggle voice dictationNoneDocs ↗
/sandboxadvancedToggle sandbox mode (supported platforms)NoneDocs ↗
/permissionsintermediateView and edit allow/ask/deny rules, working directories, recent auto mode denialsNonechangelog 1.0.7Docs ↗
/vimbeginnerREMOVED in 2.1.92; use /config then Editor modeNoneremoved 2.1.92Docs ↗

Account, usage and surfaces18

FeatureWhat it doesHowSinceDocs
/login, /logoutbeginnerSign in or outNoneDocs ↗
/usage (aliases /cost, /stats)beginnerSession cost, plan limits, activity statsNone`/usage` changelog 2.0.0Docs ↗
/usage-creditsintermediateConfigure or request usage credits when you hit a limitNonerenamed from `/extra-usage` 2.1.144Docs ↗
/rate-limit-optionsintermediateOptions when a claude.ai limit blocks a requestNone2.1.284 listed in helpDocs ↗
/upgradebeginnerOpen the plan upgrade pageNoneDocs ↗
/statusbeginnerSettings on the Status tab: version, model, account, connectivityNoneDocs ↗
/privacy-settingsbeginnerView and update privacy settings (Pro and Max)NoneDocs ↗
/passesbeginnerShare a free week (only if eligible)NoneDocs ↗
/desktop (alias /app)intermediateContinue the session in the Claude Code Desktop appNoneDocs ↗
/mobile (aliases /ios, /android)beginnerQR code for the Claude mobile appNoneDocs ↗
/teleport (alias /tp)intermediatePull a cloud session into this terminalNonechangelog 2.1.0Docs ↗
/remote-control (alias /rc)intermediateMake this session controllable from claude.aiNoneDocs ↗
/remote-envadvancedDefault cloud environment for CLI cloud sessionsNoneDocs ↗
/web-setupintermediateConnect GitHub for cloud sessions via gh credentialsNoneDocs ↗
/chromeintermediateConfigure Claude in ChromeNoneDocs ↗
/ideintermediateManage IDE integrationsNoneDocs ↗
/install-github-appintermediateInstall the Claude GitHub App and optional Actions workflowNonechangelog 1.0.7Docs ↗
/install-slack-appintermediateInstall the Claude Slack appNoneDocs ↗

Project setup and extensibility19

FeatureWhat it doesHowSinceDocs
/initbeginnerCreate a CLAUDE.md guide (CLAUDE_CODE_NEW_INIT=1 for the interactive flow)NoneDocs ↗
/memorybeginnerEdit CLAUDE.md files, toggle auto memory, view entriesNoneDocs ↗
/mcp [reconnect|enable|disable ...]intermediateManage MCP servers and OAuthNonechangelog 1.0.18Docs ↗
/hooksintermediateView hook configurationNonechangelog 1.0.38Docs ↗
/plugin [subcommand]intermediateManage pluginsNonechangelog 2.0.12Docs ↗
/reload-plugins [--force]intermediateApply plugin changes without restartingNonechangelog 2.1.69Docs ↗
/skillsintermediateList skills (Space cycles visibility, t sorts by tokens)NoneDocs ↗
/reload-skillsintermediateRe scan skill and command directoriesNoneDocs ↗
/agentsintermediateReminder to ask Claude to manage subagents (interactive UI removed after v2.1.197)NoneDocs ↗
/list-agents (alias /peers)advancedList sessions and teammates Claude can messageNone2.1.224Docs ↗
/import [codex|gemini|cursor] [--dry-run] [--yes]intermediateImport another agent's configNoneDocs ↗
/doctor (alias /checkup)beginnerSetup checkup that proposes fixes (skill)NoneDocs ↗
/skill-doctoradvancedPer skill context cost and usageNone2.1.252Docs ↗
/setup-bedrock, /setup-vertexadvancedProvider wizards (hidden until CLAUDE_CODE_USE_BEDROCK=1 / CLAUDE_CODE_USE_VERTEX=1)NoneDocs ↗
/auto-mode-setupadvancedDraft autoMode.environment entriesNone2.1.228Docs ↗
/fewer-permission-promptsintermediateScan transcripts and add a read only allowlist (skill)NoneDocs ↗
/update-config [request]intermediateEdit settings.json from a description (skill)NoneDocs ↗
/plugin-authoring, /workflow-authoringadvancedReference skills for writing mods and workflow scriptsNone2.1.287 / 2.1.248Docs ↗
/workflowsadvancedProgress view for dynamic workflowsNoneDocs ↗

Review, quality and help18

FeatureWhat it doesHowSinceDocs
/code-review [low..max|ultra] [--fix] [--comment] [--max-findings n] [target]intermediateReview the diff, PR or path for bugs (skill)Nonechangelog 2.1.147Docs ↗
/reviewintermediateAlias of /code-reviewNoneDocs ↗
/security-reviewintermediateSecurity review of the branch diff against origin's default branchNoneDocs ↗
/ultrareview [PR or branch]advancedCloud multi agent review (3 free runs on Pro and Max, then usage credits)Nonechangelog 2.1.111Docs ↗
/simplify [target]intermediateCleanup review with four parallel agents, applies fixes (skill)Nonechangelog 2.1.63Docs ↗
/batch <instruction>advancedParallel large scale change across 5 to 30 worktree subagents (skill)Nonechangelog 2.1.63Docs ↗
/debug [description]intermediateTurn on debug logging and analyze the log (skill)NoneDocs ↗
/run, /verify, /run-skill-generatorintermediateLaunch and drive the app to verify a change works (skills)NoneDocs ↗
/deep-research <question>intermediateWeb fan out research with a cited report (workflow)NoneDocs ↗
/autofix-pr [prompt]advancedCloud session that watches the PR and pushes fixesNoneDocs ↗
/insightsintermediateHTML report analysing your recent sessionsNonechangelog 2.1.101 mentionDocs ↗
/helpbeginnerHelp and available commandsNoneDocs ↗
/powerupbeginnerInteractive lessons with animated demosNonechangelog 2.1.90Docs ↗
/release-notesbeginnerVersion picker for the changelogNonechangelog 0.2.37Docs ↗
/bug [report], /feedback [report]beginnerReport a bug or send feedback (consent screen)NoneDocs ↗
/team-onboardingintermediateGenerate an onboarding guide from your last 30 days of usageNoneDocs ↗
/heapdumpadvancedWrite a heap snapshot for memory diagnosis (hidden; do not share the .heapsnapshot)NoneDocs ↗
/radio, /stickersbeginnerLo fi radio in the browser; order stickersNoneDocs ↗

Other bundled skills and removed commands3

FeatureWhat it doesHowSinceDocs
/design, /design-sync, /design-login, /slides, /artifactsintermediateClaude Design and Slides artifact skills (need artifacts availability)None2.1.265 for `/design` and `/slides`Docs ↗
/artifact-capabilities, /artifact-diagramming, /datavizadvancedReference skills for artifacts and chartsNone`/artifact-diagramming` 2.1.221Docs ↗
/claude-api, /claude-in-chromeintermediateAPI reference skill; browser task skillNoneDocs ↗

Sessions, context, models and workflows

Shell
#!/usr/bin/env bash
# Pick a conversation back up.
# Source: https://code.claude.com/docs/en/sessions#resume-a-session
claude --continue          # most recent session in this directory
claude --resume            # open the session picker
claude -c -p "Check for type errors"   # continue, non-interactively

Sessions and context25

FeatureWhat it doesHowSinceDocs
Continue the last sessionbeginnerReopens the most recent session in this directoryclaude --continuechangelog 0.2.93Docs ↗
Resume by name or IDbeginnerResume a session; ID search covers this project, its worktrees, then every projectclaude --resume <name|id>Docs ↗
Session pickerbeginnerEnter resume, Space preview, Ctrl+R rename, / search (paste a PR URL to find the session), Ctrl+A all projects, Ctrl+W all worktrees, Ctrl+B current branch/resume or claude --resumeDocs ↗
Name sessionsbeginnerName at startup, with /rename, or from the pickerclaude -n auth-refactorchangelog 2.0.64Docs ↗
Branch a sessionintermediateCopy the conversation and switch into the copy; or --continue --fork-session from the shell/branch try-streamingchangelog 2.1.77Docs ↗
What a resume restoresintermediateConversation, tool results, compaction state, goals; "Allow for this session" grants are not carried into --fork-session processesautomaticDocs ↗
Resume a running background sessionadvancedResuming a still running background session opens it via attachclaude --resume <name>2.1.285Docs ↗
Transcripts locationadvancedJSONL at ~/.claude/projects/<project>/<session>.jsonl; claude purge deletesNoneDocs ↗
/clearbeginnerStart fresh in the same terminal; previous session kept for /resume (or the rewind menu's "previous session" entry)/clearDocs ↗
/compact with instructionsbeginnerSummarize to free context, steering what is kept/compact keep the API changes and the test commandsDocs ↗
Auto compactionintermediateHappens automatically near the limit; stops with a "thrashing" error if a single output refills context after a few triesautomaticDocs ↗
What survives compactionintermediateSystem prompt, project CLAUDE.md and unscoped rules, auto memory, plan mode plan are re injected; up to 5 recently touched files re read (over 5,000 tokens become path references); skill bodies re injected capped at 5,000 each / 25,000 total; path scoped rules and nested CLAUDE.md reload on demandNoneskill descriptions re injected needs 2.1.304Docs ↗
Check contextbeginnerLive breakdown by category with suggestions/contextchangelog 1.0.86Docs ↗
Context window sizesintermediateFable 5.1, Fable 5, Sonnet 5+, Haiku 5.5, Opus 4.7+ run a native 1M window; Opus 4.6 and Sonnet 4.6 reach 1M only via [1m]; native-1M models auto compact at about 967K by default/model sonnet[1m]Docs ↗
Set the auto compact windowadvanced100K to 1M tokens; per model with /autocompact, per launch with --autocompact, or CLAUDE_CODE_AUTO_COMPACT_WINDOW/autocompact 500k2.1.221Docs ↗
Rewind and checkpointsbeginnerA checkpoint is taken before every prompt that starts a turn; the 100 most recent are kept; restore code, conversation, both, or summarize from/up to a point/rewind or Esc Escchangelog 2.0.0Docs ↗
Checkpoint limitsintermediateBash only file changes, subagent edits, external edits, symlinks are not restored; not a replacement for GitNoneDocs ↗
Export a transcriptbeginnerPlain text to clipboard or file/export notes.txtchangelog 1.0.44Docs ↗
Script access to sessionsintermediate--output-format json gives session_id; capture and --resume "$id"id=$(claude -p "..." --output-format json | jq -r .session_id)Docs ↗
Cost and usagebeginner/usage shows session cost (an estimate at list price), plan limits and activity; totals reset on /clear (since 2.1.211)/usage`/usage` changelog 2.0.0Docs ↗
Token count beside spinnerbeginner(10m 27s · ↓ 5.5k tokens) shows elapsed time and output tokensvisible while Claude worksDocs ↗
Reduce token useintermediateClear between tasks, compact with a focus, pick the right model, use subagents for noisy work, specific prompts, plan modesee pageDocs ↗
Image inputbeginnerDrag and drop, Ctrl+V paste, or give a path; PNG/JPEG/GIF/WebP; large images are downscaled; refuses over 128 MBAnalyze this image: /path/img.pngDocs ↗
PDF inputintermediateShort PDFs read whole; longer than 10 pages read in ranges of up to 20 pages (needs pdftoppm from poppler)give Claude the PDF path in your prompt (page-range reads call the Read tool)Docs ↗
Prompt cachingadvancedAutomatic; a model switch triggers one slow uncached turn; CLAUDE.md edits do not apply mid sessionNoneDocs ↗

Models, effort, thinking, fast mode14

FeatureWhat it doesHowSinceDocs
Model aliasesbeginnerdefault, best, fable, sonnet, opus, haiku, sonnet[1m], opus[1m], opusplan/model opus or --model sonnetDocs ↗
Where aliases point (Anthropic API)intermediateopus = Opus 5.5, sonnet = Sonnet 5.5, haiku = Haiku 5.5, fable = Fable 5.1; older on Bedrock, Vertex, FoundryNoneSonnet 5.5 needs 2.1.284, Opus 5.5 needs 2.1.280Docs ↗
Default modelbeginnerPro, Max, Team, Enterprise and API default to Opus 5.5/model default clears an overrideDocs ↗
Model priority orderintermediate/model in session, then --model, then ANTHROPIC_MODEL, then settings model, then ANTHROPIC_DEFAULT_MODELNoneDocs ↗
opusplanintermediateOpus in plan mode, Sonnet when executing/model opusplanDocs ↗
Fallback chainsadvancedFall back to other models when the primary is overloadedclaude --fallback-model sonnet,haiku or fallbackModel settingchangelog 2.1.143 / 2.1.166Docs ↗
Effort levelsintermediateFable and 5.x/4.7/4.8 models: low, medium, high, xhigh, max; Opus 4.6 and Sonnet 4.6: low..max without xhigh; default high (Opus 5.5, Sonnet 5.5, Haiku 5.5 default medium)/effort high, claude --effort high, CLAUDE_CODE_EFFORT_LEVEL`/effort` changelog 2.1.76Docs ↗
ultrathinkbeginnerPut the word in a prompt for deeper reasoning on that turn only (rainbow when it can raise effort to xhigh)include ultrathink in the prompt2.1.311 for the rainbow behaviour (newer than local)Docs ↗
Other "think" phrasesbeginnerthink, think hard, think more are ordinary text, not keywordsNoneDocs ↗
Extended thinking controlsintermediateToggle with Option+T/Alt+T; default in /config (alwaysThinkingEnabled); MAX_THINKING_TOKENS=0 disables where allowed; cannot be turned off on Opus 5.5, Sonnet 5.5, Haiku 5.5, Fable; Ctrl+O shows thinking; thinking tokens are billed as outputsee leftDocs ↗
Fast modeintermediateSame model quality, lower latency, higher per token price (Opus 5.5 $8 / $40 per MTok, Opus 5 and 4.8 $10 / $50); research preview; Anthropic API or subscription with usage credits only/fast, Option+O/Alt+O, or "fastMode": truechangelog 2.1.36Docs ↗
AdvisoradvancedA second model consulted at key moments (must rank at or above the main model)/advisor opus, --advisor opus, advisorModel settingDocs ↗
Output stylesintermediateDefault, Proactive, Concise, Explanatory, Learning, or a custom Markdown file; saved to .claude/settings.local.json/output-style concise2.1.269Docs ↗
Check the current modelbeginnerIn the status line, or /status/statusDocs ↗

Permission modes and plan mode10

FeatureWhat it doesHowSinceDocs
default (Manual)beginnerAsks before anything but reads--permission-mode default or manual`manual` alias 2.1.200Docs ↗
acceptEditsbeginnerAuto approves file edits and common filesystem commands (mkdir, touch, rm, mv, cp) in the working directory--permission-mode acceptEditsDocs ↗
planbeginnerClaude reads and proposes a plan, makes no source edits until you approveclaude --permission-mode plan, /plan, Shift+Tabchangelog 1.0.33 areaDocs ↗
Approve a planbeginnerChoose "Yes, and use auto mode", "Yes, manually approve edits" or "No, keep planning"; Ctrl+G edits the plan in your editorat the plan promptDocs ↗
autointermediateA classifier model reviews actions and blocks risky ones; the built in start mode for interactive terminal sessions from 2.1.283--permission-mode autostart mode 2.1.283; Windows 2.1.233Docs ↗
dontAskadvancedAuto denies anything that would prompt; reads inside the working dirs and pre approved tools only; never in the Shift+Tab cycle--permission-mode dontAskDocs ↗
bypassPermissionsadvancedNo prompts and no safety checks; deny rules still apply; containers and VMs only--dangerously-skip-permissionsDocs ↗
Mode cyclebeginnerdefault then acceptEdits then plan, then bypass (if enabled) and auto; from auto the first press goes to default. Status bar shows the active modeShift+TabDocs ↗
Default mode in settingsintermediateSet the start mode for a project or machinepermissions.defaultMode in settings (auto and bypassPermissions are ignored in shared project files)Docs ↗
Mode in -p runsintermediateclaude -p with no mode set starts in Manual mode from v2.1.302, so unapproved calls are deniedadd --allowedTools or --permission-mode2.1.302 (newer than local)Docs ↗

Background work and scheduling13

FeatureWhat it doesHowSinceDocs
Background BashintermediateLong commands run asynchronously; output is written to a file Claude can read; timed out commands are moved to the backgroundCtrl+B or ask Claudechangelog 2.1.0Docs ↗
Agent viewintermediateOne screen listing every session (working, needs input, ready for review, completed) with peek and replyclaude agentschangelog 2.1.139 (research preview)Docs ↗
Open agent view by defaultintermediateclaude with no arguments opens the list/config settingDocs ↗
Dispatch to backgroundintermediateStart a background session from the shell, or detach the current oneclaude --bg "task", /background, /forkDocs ↗
Agent view keysadvancedSpace peek, Enter/Right attach, Ctrl+T pin, Ctrl+X stop (twice to delete), Ctrl+S group by state/directory, Alt+1..9 attach, ? helpin agent viewDocs ↗
Background session isolationadvancedA background session moves to a worktree before editing filesautomaticDocs ↗
Turn off agent viewadvanceddisableAgentView setting or CLAUDE_CODE_DISABLE_AGENT_VIEWsettingsDocs ↗
/loopintermediateRepeat a prompt on an interval (minimum 1 minute); omit the interval and Claude self paces 1 min to 1 hour; custom default prompt in loop.md; Esc stops/loop 5m check if the deploy finishedchangelog 2.1.71Docs ↗
One time remindersintermediateDescribe a one shot task in natural language; it deletes itself after running"remind me at 3pm to ..."Docs ↗
Session scoped schedule limitsadvancedFires only while the session is open and idle; recurring tasks expire after 7 days; CLAUDE_CODE_DISABLE_CRON=1 turns it offNoneDocs ↗
Compare scheduling optionsintermediateCloud tasks (no machine needed, 1 hour minimum), Desktop tasks (local files, 1 minute), /loop (open session, 1 minute)/schedule for cloudDocs ↗
/goalintermediateKeep going across turns until a condition holds; a Stop hook evaluator (Haiku by default) judges it each turn; works with -p/goal all tests in test/auth pass and lint is clean; /goal clearchangelog 2.1.139Docs ↗
Run Claude on a scheduleintermediatePick cloud, desktop or /loopsee pageDocs ↗

Common workflows (from the docs)17

FeatureWhat it doesHowSinceDocs
Understand a new codebasebeginnerAsk for an overview, architecture, key filesgive me an overview of this codebaseDocs ↗
Fix a bugbeginnerPaste the error, ask for causes, apply the fixI'm seeing an error when I run npm testDocs ↗
RefactorbeginnerFind legacy patterns, refactor in small steps, run testsrefactor utils.js to use ES2024 features while maintaining the same behaviorDocs ↗
TestsbeginnerFind untested code, scaffold, add edge cases, runfind functions in NotificationsService.swift that are not covered by testsDocs ↗
Pull requestsbeginnerAsk Claude to summarize changes and open the PR; sessions are auto linked to the PR (claude --from-pr)create a pr`--from-pr` changelog 2.1.27Docs ↗
DocumentationbeginnerFind undocumented code and generate docsadd JSDoc comments to the undocumented functions in auth.jsDocs ↗
Notes and non code foldersbeginnerRun in a markdown vault to search and reorganizeclaude in the folderDocs ↗
Resume previous conversationsbeginner--continue, --resume, /resumeclaude --continueDocs ↗
Parallel sessions with worktreesintermediateSeparate checkout per session, no edit collisions; needs at least one commitclaude --worktree feature-authchangelog 2.1.49Docs ↗
Ask Claude to use a worktreeintermediate"work in a worktree" triggers the EnterWorktree toolpromptDocs ↗
Worktree extrasadvancedCleanup prompt on exit, .worktreeinclude copies gitignored files such as .env, worktree.baseRef, WorktreeCreate hook replaces creation; add .claude/worktrees/ to .gitignoresee pageDocs ↗
Plan before editingbeginnerPlan mode first, approve, then editclaude --permission-mode planDocs ↗
Delegate research to subagentsintermediateExploration runs in a separate context and only a summary returnsuse a subagent to investigate how our auth system handles token refreshDocs ↗
Pipe Claude into scriptsintermediatestdin/stdout like any Unix toolcat build-error.txt | claude -p 'concisely explain the root cause of this build error' > output.txtDocs ↗
Use Claude as a linter or commit helperintermediateWrap -p with --allowedTools in a script or package.jsonclaude -p "..." --allowedTools "Bash(git diff *)" "Bash(git commit *)"Docs ↗
Ask about Claude Code itselfbeginnerClaude answers from the current docscan Claude Code create pull requests?Docs ↗
Prompt librarybeginnerCopy paste prompts by task and roleNoneDocs ↗

Best practices (docs page summary)11

FeatureWhat it doesHowSinceDocs
Hooks vs CLAUDE.mdintermediateCLAUDE.md is guidance Claude may skip; anything that must happen every time belongs in a hook, deny rule or managed settingNoneDocs ↗
Tell Claude what it cannot seebeginnerWrite down only what it cannot learn from the repo; be specific (name the file, symptom, "fixed" criteria)NoneDocs ↗
Interview firstbeginnerAsk Claude to interview you with multiple choice questions when the requirement is vagueNoneDocs ↗
Keep CLAUDE.md shortintermediateEvery line is read on every task; scope rules with paths: frontmatter; put team procedures in skillsNoneDocs ↗
Give Claude a check to runintermediateTests, typecheck or a review prompt so "done" is verifiable; a Stop hook with exit code 2 can enforce itNoneDocs ↗
Steer the sessionbeginnerWatch the first minute, Esc when it drifts, /rewind to undo, after two failed corrections run /clear and rewrite the promptNoneDocs ↗
Change a default only when neededintermediateUse /usage to see where cost went; pick permission mode, model and effort deliberatelyNoneDocs ↗
Unattended runsadvancedDefine done, give a check, limit what it can touch, cap turns or spend, have a person approveNoneDocs ↗
Script templateadvancedclaude --bare -p "..." --allowedTools "..." --permission-mode dontAsk --max-turns 20 in a loop; try on three files firstNoneDocs ↗
Parallel sessionsintermediateclaude -w name per taskNoneDocs ↗
What you can stop doingintermediateOld workarounds the models no longer need; "think hard" phrases are just text, effort is the controlNoneDocs ↗

Topic 3 of 7

Configure

Settings, memory, permissions, security and models.

Settings files and keys

JSON
{
  "$schema": "https://json.schemastore.org/claude-code-settings.json",
  "permissions": {
    "allow": [
      "Bash(npm run lint)",
      "Bash(npm run test *)"
    ],
    "deny": [
      "Read(./.env)",
      "Read(./.env.*)"
    ]
  },
  "env": {
    "BASH_DEFAULT_TIMEOUT_MS": "300000"
  },
  "sandbox": {
    "enabled": true
  },
  "companyAnnouncements": [
    "Run /doctor if a setting does not seem to apply"
  ]
}

Settings: files, scopes, precedence, locations22

FeatureWhat it doesHowSinceDocs
User settingsbeginnerPersonal preferences for every project on this machine~/.claude/settings.json (Windows: %USERPROFILE%\.claude\settings.json)Docs ↗
Shared project settingsbeginnerTeam permissions, hooks, plugins and env for one repo; commit it.claude/settings.json in the project (read from the session's primary working directory)Docs ↗
Project local settingsbeginnerYour private overrides for one project; Claude Code git excludes it when it writes the file.claude/settings.local.json. Add it to .gitignore yourself if you create it by handfile lives at the repo root since v2.1.211Docs ↗
Managed settings (file)advancedOrganization policy that user, project, local and --settings cannot overridemacOS /Library/Application Support/ClaudeCode/managed-settings.json; Linux and WSL /etc/claude-code/managed-settings.json; Windows C:\Program Files\ClaudeCode\managed-settings.json; optional managed-settings.d/*.json merged alphabeticallyDocs ↗
Managed settings (MDM/registry)advancedSame policy delivered by device managementmacOS profile domain com.anthropic.claudecode; Windows HKLM\SOFTWARE\Policies\ClaudeCode value Settings (also an HKCU form)Docs ↗
Server managed settingsadvancedPolicy fetched from the claude.ai admin console or a Claude apps gateway, polled hourlyAdmin consoleDocs ↗
Managed policy helperadvancedRun an executable that computes the managed policy at startuppolicyHelper (managed only)Docs ↗
~/.claude.jsonintermediateFile Claude Code writes itself: account, personal MCP servers, per project trust, and the "global config" keys. Do not hand edit unless needed~/.claude.json; a corrupt copy is moved to ~/.claude/backups/.claude.json.corrupted.<timestamp> and the 5 newest backups are keptDocs ↗
Move the config homeadvancedStore settings, history and plugins somewhere elseenv CLAUDE_CONFIG_DIR (write an absolute path; cannot be set from project or local settings)Docs ↗
Precedence orderbeginnerWhich value wins when a key is in several placesManaged > command line (--settings) > .claude/settings.local.json > .claude/settings.json > ~/.claude/settings.json. Env vars are not a level; decided per pair (for example ANTHROPIC_MODEL beats the model key)Docs ↗
Lists mergeintermediateArray keys such as permissions.allow combine across files instead of overridingExceptions that take the whole value from the winner: fallbackModel, modelPicker, availableModels (managed), modelSettings per modelDocs ↗
Managed exceptionsadvancedA few restrictive values are honored from lower scopes even over managed settingsdisableClaudeAiConnectors, enableArtifact:false, isolatePeerMachines, permissions.blockReadsOutsideWorkingDirectories, autoMode.classifyAllShell, remoteControlAtStartup:false, crossSessionInbound, useAutoModeDuringPlan:false, syncClaudeAiSkills:false, syncClaudeAiPlugins:false, maxEffortLevelDocs ↗
One session overrideintermediateTry a setting without saving itclaude --settings '{"model":"claude-opus-5-5"}' (JSON or a file path). Applies above user, project and local, below managedDocs ↗
Restrict which sources loadadvancedLoad only chosen settings scopes--setting-sources user,project,localDocs ↗
/configbeginnerOpens the Settings interface (Config tab: theme, editor mode, verbose, output style, Project instructions and more). Not every key is in the menu/config, or set directly /config verbose=true, /config thinking=false. Terminal only (VS Code panel and desktop app have their own settings)Docs ↗
/statusbeginnerShows version, model, account and the Setting sources line (which files loaded, whether managed settings apply)/statusDocs ↗
claude doctor / /doctorbeginnerclaude doctor prints read only install and settings diagnostics; /doctor runs a full checkup that proposes fixes and asks before applyingclaude doctor in a shell; /doctor in a sessionDocs ↗
Live reloadbeginnerEdits to settings files (permissions, hooks, helpers) apply to the running session; model, effortLevel and some others are read once at startEdit and save; use /model, /effort mid-sessionDocs ↗
JSON schemabeginnerAutocomplete and validation in editors"$schema": "https://json.schemastore.org/claude-code-settings.json" (can lag the newest CLI)Docs ↗
Strict JSONbeginnerComments and trailing commas are errors; a bad file shows a Settings Error dialog, a bad entry shows a Settings Warning and is skippedValid JSON onlyDocs ↗
Cloud sessionsintermediateCloud sessions read only the committed .claude/settings.json (and server managed policy), not user or local filesCommit the key to the repoDocs ↗
Example filesbeginnerRealistic personal, team and managed settings filesSee pageDocs ↗

The `.claude/` directory layout13

FeatureWhat it doesHowSinceDocs
CLAUDE.md / rules/*.mdbeginnerInstructions loaded every session / topic scoped rulesproject ./CLAUDE.md or ./.claude/CLAUDE.md; global ~/.claude/CLAUDE.md; rules/ in either .claudeDocs ↗
settings.json, settings.local.jsonbeginnerPermissions, hooks, env, model defaults; local is project only and uncommittedproject .claude/ and global ~/.claude/Docs ↗
.mcp.jsonintermediateTeam shared MCP servers (project only)repo rootDocs ↗
skills/<name>/SKILL.md, commands/*.mdintermediateReusable prompts invoked with /name; commands are the older single file form.claude/skills, ~/.claude/skillsDocs ↗
agents/*.md, workflows/*.js, agent-memory/<name>/advancedSubagents, saved dynamic workflows, per subagent persistent memory.claude/ or ~/.claude/Docs ↗
output-styles/*.mdintermediateCustom output styles.claude/output-styles, ~/.claude/output-stylesDocs ↗
themes/*.json (global only)intermediateCustom color themes~/.claude/themes/<slug>.jsonDocs ↗
keybindings.json (global only)intermediateCustom keyboard shortcuts~/.claude/keybindings.json, open with /keybindingsDocs ↗
.worktreeincludeadvancedGitignored files to copy into new worktreesrepo rootDocs ↗
projects/<project>/memory/ (global only)intermediateAuto memory: Claude's notes to itself~/.claude/projects/<project>/memory/MEMORY.md plus topic filesDocs ↗
Transcripts and historyintermediatePlaintext session transcripts for resume, deleted after cleanupPeriodDays (default 30)~/.claude/projects/<project>/<session>.jsonl, file-history/, plans/, paste-cache/, debug/, backups/, usage-data/, feedback-bundles/Docs ↗
Plain text warningintermediateAnything that passes through a tool (file contents, command output, pasted text) is stored unencrypted on diskTreat ~/.claude as sensitive; clear with claude purgeDocs ↗
Session scratchpadadvancedPer session temp dir Claude uses instead of /tmp, no permission promptautomaticDocs ↗

Model and responses23

FeatureWhat it doesHowSinceDocs
modelbeginnerModel Claude Code starts withalias or full ID: "opus", "claude-opus-5-5". Overridden by ANTHROPIC_MODEL and --modelDocs ↗
modelOverridesadvancedMap model IDs to your provider's IDs (Bedrock ARNs)object: {"claude-opus-4-6":"arn:aws:bedrock:..."}Docs ↗
modelSettingsintermediateSaved effort level or auto compact window per model, or a per model effort cap{"claude-opus-5-5":{"effortLevel":"high"}}; /effort writes itv2.1.251Docs ↗
effortLevelintermediateDefault effort for models with no saved level"low", "medium", "high", "xhigh" (not max, not ultracode)Docs ↗
maxEffortLeveladvancedCap the effort level for every model or per model"low" to "max" (max = no cap). Lowest cap from any scope winsv2.1.267Docs ↗
alwaysThinkingEnabledintermediateTurn extended thinking off for every session (thinking is on by default)false to turn off. No effect on Opus 5.5, Sonnet 5.5, Haiku 5.5, FableDocs ↗
showThinkingSummariesintermediateShow summaries of thinking instead of a collapsed stubBoolean; default falseDocs ↗
fastModeintermediateTurn fast mode on where availableBoolean; /fast writes itDocs ↗
fastModePerSessionOptInadvancedRequire opting in to fast mode each sessionBoolean; default falseDocs ↗
fallbackModelintermediateOrdered backup models when the primary is overloaded (max 3)array: ["claude-sonnet-5","claude-haiku-4-5"]; "default" expands. Highest-precedence file wins whole. --fallback-model overridesDocs ↗
switchModelsOnFlagadvancedSwitch models automatically or pause when a safety classifier flags a requestBoolean; unset = switch automaticallyDocs ↗
availableModelsadvancedRestrict which models people can pickarray of aliases or IDs: ["sonnet","haiku"]. Managed list wins as-isDocs ↗
availableModelsMatchadvancedMake each model ID entry in availableModels match only the version it names"prefix" (default) or exactv2.1.283Docs ↗
deniedModelsadvancedBlock specific models even if availableModels permitsarray (managed only)v2.1.283Docs ↗
enforceAvailableModelsadvancedKeep the /model Default choice inside availableModelsBoolean; default falsev2.1.175Docs ↗
modelPickeradvancedChoose which models /model lists, in your order and labelsobject with options rows and optional replaceBuiltInOptionsv2.1.242Docs ↗
modelPricingadvancedReport spend at contracted rates instead of list priceobject with multiplier and overrides (managed)v2.1.242Docs ↗
advisorModeladvancedModel that answers when Claude calls the advisor tool"fable", "opus", "sonnet" or full ID. /advisor writes it; --advisor overridesDocs ↗
outputStylebeginnerActive output style (case sensitive: Concise, Proactive, Explanatory, Learning, or a custom name)string; /output-style writes .claude/settings.local.jsonDocs ↗
languagebeginnerLanguage Claude responds inany language name: "japanese"Docs ↗
promptCacheTtladvancedPrompt cache lifetime for the main conversation"5m" or "1h"v2.1.242Docs ↗
subagentPromptCacheTtladvancedCache lifetime for subagents, workflows and helper requests"5m" or "1h"v2.1.242Docs ↗
ultracodeadvancedPlan a dynamic workflow for each substantive task without being askedBooleanDocs ↗

Git and attribution6

FeatureWhat it doesHowSinceDocs
attributionbeginnerCustomize or hide commit and PR attribution{"commit":"...","pr":"","sessionUrl":false} or falsev2.1.281 (part)Docs ↗
attribution.commitbeginnerCommit trailer text (default Co-Authored-By: <name> <email>)stringDocs ↗
attribution.prbeginnerPR description line (default "Generated with Claude Code")string, "" hidesDocs ↗
attribution.sessionUrlintermediateOmit the claude.ai session link from cloud/Remote Control commitsBoolean; default trueDocs ↗
includeGitInstructionsintermediateRemove built in commit/PR instructions from contextBoolean; default trueDocs ↗
prUrlTemplateadvancedPoint PR links at an internal review toolURL template with 5 placeholdersDocs ↗

Hooks, automation, plugins, skills, MCP27

FeatureWhat it doesHowSinceDocs
hooksintermediateRun commands at lifecycle eventsobject keyed by event with {matcher, hooks} groupsDocs ↗
disableAllHooksadvancedTurn off hooks, custom status line and custom @ file suggestion at onceBooleanv2.1.309Docs ↗
allowManagedHooksOnlyadvancedOnly run org deployed hooksBoolean (managed)v2.1.310Docs ↗
allowedHttpHookUrlsadvancedLimit URLs HTTP hooks can callarray with *Docs ↗
httpHookAllowedEnvVarsadvancedLimit env vars HTTP hooks can put in headersarray of namesDocs ↗
enableWorkflows / disableWorkflowsadvancedTurn dynamic workflows on/off (disable is for everyone)BooleanDocs ↗
workflowKeywordTriggerEnabledadvancedLet the word ultracode in a prompt start a workflowBoolean; default trueDocs ↗
workflowSizeGuidelineadvancedAgent count Claude aims for in workflows"unrestricted", "small" (<5), "medium" (<10), "large" (<50)Docs ↗
enabledPluginsintermediateTurn individual plugins on/off per scope{"name@marketplace":true}Docs ↗
extraKnownMarketplacesadvancedRegister marketplaces for a repo or orgobject name to sourcev2.1.238 (part)Docs ↗
strictKnownMarketplacesadvancedAllowlist marketplace sourcesarray (managed)Docs ↗
blockedMarketplacesadvancedBlock marketplace sourcesarray (managed)v2.1.223Docs ↗
strictPluginOnlyCustomization (+ .agents, .hooks, .mcp, .skills)advancedLock agents/hooks/MCP/skills to plugin and managed sourcestrue or array of kinds (managed)Docs ↗
pluginConfigsadvancedSaved answers to plugin config dialogs; also holds cc-plugin-agents-md@builtinobject (user or managed)Docs ↗
prependPlugins / appendPluginsadvancedRun org mods before/after a user's modsarray name@marketplaceDocs ↗
allowedChannelPlugins / channelsEnabledadvancedAllowlist channel plugins / allow channels for the orgmanagedv2.1.267Docs ↗
pluginSuggestionMarketplaces, pluginTrustMessage, disableCommandPluginSourcesadvancedMarketplace install suggestions, trust warning text, block command installed pluginsmanagedv2.1.229 (last)Docs ↗
disableBundledSkillsintermediateTurn off skills/workflows shipped with Claude CodeBooleanDocs ↗
skillOverridesintermediateHide or collapse a skill without editing it{"skill":"on"}: "on", "name-only", "user-invocable-only", "off"Docs ↗
disableSkillShellExecutionadvancedStop skills and commands running inline shellBooleanDocs ↗
syncClaudeAiPlugins / syncClaudeAiSkillsadvancedStop loading plugins/skills enabled on your claude.ai accountfalse honored from user, local, managedv2.1.273 (plugins)Docs ↗
enableAllProjectMcpServersadvancedApprove every server in project .mcp.jsonBooleanDocs ↗
enabledMcpjsonServers / disabledMcpjsonServersintermediateApprove / reject named .mcp.json serversarray of namesDocs ↗
allowedMcpServers / deniedMcpServersadvancedAllowlist / blocklist MCP servers by name, URL or commandarrays of single-key objectsDocs ↗
allowManagedMcpServersOnlyadvancedManaged MCP allowlist is the only oneBoolean (managed)Docs ↗
managedMcpServersadvancedProvide remote MCP servers to every userobject (managed)v2.1.259Docs ↗
allowAllClaudeAiMcps, allowClaudeInChromeWithManagedMcp, disableClaudeAiConnectorsadvancedclaude.ai connector and Chrome behavior alongside managed MCPBooleanv2.1.282 (Chrome)Docs ↗

Agents, sessions, worktrees, remote, desktop, notifications19

FeatureWhat it doesHowSinceDocs
agentintermediateStart every session as a named subagentstring; --agent overridesDocs ↗
teammateModeintermediateWhere agent team teammates display"in-process", "auto", "tmux", "iterm2"Docs ↗
disableAgentViewadvancedTurn off background agents and agent viewBooleanDocs ↗
crossSessionInboundadvancedWhat to do with messages from your other sessions"accept", "hold", "refuse"v2.1.224Docs ↗
isolatePeerMachinesadvancedAsk before messaging a session on another machineBooleanv2.1.224Docs ↗
processWrapperadvancedRun background processes through a corporate launcher (macOS, Linux)argv-prefix string (user or managed)v2.1.210Docs ↗
worktreeintermediateConfigure git worktrees{baseRef, symlinkDirectories, sparsePaths, bgIsolation}Docs ↗
worktree.baseRefintermediateBranch worktrees from "fresh" (origin default) or "head"enum; default "fresh"Docs ↗
worktree.symlinkDirectoriesintermediateSymlink big dirs (node_modules) instead of copyingarrayDocs ↗
worktree.sparsePathsadvancedCheck out only the directories you needarrayDocs ↗
worktree.bgIsolationadvancedBackground session edit isolation"worktree" or "none"Docs ↗
worktree.locationadvancedWhere Desktop SSH worktrees gopath (user only)Docs ↗
remoteControlAtStartup, disableRemoteControlintermediateAuto connect Remote Control / disable it everywhereBooleanDocs ↗
remote.defaultEnvironmentIdadvancedDefault cloud environment for claude --cloudenv_... or ccpool_...Docs ↗
preferredNotifChannelbeginnerNotification method"auto", "terminal_bell", "iterm2", "iterm2_with_bell", "kitty", "ghostty", "notifications_disabled"Docs ↗
agentPushNotifEnabled, inputNeededNotifEnabledintermediatePhone push notifications (Claude decided / waiting on you)Boolean; default falseDocs ↗
awaySummaryEnabledbeginnerSession recap when you returnBooleanDocs ↗
voice / voiceEnabledbeginnerVoice dictation (/voice){"enabled":true,"mode":"hold","autoSubmit":false}; voiceEnabled is the older form (since v2.1.92)v2.1.92 (old form)Docs ↗
disableDeepLinkRegistration, disableArtifact/enableArtifact, disableDesktopLocalSessions, sshConfigs, sshHostCommands, sshHostAllowlist, browserExternalPageTools, disableBrowserExternalNavigation, disableMobileSimulatorToolsadvancedDeep links, Artifact tool, Desktop sessions and SSH, Browser pane and simulator limitssee each entryDesktop v2.26454.0 (sshHostAllowlist)Docs ↗

Authentication, providers, updates, privacy, enterprise17

FeatureWhat it doesHowSinceDocs
apiKeyHelperadvancedGenerate the API credential with your commandpath or shell command; refresh via CLAUDE_CODE_API_KEY_HELPER_TTL_MSv2.1.246 (part)Docs ↗
awsAuthRefresh, awsCredentialExport, gcpAuthRefreshadvancedRefresh Bedrock/GCP credentials with your commandshell command lineDocs ↗
otelHeadersHelperadvancedRotating OpenTelemetry headersexecutable or commandDocs ↗
forceLoginMethodadvancedRestrict login"claudeai", "console", "gateway"Docs ↗
forceLoginOrgUUIDadvancedPin claude.ai logins to an orgUUID or array (managed enforces)Docs ↗
forceLoginGatewayUrl, gatewayInternalNetworksadvancedGateway login URL / internal CIDRsURL / up to 4 IPv4 CIDRsv2.1.268 (CIDRs)Docs ↗
allowedProvidersadvancedLimit which API providers a machine may usearray of anthropic, bedrock, vertex, foundry, anthropicAws, mantle, customEndpoint (managed)v2.1.285Docs ↗
autoUpdatesChannelbeginnerRelease channel"latest" or "stable" (about a week old)Docs ↗
minimumVersionadvancedAuto update never installs below thisversion stringDocs ↗
requiredMinimumVersion, requiredMaximumVersionadvancedRefuse to start outside a version rangeversion string (managed)v2.1.163Docs ↗
cleanupPeriodDaysbeginnerDays transcripts are keptinteger 1 or more; default 30Docs ↗
desktopSessionCleanupPeriodDaysadvancedAge limit for Desktop/Cowork transcriptsinteger 0+; 0 = no limitv2.1.248Docs ↗
feedbackDrafts, feedbackSurveyRateintermediateClaude drafted feedback queue; survey frequency"notify"/"quiet"/"off"; 0 to 1Docs ↗
skipWebFetchPreflightadvancedSkip the WebFetch hostname check when Anthropic is unreachableBooleanDocs ↗
forceRemoteSettingsRefreshadvancedBlock startup until server managed settings are fetchedBoolean (managed)Docs ↗
managedSourcesBehavioradvanced"first-wins" (default) or "merge" managed sourcesenum (managed)v2.1.242Docs ↗
parentSettingsBehavior, wslInheritsWindowsSettings, disableSideloadFlags, policyHelper.*advancedEmbedding host policy, WSL policy inheritance, reject sideload flags, helper path/timeout/refreshmanagedv2.1.282 (WSL), v2.1.193 (sideload)Docs ↗

Global config keys (`~/.claude.json` only)10

FeatureWhat it doesHowSinceDocs
autoConnectIdebeginnerConnect to a running IDE from an external terminalBoolean; default false; env CLAUDE_CODE_AUTO_CONNECT_IDE overridesDocs ↗
autoInstallIdeExtensionbeginnerAuto install the IDE extension from a VS Code terminalBoolean; default trueDocs ↗
claudeInChromeDefaultEnabledintermediateStart every CLI session with Chrome integrationBoolean; /chrome sets itv2.1.287 (VS Code)Docs ↗
copyFullResponsebeginner/copy copies the whole response with no pickerBoolean; default falseDocs ↗
copyOnSelectbeginnerAuto copy mouse selection in fullscreen/agent viewBoolean; default trueDocs ↗
defaultToAgentsViewintermediateclaude with no args opens agent viewBoolean; default falseDocs ↗
diffToolbeginnerWhere Edit/Write diffs show when an IDE is connected"auto" or "terminal"Docs ↗
externalEditorContextintermediateShow Claude's last reply as # comments when you press Ctrl+GBoolean; default falseDocs ↗
leftArrowOpensAgentsintermediate← on empty prompt backgrounds the session and opens agent viewBoolean; default trueDocs ↗
prStatusFooterEnabledbeginnerPR review status badge in the footerBoolean; default trueDocs ↗

Memory: CLAUDE.md, rules and auto memory

Memory and context13

FeatureWhat it doesHowSinceDocs
autoMemoryEnabledbeginnerTurn auto memory on or off (/memory toggle writes it)Boolean; default onDocs ↗
autoMemoryDirectoryadvancedStore auto memory in a directory you chooseabsolute or ~/ pathDocs ↗
claudeMdadvancedInject org wide CLAUDE.md text from managed settingsstring (managed only)Docs ↗
claudeMdExcludesintermediateSkip specific CLAUDE.md files (monorepos); arrays merge across layers; cannot exclude the managed onearray of globs or absolute pathsDocs ↗
autoCompactEnabledintermediateTurn automatic compaction off or onBoolean; default trueDocs ↗
autoCompactWindowintermediateHow full context gets before compactingtokens 100000 to 1000000; /autocompact 500kDocs ↗
idleCompactionadvancedCompact a long conversation you stepped away fromBoolean; default truev2.1.302Docs ↗
bashOutputMaxCharsadvancedHow much successful command output Claude receives inline4000+ chars; default 30,000v2.1.261Docs ↗
fileCheckpointingEnabledintermediateFile snapshots that /rewind restoresBoolean; default trueDocs ↗
plansDirectoryintermediateWhere plan mode writes plan filespath relative to project root; default ~/.claude/plansDocs ↗
skillListingBudgetFractionadvancedContext share reserved for the skill listing0 to 1; default 0.01Docs ↗
skillListingMaxDescCharsadvancedCap each skill description in the listingnumber; default 1536Docs ↗
envintermediateEnvironment variables for every session and subprocessobject of strings: {"DISABLE_AUTO_COMPACT":"1"}. Project/local files cannot set some (CONFIG_DIR, telemetry exporters)Docs ↗

Memory: CLAUDE.md, rules, auto memory32

FeatureWhat it doesHowSinceDocs
Two memory systemsbeginnerCLAUDE.md = instructions you write; auto memory = notes Claude writes. Both load at the start of every conversation as context, not enforced configUse a hook or permission rule when something must be guaranteedDocs ↗
Managed policy CLAUDE.mdadvancedOrg wide instructions that cannot be excludedmacOS /Library/Application Support/ClaudeCode/CLAUDE.md; Linux/WSL /etc/claude-code/CLAUDE.md; Windows C:\Program Files\ClaudeCode\CLAUDE.md; or the managed claudeMd keyDocs ↗
User CLAUDE.mdbeginnerPersonal preferences for all projects~/.claude/CLAUDE.mdDocs ↗
Project CLAUDE.mdbeginnerTeam shared project instructions./CLAUDE.md or ./.claude/CLAUDE.mdDocs ↗
Local CLAUDE.mdbeginnerPrivate project preferences; add to .gitignore./CLAUDE.local.md (appended after CLAUDE.md in the same directory)Docs ↗
Load orderintermediateAll discovered files are concatenated (not overriding), from filesystem root down to the working directory, so the closest file is read lastAutomatic; check with /context (Memory files)Docs ↗
Subdirectory lazy loadingintermediateCLAUDE.md files below the working directory load on demand when Claude reads, writes or edits a file thereAutomatic; a Loaded line shows in the terminalDocs ↗
@ importsintermediatePull another file into CLAUDE.md@path/to/file, relative to the importing file, max depth 4 hops, backslash-escape spaces; skipped inside code spans and fencesDocs ↗
Import approvalintermediateFirst external import in a project shows an approval dialog; declining disables themAutomaticDocs ↗
Hidden maintainer notesintermediateBlock level HTML comments are stripped before injection (free context)<!-- note -->Docs ↗
/initbeginnerGenerate a starting CLAUDE.md from your codebase; improves an existing one/init; CLAUDE_CODE_NEW_INIT=1 makes it an interactive multi-phase flow (CLAUDE.md, skills, hooks, personal file)Docs ↗
/memorybeginnerList and open CLAUDE.md, CLAUDE.local.md and memory files; toggle auto memory; open the auto memory folder/memoryDocs ↗
/contextbeginnerShows what fills the context window, including the Memory files list/contextDocs ↗
Size guidancebeginnerTarget under 200 lines per file; longer files cost context and adherence. Imports do not reduce context. Files over 4 MiB are skipped. Lazy loaded files have a per file cap (40,000 characters on a 200K window)Move specifics to rules or skillsper file cap enforced from v2.1.309Docs ↗
Writing guidancebeginnerBe concrete and verifiable ("Use 2-space indentation"); avoid conflicts between filesEditDocs ↗
/doctor prompt-auditintermediateClaude audits your CLAUDE.md, rules, skills, commands, subagents and output styles for stale or conflicting content/doctor prompt-audit [path]v2.1.283Docs ↗
claudeMdExcludesintermediateSkip other teams' CLAUDE.md files in a monoreposettings array of globsDocs ↗
--add-dir memoryintermediateCLAUDE.md from extra directories is NOT loaded unless env is setCLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD=1 claude --add-dir ../shared-configDocs ↗
Survives compactionintermediateProject root CLAUDE.md and unscoped rules are re injected from disk after /compact; nested CLAUDE.md and paths: rules reload on demandPut must-keep rules in the root fileDocs ↗
Rules directoryintermediateOne topic per markdown file, discovered recursively; no paths = loaded at launch with CLAUDE.md priority.claude/rules/*.mdDocs ↗
Path scoped rulesintermediateRules that load only when Claude touches matching filesfrontmatter paths: (YAML list or comma string); globs like src/**/*.{ts,tsx}; brace expansion budget 1,000 patternsDocs ↗
Rule frontmatterintermediatepaths is the only field read; bad YAML = rule loads unscoped-Docs ↗
User level rulesintermediatePersonal rules for every project, loaded before project rules~/.claude/rules/*.mdDocs ↗
Rule symlinksadvancedShare rules across projects (circular links handled; links outside the project need one time approval; network paths are refused)ln -s ~/shared-claude-rules .claude/rules/sharedDocs ↗
AGENTS.mdintermediateClaude reads AGENTS.md when no CLAUDE.md or CLAUDE.local.md exists in or above the working directoryAutomatic; @AGENTS.md import or symlink keeps one file for all toolsv2.1.277Docs ↗
Project instructions settingintermediateChoose which instruction files load/config > Project instructions: claude-md-or-agents-md (default), claude-md-and-agents-md, claude-md, managed-only; stored under pluginConfigs["cc-plugin-agents-md@builtin"].options.instructionFilesv2.1.277 (ID renamed v2.1.285)Docs ↗
/import and /init migrationintermediate/init reads Cursor rules and Copilot instructions; /import [codex, gemini, cursor] copies instructions, MCP servers, commands, subagents, skills/import --dry-runDocs ↗
Auto memorybeginnerClaude saves notes (user, feedback, project, reference types) and skips what it can derive from code. On by default/memory toggle writes autoMemoryEnabled; CLAUDE_CODE_DISABLE_AUTO_MEMORY=1Docs ↗
Auto memory storageintermediatePer git repo, shared across worktrees, machine local; plain markdown you can edit; excluded from the transcript cleanup sweep~/.claude/projects/<project>/memory/MEMORY.md plus topic files; autoMemoryDirectory to relocateDocs ↗
How auto memory loadsintermediateFirst 200 lines or 25KB of MEMORY.md load every session; topic files are read on demand; not loaded into subagents (they have their own memory field)Keep MEMORY.md an indexDocs ↗
Ask Claude to rememberbeginner"always use pnpm" is saved to auto memory; "add this to CLAUDE.md" writes the fileNatural languageDocs ↗
TroubleshootingintermediateCheck /context, conflicting files, specificity; use hooks for must run; InstructionsLoaded hook logs what loaded; --append-system-prompt for system prompt level text-Docs ↗

Permissions and modes

Permission settings15

FeatureWhat it doesHowSinceDocs
permissionsbeginnerContainer for allow/ask/deny rules and the starting modeobjectDocs ↗
permissions.allowbeginnerApprove listed tool uses without a promptarray of rules: ["Bash(npm run *)"]Docs ↗
permissions.askbeginnerAlways prompt for listed tool usesarray: ["Bash(git push *)"]Docs ↗
permissions.denybeginnerBlock listed tool uses, including reads of secretsarray: ["Read(./.env)"]Docs ↗
permissions.defaultModebeginnerPermission mode new sessions start in"default" (alias manual), "acceptEdits", "plan", "auto", "dontAsk", "bypassPermissions". auto and bypassPermissions do not take effect from project or local filesDocs ↗
permissions.additionalDirectoriesintermediateExtra directories Claude may read and editarray of pathsDocs ↗
permissions.blockReadsOutsideWorkingDirectoriesadvancedFile tools refuse reads outside the working directories in every modeBoolean; true from any scope is honored even over managedv2.1.257Docs ↗
permissions.disableBypassPermissionsModeadvancedPrevent anyone entering bypassPermissions"disable"Docs ↗
disableAutoModeadvancedRemove auto mode from the Shift+Tab cycle (also accepted as permissions.disableAutoMode)"disable"Docs ↗
allowManagedPermissionRulesOnlyadvancedManaged settings are the only source of permission rulesBoolean (managed)Docs ↗
autoModeadvancedAdd your own environment, allow, soft_deny and hard_deny prose rules to the auto mode classifierobject of arrays; "$defaults" keeps built-insDocs ↗
autoMode.classifyAllShelladvancedSend every shell command through the classifierBoolean; default falsev2.1.193Docs ↗
useAutoModeDuringPlanadvancedLet the classifier review shell commands in plan modeBoolean; default trueDocs ↗
skipAutoPermissionPromptadvancedSkip the one time notice when you enter auto mode yourselfBooleanDocs ↗
skipDangerousModePermissionPromptadvancedSkip the confirmation dialog before bypassPermissions (Claude sets it to true when you accept)Boolean (user, local or managed)Docs ↗

Permissions35

FeatureWhat it doesHowSinceDocs
Permission tiersbeginnerReads are free; Bash, file edits, WebFetch and WebSearch ask (built in read only command set and preapproved doc domains excepted)Automatic. "Yes, and don't ask again" saves a rule: Bash and WebFetch permanently per repo to .claude/settings.local.json; file edits last until session endDocs ↗
Comment on a promptintermediateAttach a note when you approve or denyPress Tab on Yes/No, type, Enterfix v2.1.235Docs ↗
/permissionsbeginnerInteractive dialog: rules by scope and source file, add/remove, working directories, recent auto mode denials; applies mid turn/permissionsmid turn since v2.1.234Docs ↗
Evaluation orderbeginnerdeny, then ask, then allow; first match wins; specificity does not change it; an allow cannot carve an exception out of a denyRules in permissions.deny/ask/allowDocs ↗
Bare tool denyintermediateA deny rule with just the tool name removes the tool from Claude's context entirely"deny": ["Bash"]Docs ↗
Rule syntaxbeginnerTool or Tool(specifier); parentheses inside are literalBash, Bash(npm run build), Read(./.env), WebFetch(domain:example.com)Docs ↗
Bash wildcardsbeginner* matches any text incl. spaces; trailing * (space then star) also matches the bare command; :* is an equal suffix formBash(npm run *), Bash(git commit *). Put the * after the subcommand: Bash(git * main) warnsDocs ↗
Compound commandsintermediateEvery subcommand (&&, ||, ;, |, &, newline) must be allowed; deny/ask apply to any subcommand, even inside $() or loopsBash(safe-cmd *) does not allow safe-cmd && otherDocs ↗
Wrapper strippingadvancedtimeout, time, nice, nohup, stdbuf, command, builtin, noglob, bare xargs and known safe env assignments are stripped before matching. npx, docker exec, devbox run are notWrite full rule: Bash(devbox run npm test)Docs ↗
What Bash rules do not matchintermediate/usr/bin/curl, sh -c '...', git -C . push bypass Bash(curl *)/Bash(git push *); it is not a security boundaryPair with the sandbox or a PreToolUse hookDocs ↗
Read only commandsbeginnerls, cat, echo, pwd, head, tail, grep, find, wc, which, diff, stat, du, cd, read only git run without a prompt; set not configurable (add ask/deny to change)-Docs ↗
Redirections and teeadvancedOutput/input redirect targets and tee files are checked against Edit/Read rulesautomaticinput redirects v2.1.257; `tee` v2.1.269Docs ↗
Param matchingadvancedDeny/ask by input parameter on built in toolsAgent(model:opus), Agent(isolation:worktree), Bash(run_in_background:true) (not the primary content field)Docs ↗
Tool name globsadvancedDeny/ask accept globs; allow accepts them only after a literal mcp__<server>__"deny": ["mcp__*"], allow mcp__puppeteer__*Docs ↗
PowerShell rulesintermediateSame shape, aliases canonicalized, case insensitivePowerShell(Get-ChildItem *), PowerShell(Remove-Item *)Docs ↗
Read/Edit rulesbeginnergitignore style path patterns. Edit covers all built in edit tools; Read is best effort for Grep, Glob, @ mentions and IDE context. Write(...), NotebookEdit(...), Glob(...) path rules never match; use Edit(...)/Read(...)Read(./.env), Read(./secrets/**), Edit(/src/**/*.ts)Read deny covers Write tool v2.1.228; pasted image paths v2.1.290Docs ↗
Path anchorsintermediate//path = absolute; ~/path = home; /path = relative to the settings source (project root in project files, ~/.claude in user settings); ./path = cwdRead(//Users/alice/secrets/**)Docs ↗
Depth rulesadvancedBare filenames match at any depth; src/** as allow = only <cwd>/src, as deny/ask = any depth-Docs ↗
! negationadvancedCarve paths out of earlier deny/ask rules from the same sourceRead(*.env) then Read(!sample.env)Docs ↗
SymlinksadvancedAllow needs both requested path and target to match; deny matches eitherautomaticreal path deny v2.1.268Docs ↗
Network pathsadvancedReads from UNC//net paths always prompt (no allow rule, hook or auto mode skips it)automaticv2.1.292Docs ↗
.claudeignorebeginnerHas no effect; move entries into Read deny rules-Docs ↗
WebFetch rulesintermediateMatch the hostname, case insensitive; *.example.com covers subdomains but not the apex; bare WebFetch allow/deny differs from WebFetch(domain:*) (only the latter changes the sandbox allowlist)WebFetch(domain:docs.python.org)wildcards v2.1.172; sandbox bare `*` v2.1.186Docs ↗
MCP rulesintermediatemcp__<server> or mcp__<server>__* = whole server; mcp__<server>__<tool> = one tool. Spaces and dots in names become _; plugin servers are mcp__plugin_<plugin>_<server>__*; claude.ai connectors are mcp__claude_ai_<server>__<tool>mcp__puppeteer__puppeteer_navigateDocs ↗
Subagent rulesintermediateControl which subagents Claude may useAgent(Explore), Agent(Plan), Agent(my-agent) in denyDocs ↗
Cd rulesadvancedRestrict where /cd can move the session (a bare Cd deny disables /cd; any allow switches to allowlist mode)Cd(~/code/**)Docs ↗
Working directoriesbeginnerClaude can access the launch dir; extend with --add-dir <path>, /add-dir, or additionalDirectories. Settings listed dirs grant file access only (no skills, agents, hooks)claude --add-dir ../lib`/add-dir` of a subdirectory loads its skills v2.1.257Docs ↗
/cdintermediateMove the session to another primary directory, keeping the conversation; applies the new directory's settings, hooks, MCP servers and asks for trust/cd <path>settings applied v2.1.246Docs ↗
blockReadsOutsideWorkingDirectoriesadvancedFile tools refuse outside reads in every mode; auto mode offers to turn it onsettingv2.1.257Docs ↗
Hooks and permissionsadvancedPreToolUse hooks run before the prompt and can deny, ask or allow; a hook allow cannot override a deny or ask rule; a hook that exits 2 blocks even when an allow rule matchesPreToolUse hookDocs ↗
Plan mode and hooksadvancedIn plan mode a hook allow has no effect on non read only calls (except ExitPlanMode)-Docs ↗
Workspace trustintermediatepermissions.allow and additionalDirectories in a committed .claude/settings.json apply only after you accept the trust dialog; deny/ask apply at once; -p/SDK never show the dialogAccept the dialog; manual: projects["<path>"].hasTrustDialogAccepted in ~/.claude.jsonDocs ↗
Local file trustadvanced.claude/settings.local.json allow rules skip trust unless the file is tracked by git or .claude is a symlink-Docs ↗
What runs before trustadvancedTable of repo content used in untrusted folders and for claude -p (hooks, env, helpers run; .mcp.json asks)--setting-sources user, --bare, --settings '{"disableAllHooks": true}' for untrusted reposDocs ↗
Managed lock inadvancedManaged settings cannot be overridden by any level; a deny at any level beats allow elsewhere; --allowedTools cannot beat a managed denyallowManagedPermissionRulesOnly, permissions.disableBypassPermissionsMode, disableAutoModeDocs ↗

Permission modes13

FeatureWhat it doesHowSinceDocs
default (Manual)beginnerReads only without asking--permission-mode default (alias manual)Docs ↗
acceptEditsbeginnerAlso file edits and mkdir, touch, mv, cp in the working directories--permission-mode acceptEditsDocs ↗
planbeginnerExplore and propose; blocks edits until you approve a plan--permission-mode plan; plansDirectoryDocs ↗
autointermediateA background classifier model reviews actions instead of you; built in starting mode for interactive terminal and VS Code sessions--permission-mode auto; set defaultMode:"auto" only in user or managed settingsbuilt in default v2.1.283Docs ↗
dontAskadvancedAuto denies anything that would prompt; runs reads and pre approved tools; for CIclaude -p "..." --permission-mode dontAsk --allowedTools "Bash(npm test)" "Read"Docs ↗
bypassPermissionsadvancedSkips prompts, even for protected paths; use only in containers or VMs. Refused for root/sudo on Linux/macOS; cannot be entered mid session unless enabled at launch--dangerously-skip-permissions, --permission-mode bypassPermissions, --allow-dangerously-skip-permissions (adds it to the cycle without activating)not from project files v2.1.257Docs ↗
Switch mode in sessionbeginnerCycle modesShift+Tab (auto, default, acceptEdits, plan; optional modes slot after plan). Prompt option "Yes, and switch to auto mode"prompt option v2.1.247Docs ↗
Which mode a session starts inintermediateOrder: --permission-mode flag, then permissions.defaultMode, then built in default (auto where available, default for -p/SDK/HIPAA)-Docs ↗
Actions no mode approvesadvancedExplicit ask rules, AskUserQuestion, MCP tools marked requiresUserInteraction, critical path rm/rmdir, cross session messaging safeguards, outside directory reads when the block is on-Docs ↗
Protected pathsadvancedWrites never auto approved (except in bypass mode): .git, .vscode, .idea, .husky, .cargo, .devcontainer, .yarn, .mvn, .claude (some exceptions), .gitconfig, shell rc files, .npmrc, .mcp.json, .claude.json and more. Allow rules in settings do not pre approve them-Docs ↗
Critical path removalsadvancedrm -rf / and ~ style removals always prompt or are denied; classifier does not review themenv switches in section 3dDocs ↗
Configure auto modeadvancedTell the classifier what infrastructure you trustautoMode.environment/allow/soft_deny/hard_deny with "$defaults"; /auto-mode-setup drafts entriesv2.1.228 (setup, Pro/Max/Team)Docs ↗
claude auto-mode CLIadvancedInspect and reset the classifier configclaude auto-mode defaults [--label ...], config, critique, reset (verified locally)Docs ↗

Sandbox, security and privacy

JSON
{
  "sandbox": {
    "enabled": true,
    "autoAllowBashIfSandboxed": true,
    "excludedCommands": ["docker *"],
    "filesystem": {
      "allowWrite": ["/tmp/build", "~/.kube"],
      "denyRead": ["~/.aws/credentials"]
    },
    "network": {
      "allowedDomains": ["github.com", "*.npmjs.org"],
      "deniedDomains": ["uploads.github.com"],
      "allowLocalBinding": true
    },
    "credentials": {
      "files": [
        { "path": "~/.aws/credentials", "mode": "deny" }
      ],
      "envVars": [
        { "name": "NPM_TOKEN", "mode": "deny" }
      ]
    }
  }
}

Sandbox settings38

FeatureWhat it doesHowSinceDocs
sandboxintermediateIsolate Bash/PowerShell/Monitor commands from your filesystem and network (macOS, Linux, WSL2)object; off by defaultDocs ↗
sandbox.enabledintermediateTurn the sandbox onBoolean; default falseDocs ↗
sandbox.failIfUnavailableadvancedExit at startup if the sandbox cannot start (default is to run unsandboxed)BooleanDocs ↗
sandbox.autoAllowBashIfSandboxedintermediateRun sandboxed commands without a prompt (auto allow mode)Boolean; default trueDocs ↗
sandbox.allowUnsandboxedCommandsadvancedLet Claude retry a blocked command outside the sandbox; false = strict sandbox modeBoolean; default truev2.1.285 (project `true` no longer beats user `false`)Docs ↗
sandbox.excludedCommandsintermediateCommands that run outside the sandboxarray of patterns: ["docker *"]Docs ↗
sandbox.filesystemintermediateContainer for path rulesobjectDocs ↗
sandbox.filesystem.allowWriteintermediateExtra writable pathsarray: ["/tmp/build","~/.kube"] (prefixes: / absolute, ~/ home, ./ project root in project settings)Docs ↗
sandbox.filesystem.denyWriteadvancedBlock writes to pathsarray of pathsDocs ↗
sandbox.filesystem.denyReadadvancedBlock reads of pathsarray: ["~/.aws/credentials"]; narrower allow re-opens inside a denyDocs ↗
sandbox.filesystem.allowReadadvancedRe open reading inside a denyRead regionarrayDocs ↗
sandbox.filesystem.allowManagedReadPathsOnlyadvancedStop developers re opening read paths your org blockedBoolean (managed)Docs ↗
sandbox.filesystem.disabledadvancedTurn off filesystem isolation but keep network isolationBoolean (user or managed)Docs ↗
sandbox.networkintermediateContainer for host, port and socket rulesobjectDocs ↗
sandbox.network.allowedDomainsintermediatePre allow domains so commands do not promptarray of domains, wildcards, IP literals, optional :port: ["github.com","*.npmjs.org"]v2.1.229 (port form)Docs ↗
sandbox.network.deniedDomainsadvancedBlock domains even inside an allowed wildcardarrayDocs ↗
sandbox.network.strictAllowlistadvancedDeny hosts outside the allowlist instead of promptingBoolean (user, managed, --settings)v2.1.219Docs ↗
sandbox.network.allowManagedDomainsOnlyadvancedLock the allowlist to managed settingsBoolean (managed)Docs ↗
sandbox.network.allowLocalBindingintermediateLet commands listen on ports and reach localhost (macOS)BooleanDocs ↗
sandbox.network.allowUnixSocketsadvancedUnix socket paths commands can use (macOS)array of pathsDocs ↗
sandbox.network.allowAllUnixSocketsadvancedAllow every Unix socketBoolean; default falseDocs ↗
sandbox.network.allowMachLookupadvancedLet macOS tools (iOS Simulator, Playwright) reach XPC servicesarray of service namesDocs ↗
sandbox.network.httpProxyPortadvancedUse your own HTTP proxy portnumberDocs ↗
sandbox.network.socksProxyPortadvancedUse your own SOCKS proxy portnumberDocs ↗
sandbox.network.tlsTerminateadvancedExperimental: proxy terminates TLS (needed for mask credentials)object with caCertPath, caKeyPathDocs ↗
sandbox.credentialsadvancedHide or mask credential files and variables inside the sandboxobjectDocs ↗
sandbox.credentials.filesadvancedBlock or mask credential filesarray: {"path":"~/.aws/credentials","mode":"deny"}; mask needs injectHostsv2.1.221Docs ↗
sandbox.credentials.envVarsadvancedUnset or mask an environment variablearray: {"name":"NPM_TOKEN","mode":"deny"}v2.1.224Docs ↗
sandbox.credentials.awsPairsadvancedLink custom named AWS key variables for re signingarrayv2.1.224Docs ↗
sandbox.credentials.sigv4advancedFail or pass through streaming, presigned or SigV4A AWS requestsobject streaming/presigned/sigv4a: "deny" or "passthrough"v2.1.224Docs ↗
sandbox.credentials.allowPlaintextInjectadvancedLet masked credentials reach plain HTTP on trusted test networksBooleanDocs ↗
sandbox.allowAppleEventsadvancedLet sandboxed commands send Apple Events (macOS)Boolean; removes code-execution isolationDocs ↗
sandbox.allowNestedUserNamespacesadvancedLet commands create user namespaces (Linux, WSL2); turns off a security boundaryBooleanv2.1.305Docs ↗
sandbox.enableWeakerNestedSandboxadvancedRun the Linux sandbox inside an unprivileged container (weaker)BooleanDocs ↗
sandbox.enableWeakerNetworkIsolationadvancedLet gh, gcloud, terraform verify TLS behind a MITM proxy on macOSBooleanDocs ↗
sandbox.ignoreViolationsadvancedSilence violation reports for expected probesobject: command substring to path substringsDocs ↗
sandbox.ripgrepadvancedUse your own ripgrep inside the sandboxobject command, args (user or managed)Docs ↗
sandbox.bwrapPath / sandbox.socatPathadvancedPoint at bubblewrap / socat outside PATHabsolute path (managed)Docs ↗

Security, privacy and isolation33

FeatureWhat it doesHowSinceDocs
Permission based architecturebeginnerAuto mode (classifier) or Manual mode (read only until you approve); fail closed matching; command injection detection asks before running commands it cannot analyzeDefault behaviorDocs ↗
Built in protectionsbeginnerSandboxed bash, working directory boundary prompts, prompt fatigue mitigation via allowlists, Accept Edits mode-Docs ↗
Prompt injection safeguardsbeginnerNetwork commands (curl, wget) are not auto approved; WebFetch answers come from a separate model call, not the raw page; pasted text is marked as pasted so Claude follows instructions in it only where your typed message asksReview commands; avoid piping untrusted contentDocs ↗
Trust verificationbeginnerWorkspace trust dialog on first start in a folder; .mcp.json servers have their own approval; trust in your home directory is session onlyAccept the dialog deliberatelyDocs ↗
Windows WebDAV warningadvancedDo not enable WebDAV or let Claude touch \\* paths (can bypass permissions)-Docs ↗
Credential storageintermediatemacOS Keychain; Linux file mode 0600; Windows file in your profile-Docs ↗
MCP securityintermediateWrite or trust your MCP servers; project servers are in .mcp.json; restrict with allowedMcpServers/deniedMcpServers/managed-mcp.json-Docs ↗
--dangerously-skip-permissions riskbeginnerNo protection against prompt injection or accidents; dev containers do not stop a malicious repo from exfiltrating ~/.claude credentialsUse only in isolated containers/VMs without sensitive mountsDocs ↗
Sandbox (what it is)intermediateOS enforced boundary (Seatbelt on macOS; bubblewrap + socat on Linux/WSL2; none on native Windows) around Bash/PowerShell/Monitor commands and children. Built on @anthropic-ai/sandbox-runtime. Off by default/sandbox or sandbox.enabled: trueDocs ↗
Sandbox defaultsintermediateWrites: working dir, per user temp dir, added dirs. Reads: most of the machine. Network: through a local proxy checking an initially empty allowlist-Docs ↗
What the sandbox does NOT coveradvancedRead/Edit/Write/WebFetch/WebSearch tools, MCP servers, hooks, status line and apiKeyHelper, your own ! commands (mostly), excluded commands and unsandboxed retries. Put Claude Code itself in a container/VM for those-Docs ↗
Linux/WSL2 setupintermediateInstall dependenciessudo apt-get install bubblewrap socat (or dnf); optional seccomp filter blocks Unix socketsDocs ↗
Sandbox modesintermediateAuto allow: sandboxed commands run without prompts. Regular permissions: normal prompts even when sandboxed. Saved to .claude/settings.local.json/sandbox Mode tabDocs ↗
Unsandboxed retryadvancedClaude may retry a failed command with dangerouslyDisableSandbox; who approves depends on mode; add Bash(dangerouslyDisableSandbox:true) to ask to be promptedStrict mode: allowUnsandboxedCommands:falseDocs ↗
Confirm it worksintermediateAsk Claude to run touch ~/sandbox-probe (should fail) and curl --noproxy '*' https://example.com (should not resolve)-Docs ↗
Filesystem isolationintermediateWrites limited; protected config paths stay write denied even inside allowed dirs; denyRead/allowRead use the narrowest path rulesandbox.filesystem.*; path prefixes /, ~/, ./Docs ↗
Network isolationintermediateSeparate network namespace (Linux) or Seatbelt proxy only (macOS); first new domain prompts; TCP via proxy only (ssh, DB drivers, UDP, ICMP fail)sandbox.network.*Docs ↗
Credential protectionadvancedHide credential files and env vars; optional mask with proxy substitution (Linux/WSL2)sandbox.credentials.*; env CLAUDE_CODE_SUBPROCESS_ENV_SCRUBv2.1.221+Docs ↗
Enforce for an orgadvancedManaged settings with failIfUnavailable, allowUnsandboxedCommands:false, allowManagedDomainsOnly make the sandbox admin required; repo settings that loosen it are ignoredmanaged sandbox blockDocs ↗
Permissions plus sandboxadvancedComplementary layers; sandbox paths and domains merge with permission rules; autoAllowBashIfSandboxed skips a bare Bash ask rule for sandboxed commands (not in plan mode)-Docs ↗
Sandbox limitationsadvancedDomain fronting risk with broad domains (github.com), Unix socket escalation (docker.sock), weaker nested mode, Apple EventsReview allowlistsDocs ↗
Sandbox environment comparisonadvancedCompare dev containers, custom containers, VMspageDocs ↗
Dev containersadvancedRun Claude Code inside a container with the Dev Container Feature; persist auth with a named volume at ~/.claude plus CLAUDE_CONFIG_DIR; bake policy in /etc/claude-code/managed-settings.json; reference container has a firewall scriptghcr.io/anthropics/devcontainer-features/claude-code:1.0Docs ↗
Data training policybeginnerConsumer (Free/Pro/Max): your choice; Commercial (Team/Enterprise/API/3rd-party): no training on Claude Code data unless you opt in (Development Partner Program)claude.ai/settings/data-privacy-controlsDocs ↗
RetentionbeginnerConsumer: 5 years if training allowed, 30 days if not; Commercial: 30 days standard, zero data retention for qualified Enterprise accounts; local transcripts 30 days by defaultcleanupPeriodDaysDocs ↗
/feedback, /bug, /sharebeginnerSends your conversation (with consent step); transcripts retained 5 yearsDISABLE_FEEDBACK_COMMAND=1 to disableDocs ↗
Session surveysbeginnerRating records only the score; separate opt in for transcript uploadCLAUDE_CODE_DISABLE_FEEDBACK_SURVEY=1, feedbackSurveyRateDocs ↗
TelemetrybeginnerMetrics (no code, prompts or paths) and error reports (secrets redacted). Opt out per kind or all at onceDISABLE_TELEMETRY=1, DISABLE_ERROR_REPORTING=1, CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1error reporting v2.1.198+Docs ↗
Zero data retentionadvancedPer organization ZDR for qualified Enterprise accountspageDocs ↗
/security-reviewbeginnerSecurity pass over the current branch's diff vs origin's default branch/security-reviewDocs ↗
Reporting vulnerabilitiesbeginnerReport through Anthropic's HackerOne program, not publicly-Docs ↗
Audit settings changesadvancedBlock or log settings changes during sessionsConfigChange hookDocs ↗
Best practicesbeginnerReview changes, project specific permission settings, sandbox/dev container for extra isolation, audit with /permissions, managed settings and OpenTelemetry for teams-Docs ↗

Terminal, themes and the status line

Shell
#!/bin/bash
# Save as ~/.claude/statusline.sh, then: chmod +x ~/.claude/statusline.sh
# Claude Code sends session JSON on stdin and prints whatever this script prints.
# Fields used here (all documented): model.display_name, workspace.current_dir,
# context_window.used_percentage, cost.total_cost_usd, effort.level,
# rate_limits.five_hour.used_percentage (only for Pro/Max after the first reply).
input=$(cat)

MODEL=$(echo "$input" | jq -r '.model.display_name')
DIR=$(echo "$input" | jq -r '.workspace.current_dir')
PCT=$(echo "$input" | jq -r '.context_window.used_percentage // 0' | cut -d. -f1)
COST=$(echo "$input" | jq -r '.cost.total_cost_usd // 0')
EFFORT=$(echo "$input" | jq -r '.effort.level // empty')
FIVE=$(echo "$input" | jq -r '.rate_limits.five_hour.used_percentage // empty')

# 10-character progress bar for context usage
BAR_WIDTH=10
FILLED=$((PCT * BAR_WIDTH / 100))
EMPTY=$((BAR_WIDTH - FILLED))
BAR=""
[ "$FILLED" -gt 0 ] && printf -v FILL "%${FILLED}s" && BAR="${FILL// /▓}"
[ "$EMPTY" -gt 0 ] && printf -v PAD "%${EMPTY}s" && BAR="${BAR}${PAD// /░}"

# Git branch (cheap call; cache it if your repo is huge)
BRANCH=""
if git -C "$DIR" rev-parse --git-dir > /dev/null 2>&1; then
  BRANCH=" | $(git -C "$DIR" branch --show-current 2>/dev/null)"
fi

LIMIT=""
[ -n "$FIVE" ] && LIMIT=" | 5h limit ${FIVE%.*}%"
EFF=""
[ -n "$EFFORT" ] && EFF=" | effort $EFFORT"

printf '[%s] %s %s%%%s | $%.2f%s%s\n' "$MODEL" "$BAR" "$PCT" "$BRANCH" "$COST" "$EFF" "$LIMIT"

Interface and terminal36

FeatureWhat it doesHowSinceDocs
themebeginnerColor theme"auto", "dark", "light", "dark-daltonized", "light-daltonized", "dark-ansi", "light-ansi", "custom:<slug>". Default "dark"Docs ↗
editorModebeginnerPrompt key bindings"normal" or "vim"Docs ↗
vimInsertModeRemapsintermediateMap a two key INSERT sequence to Esc{"jj":"<Esc>"} (user or managed)Docs ↗
statusLineintermediateCustom status line below the prompt{"type":"command","command":"~/.claude/statusline.sh","padding":2,"refreshInterval":30,"hideVimModeIndicator":true}Docs ↗
subagentStatusLineadvancedCustom rows for the subagent panel{"type":"command","command":"..."}Docs ↗
fileSuggestionadvancedSupply @ file autocomplete from your own command{"type":"command","command":"~/.claude/file-suggestion.sh"} (receives {"query":"..."})Docs ↗
respectGitignoreintermediateKeep gitignored files out of the @ pickerBoolean; default trueDocs ↗
tuiintermediateTerminal renderer"default" or "fullscreen"; /tui fullscreen writes itDocs ↗
viewModeintermediateStart in default, verbose or focus view"default", "verbose", "focus" (focus needs fullscreen)Docs ↗
verbosebeginnerShow full tool output (viewMode wins)BooleanDocs ↗
autoScrollEnabledintermediateFollow new output in fullscreenBoolean; default trueDocs ↗
wheelScrollAccelerationEnabledintermediateMouse wheel acceleration in fullscreenBoolean; default trueDocs ↗
maxProseWidthintermediateWrap prose at N columns in wide terminalsinteger 40+v2.1.282Docs ↗
spinnerTipsEnabledbeginnerTips under the spinnerBoolean; default trueDocs ↗
spinnerTipsOverrideintermediateAdd or replace spinner tips{"label":"Acme tip","tips":[...],"tipsFile":"...","excludeDefault":true}Docs ↗
spinnerVerbsbeginnerAdd or replace the spinner verbs{"mode":"append","verbs":["Pondering"]}Docs ↗
prefersReducedMotionbeginnerReduce spinner, shimmer and flash animationsBoolean; default falseDocs ↗
axScreenReaderintermediateScreen reader friendly plain text outputBoolean (user or managed); flag --ax-screen-reader, env CLAUDE_AX_SCREEN_READERDocs ↗
syntaxHighlightingDisabledbeginnerTurn off syntax highlighting in diffs and codeBooleanDocs ↗
timeFormatintermediateClock style"auto", "12-hour", "24-hour", "24-hour-utc" or a strftime pattern like "%H:%M"v2.1.257Docs ↗
timeZoneintermediateTime zone for displayed timesIANA namev2.1.257Docs ↗
terminalProgressBarEnabledbeginnerTerminal progress barBoolean; default trueDocs ↗
terminalTitleFromRenameintermediateLet /rename and --name set the tab titleBoolean; default trueDocs ↗
showTurnDurationbeginner"Cooked for" duration after each replyBoolean; default trueDocs ↗
showClearContextOnPlanAcceptintermediate"Clear context" option on the plan accept screenBoolean; default falseDocs ↗
promptSuggestionEnabledbeginnerGrayed out prompt suggestionsBoolean; default true; env CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION=falseDocs ↗
emojiCompletionEnabledbeginner:shortcode: emoji suggestionsBoolean; default trueDocs ↗
spellcheckintermediateUnderline misspelled words in the prompt{"enabled":true,"checker":"auto","language":"..."}v2.1.235Docs ↗
defaultShellintermediateShell for ! commands"bash" or "powershell"Docs ↗
respondToBashCommandsintermediateClaude responds after a ! command runsBoolean; default trueDocs ↗
bashEditDiffEnabledadvancedRecord files changed during a Bash command in every modeBooleanv2.1.269Docs ↗
companyAnnouncementsintermediateShow announcements at startuparray of stringsDocs ↗
askUserQuestionTimeoutadvancedAuto continue an unanswered question after idle time"60s", "5m", "10m", "never" (user or managed)Docs ↗
dialogExpiryadvancedHow long to wait for a Remote Control/SDK host to answer a dialog"60s", "5m", "10m", "never"; default "5m"v2.1.224Docs ↗
autoContinueAtUsageLimitintermediateWait and continue after a usage limit resetsBoolean; default truev2.1.234Docs ↗
footerLinksRegexesadvancedClickable badges for issue/review IDs below the inputarray of {type:"regex",pattern,url}Docs ↗

Appearance and terminal31

FeatureWhat it doesHowSinceDocs
ThemesbeginnerBuilt in auto, dark, light, dark-daltonized, light-daltonized, dark-ansi, light-ansi plus custom; auto follows terminal background/theme, /config, or theme keyDocs ↗
Custom themesintermediateJSON files with name, base, overrides (color tokens such as claude, error, diffAdded, planMode, userMessageBackground); live reload from the folder~/.claude/themes/<slug>.json, then "theme":"custom:<slug>"; /theme > New custom theme (Ctrl+E edits)`effortUltra` override v2.1.239Docs ↗
Syntax highlighting togglebeginnerTurn code coloring offCtrl+T inside /theme; syntaxHighlightingDisabledDocs ↗
Status linebeginnerA bar below the prompt running any script; receives JSON on stdin; output can be multiple lines, ANSI colors and OSC 8 links/statusline <what you want> or statusLine setting; remove with /statusline deleteDocs ↗
Status line JSONintermediatemodel.id/display_name, cwd, workspace.current_dir/project_dir/added_dirs/git_worktree/repo, cost.total_cost_usd/total_duration_ms/total_api_duration_ms/total_lines_added/removed, context_window.used_percentage/remaining_percentage/context_window_size/current_usage, exceeds_200k_tokens, fast_mode, effort.level, thinking.enabled, rate_limits.five_hour/seven_day/spend_limit, prompt_cache.*, session_id, session_name, prompt_id, transcript_path, version, output_style.name, vim.mode, agent.name, pr.number/url/review_state/kind, worktree.*Read with jq -r '.model.display_name'; guard absent fields with // empty`prompt_cache` v2.1.251; `spend_limit` v2.1.251Docs ↗
Status line refreshintermediateRuns at session start, after each assistant message, /compact, mode change, vim toggle; 300 ms debounce; optional refreshInterval (min 1 s)statusLine.refreshInterval, padding, hideVimModeIndicatorDocs ↗
Status line sizeadvancedScript output is captured, so read COLUMNS and LINES env vars, not tput-Docs ↗
Status line examplesintermediateContext progress bar, git status with colors, cost/duration, multi line, clickable links, rate limits, cached slow commands, Windows (PowerShell/Git Bash)See page; test with echo '{...}' | ./statusline.shDocs ↗
Subagent status lineadvancedRewrites rows of the subagent panel; gets a tasks array and returns {"id","content"} linessubagentStatusLine`agentType` field v2.1.293Docs ↗
Output stylesbeginnerChange role, tone, format for every response. Built in: Default, Proactive, Concise (v2.1.237), Explanatory, Learning/output-style [style] (v2.1.269), /config > Output style, outputStyle key (case-sensitive)switch mid session applies next message since v2.1.251Docs ↗
Custom output styleintermediateMarkdown file with frontmatter name, description, keep-coding-instructions, force-for-plugin~/.claude/output-styles/, .claude/output-styles/ (nearest wins) or managed dir; restart to pick up editsDocs ↗
Output style vs other featuresintermediateStyle = every response; CLAUDE.md = knowledge; skill = task procedure; hook = guarantee; subagent = isolated helper; --append-system-prompt = system prompt addition-Docs ↗
Multiline inputbeginnerCtrl+J or \ then Enter work everywhere; Shift+Enter native in Ghostty, Kitty, iTerm2, WezTerm, Warp, Apple Terminal, Windows Terminal (kitty protocol terminals from v2.1.269); Option+Enter on macOS with Option as Meta/terminal-setup for VS Code, Cursor, Devin Desktop, old Alacritty, Zed; not available in gnome-terminal or JetBrainsDocs ↗
/terminal-setupbeginnerWrites the Shift+Enter binding; in Apple Terminal enables Option as Meta; in iTerm2 enables clipboard access for /copyRun in the host terminal, not inside tmuxDocs ↗
Option as Meta (macOS)beginnerNeeded for Option shortcutsApple Terminal: Profiles > Keyboard; iTerm2: Left/Right Option = "Esc+"; VS Code: terminal.integrated.macOptionIsMetaDocs ↗
NotificationsbeginnerDesktop notification by default only in Ghostty, Kitty, iTerm2; bell elsewhere via setting; or a Notification hook for custom sounds"preferredNotifChannel":"terminal_bell"; hook afplay /System/Library/Sounds/Glass.aiffDocs ↗
Session status in terminaladvancedTerminals implementing OSC 7501 show working/waiting/doneautomaticv2.1.295Docs ↗
tmuxintermediateFix Shift+Enter, notifications and progress bar~/.tmux.conf: set -g allow-passthrough on, set -g focus-events on, set -s extended-keys on, set -as terminal-features 'xterm*:extkeys'Docs ↗
Windows Backspace fixadvanced^H read as Ctrl+BackspaceCLAUDE_CODE_BS_AS_CTRL_BACKSPACE=0Docs ↗
Fullscreen renderingintermediateFlicker free alt screen renderer with mouse, virtualized scrollback, search, diff panel (research preview)/tui fullscreen (saves tui), or CLAUDE_CODE_NO_FLICKER=1; /tui default to go back; /focus viewDocs ↗
Wide terminalsintermediateCap prose widthmaxProseWidthv2.1.282Docs ↗
PastingbeginnerOver 800 characters or 3 lines collapses to [Pasted text #N]; cached under ~/.claude/paste-cache/; Claude is told pasted text may hold instructions you did not writeUse a file for huge inputsDocs ↗
Vim modeintermediateNORMAL/INSERT/VISUAL editing in the prompt: hjkl, w e b, 0 $ ^, gg G, f F t T ; ,, %, x, dd D dw, cc C cw, yy, p P, >> <<, J, u, ., text objects iw aw i" a" i( a( i[ a[ i{ a{, v/V. Enter still submits in INSERT (use o/O or Ctrl+J for newlines)/config > Editor mode, "editorMode":"vim", remap {"vimInsertModeRemaps":{"jj":"<Esc>"}}. The old /vim command was removed in v2.1.92`%` v2.1.301Docs ↗
Editor modebeginnerNormal vs vim key bindingseditorModeDocs ↗
Open prompt in editorintermediateEdit the prompt in $VISUAL/$EDITORCtrl+G; externalEditorContext adds Claude's last reply as commentsDocs ↗
Spinner tips and verbsbeginnerHide, replace or extend the tips and verbs while Claude worksspinnerTipsEnabled:false, spinnerTipsOverride, spinnerVerbsDocs ↗
Voice dictationbeginnerSpeak prompts (hold or tap key); needs a claude.ai account and a local microphone; not on API key or cloud providers/voice [hold, tap, off]; voice setting; rebind the keyDocs ↗
Screen reader modeintermediatePlain linear text with labels (you:, claude:, tool:...), numbered menus, announced permission modesclaude --ax-screen-reader, CLAUDE_AX_SCREEN_READER=1, or "axScreenReader": true (not allowed from project settings)Docs ↗
Other accessibility optionsbeginnerScreen magnifier cursor, reduced motion, colorblind themes, terminal bellCLAUDE_CODE_ACCESSIBILITY=1, prefersReducedMotion, theme:"dark-daltonized", preferredNotifChannelDocs ↗
Prompt bar colorbeginnerPer session color/color [red, blue, green, yellow, purple, orange, pink, cyan, default]Docs ↗
KeybindingsintermediateRemap any shortcut (other agent's slice; listed for completeness)/keybindings, ~/.claude/keybindings.jsonDocs ↗

Models, effort and cost

JSON
{
  "model": "opusplan",
  "fallbackModel": ["claude-sonnet-5", "claude-haiku-4-5"],
  "modelSettings": {
    "claude-opus-5-5": { "effortLevel": "high" }
  },
  "alwaysThinkingEnabled": true,
  "showThinkingSummaries": true,
  "promptCacheTtl": "1h",
  "subagentPromptCacheTtl": "5m",
  "autoCompactWindow": 500000,
  "fastMode": false,
  "advisorModel": "opus"
}

Models, effort and cost35

FeatureWhat it doesHowSinceDocs
Model aliasesbeginnerdefault (clears override), best, fable, sonnet, opus, haiku, sonnet[1m], opus[1m], opusplan/model <alias>, --model, model keyDocs ↗
Alias resolutionintermediateOn the Anthropic API: opus = Opus 5.5, sonnet = Sonnet 5.5, haiku = Haiku 5.5; other providers resolve to older versions (Bedrock/Vertex sonnet = 4.5, Foundry opus = 4.6)Pin with ANTHROPIC_DEFAULT_*_MODELSonnet 5.5 needs v2.1.284, Opus 5.5 v2.1.280, Haiku 5.5 v2.1.293Docs ↗
Model setting priorityintermediate1 /model in session, 2 --model, 3 ANTHROPIC_MODEL, 4 model setting, 5 ANTHROPIC_DEFAULT_MODEL-Docs ↗
/model pickerbeginnerEnter switches and saves as default; s switches for this session only; arrows adjust effort/model, /model sonnet`s` key per sessionDocs ↗
default modelbeginnerPro, Max, Team, Enterprise, API: Opus 5.5 (Foundry: Sonnet 4.5)-v2.1.280Docs ↗
opusplanintermediateOpus in plan mode, Sonnet for execution; opusplan[1m] for 1M both phases/model opusplan`/model opusplan[1m]` v2.1.265Docs ↗
Fallback chainsintermediateUp to 3 backup models when the primary is overloaded; one turn only; also covers compaction and subagentsclaude --fallback-model sonnet,haiku, fallbackModelsubagents v2.1.247Docs ↗
Effort levelsintermediatelow, medium, high, xhigh, max (Opus 4.6/Sonnet 4.6 stop at max without xhigh); defaults: high, but Opus 5.5/Sonnet 5.5/Haiku 5.5 medium, Opus 4.7 xhigh/effort [level, auto, status], --effort, CLAUDE_CODE_EFFORT_LEVEL, modelSettings, effortLevel; skill and subagent frontmatter effort`s` per session v2.1.257Docs ↗
ultrathinkbeginnerPut the word in a prompt for deeper reasoning for that turn; typed in the terminal it can raise the turn to xhigh (word turns rainbow)In promptrainbow/xhigh v2.1.311Docs ↗
UltracodeadvancedClaude plans a dynamic workflow for each substantive task, at any effort/effort ultracode [on, off], --effort ultracode, ultracode keyv2.1.203 flag; toggle v2.1.284Docs ↗
Extended thinkingintermediateThinking on by default; toggle for the sessionOption+T (macOS) or Alt+T; /config; alwaysThinkingEnabled; MAX_THINKING_TOKENS=0; cannot be turned off on Opus 5.5, Sonnet 5.5, Haiku 5.5 or Fable. Ctrl+O shows reasoningDocs ↗
Extended contextintermediate1M context: opus[1m], sonnet[1m] (native on newer models); turn off with CLAUDE_CODE_DISABLE_1M_CONTEXT=1; append [1m] to a full model name/model opus[1m]Docs ↗
Auto compactintermediateCompacts near the limit; set the trigger/autocompact 500k or auto, autoCompactWindow, CLAUDE_CODE_AUTO_COMPACT_WINDOW, CLAUDE_AUTOCOMPACT_PCT_OVERRIDE; DISABLE_AUTO_COMPACT=1Docs ↗
Check current modelbeginnerHeader and /status/statusDocs ↗
Custom model optionadvancedAdd one entry to /modelANTHROPIC_CUSTOM_MODEL_OPTION (+ _NAME, _DESCRIPTION)Docs ↗
Restrict modelsadvancedAllowlist/blocklist, org default model, effort limits, picker lineupavailableModels, deniedModels, modelPicker, maxEffortLevelDocs ↗
Fast modeintermediateUp to 2.5x faster Opus at higher token price (Opus 5.5 $8/$40 per MTok, Opus 5 and 4.8 $10/$50); bills as usage credits on subscriptions; research preview/fast [on, off], fastMode key, ↯ iconOpus 5.5 default v2.1.280Docs ↗
AdvisoradvancedA second model consulted at key moments/advisor [fable, opus, sonnet, off], --advisor, advisorModelDocs ↗
/usage (/cost, /stats)beginnerSession cost (estimated at list price, or your contracted rates when modelPricing is set), duration, per model tokens, prompt cache line, plan usage breakdown with recommendations; press d/w for 24 h / 7 d; f applies fixes/usage`f` fix v2.1.305; cache line v2.1.251Docs ↗
Token count beside spinnerbeginnerLive approximate output tokens of the current turnautomaticDocs ↗
/insightsintermediateHTML report on how you work, written to ~/.claude/usage-data/report.html/insightsDocs ↗
Usage creditsbeginnerBuy or request extra usage beyond plan limits/usage-credits (replaces /extra-usage, not in the docs command list)Docs ↗
Typical costbeginnerAbout $13 per developer per active day, $150-250 per month; below $30 per day for 90% of users (enterprise average)-Docs ↗
Rate limit sizingadvancedConsole TPM/RPM per user by team size, e.g. 1-5 users: 200k-300k TPM and 5-7 RPM; 500+ users: 10k-15k TPM and 0.25-0.35 RPM; limits are org levelConsole workspace limitsDocs ↗
Limit headroomintermediateWait for a usage limit to reset and continue automaticallyautoContinueAtUsageLimitv2.1.234Docs ↗
Reduce tokensbeginner/clear between tasks, /compact [focus], smaller model for simple work, fewer MCP servers (tool definitions deferred by default), hooks that pre filter output, move rarely used instructions from CLAUDE.md to skills, lower effort, subagents for verbose work, plan mode, specific promptsSee pageDocs ↗
Agent team costadvancedAbout 7x the tokens of a standard session when teammates run in plan mode-Docs ↗
Spend limits for orgsadvancedConsole workspace spend limits and Claude Code Analytics API; modelPricing for contracted rates-Docs ↗
Prompt caching: what it isintermediateReuses unchanged prefix (system prompt, tools, CLAUDE.md, history) at lower cost; each model has its own cacheSee pageDocs ↗
Actions that invalidate the cacheadvancedSwitching models, changing effort, turning on fast mode, connecting/removing MCP servers, enabling/disabling plugins, denying an entire tool, compacting, many images, upgrading-Docs ↗
Actions that keep the cacheadvancedEditing repo files, editing CLAUDE.md mid session, changing permission mode or output style, invoking skills, /recap, rewinding-Docs ↗
Cache TTLadvanced5 minutes or 1 hour; order of control: FORCE_PROMPT_CACHING_5M, bucket env var, bucket setting, subagent cacheTtl, ENABLE_PROMPT_CACHING_1H, defaultpromptCacheTtl, subagentPromptCacheTtl, CLAUDE_CODE_PROMPT_CACHE_TTL, ENABLE_PROMPT_CACHING_1H=1v2.1.242Docs ↗
Disable cachingadvancedAll or per model familyDISABLE_PROMPT_CACHING=1, DISABLE_PROMPT_CACHING_{OPUS,SONNET,HAIKU,FABLE}=1Docs ↗
Check cache performanceadvanced/usage cache line and status line prompt_cache object-v2.1.251Docs ↗
Context window explorerintermediateWhat loads at start and what survives compactionpageDocs ↗

Providers, gateways and network18

FeatureWhat it doesHowSinceDocs
Choose a providerintermediateAnthropic API, Amazon Bedrock, Google Cloud Agent Platform (Vertex), Microsoft Foundry, Claude Platform on AWS, Bedrock Mantlepages belowDocs ↗
Amazon BedrockadvancedRun on Bedrock with AWS credentialsexport CLAUDE_CODE_USE_BEDROCK=1, AWS_REGION=us-east-1 (region order: AWS_REGION, AWS_DEFAULT_REGION, profile region, us-east-1). /logout unavailable; WebSearch unavailableDocs ↗
Pin model versionsadvancedAliases drift; pin IDs/ARNs on every third party providerANTHROPIC_DEFAULT_OPUS_MODEL, _SONNET_, _HAIKU_, modelOverridesDocs ↗
Bedrock extrasadvancedCross region prefix, service tier, Guardrails, Mantle endpointANTHROPIC_BEDROCK_REGION_PREFIX, ANTHROPIC_BEDROCK_SERVICE_TIER, CLAUDE_CODE_USE_MANTLEDocs ↗
Google Cloud Agent Platform (Vertex)advancedRun on VertexCLAUDE_CODE_USE_VERTEX=1, CLOUD_ML_REGION=global, ANTHROPIC_VERTEX_PROJECT_ID, per-model VERTEX_REGION_CLAUDE_*Docs ↗
Microsoft FoundryadvancedRun on FoundryCLAUDE_CODE_USE_FOUNDRY=1, ANTHROPIC_FOUNDRY_RESOURCE=<name> (name only, not URL) or ANTHROPIC_FOUNDRY_BASE_URL; Entra token or API keyDocs ↗
Claude Platform on AWSadvancedAnthropic operated platform billed through AWSCLAUDE_CODE_USE_ANTHROPIC_AWS=1, ANTHROPIC_AWS_WORKSPACE_IDDocs ↗
LLM gatewayadvancedRoute through a gateway you run; gateway credentials replace the subscription login; set base URL and tokenANTHROPIC_BASE_URL, ANTHROPIC_AUTH_TOKEN; allowedProviders:["customEndpoint"] to lock itallowedProviders v2.1.285Docs ↗
Gateway rollout and protocoladvancedConnect, roll out, and compatibility guidepagesDocs ↗
Claude apps gatewayadvancedAnthropic built self hosted gateway with spend limits and per group managed settingsforceLoginMethod:"gateway", claude gatewayDocs ↗
ProxyintermediateStandard proxy variables (SOCKS unsupported)HTTPS_PROXY, HTTP_PROXY, NO_PROXY; lowercase worksDocs ↗
Custom CA and mTLSadvancedTrust a CA, present a client certificate (rotation picked up on connection errors)NODE_EXTRA_CA_CERTS, CLAUDE_CODE_CERT_STORE, CLAUDE_CODE_CLIENT_CERT/KEY/KEY_PASSPHRASErotation reload v2.1.232Docs ↗
Verify network configadvancedTest proxy and certificate setuppageDocs ↗
Network settings for background agentsadvancedPut network variables in settings env, not the shellenv blockDocs ↗
Streaming idle watchdogsadvancedDeadlines that close stalled streamsCLAUDE_STREAM_IDLE_TIMEOUT_MS and relativesDocs ↗
Network access requirementsadvancedHosts Claude Code must reachpageDocs ↗
Rate limits for 3rd party providersadvancedRaise via your cloud provider (AWS or Google Cloud support)-Docs ↗
MonitoringadvancedOpenTelemetry metrics and eventsCLAUDE_CODE_ENABLE_TELEMETRY=1 and OTEL_*Docs ↗

Topic 4 of 7

Extend

Hooks, MCP, skills, subagents and plugins.

Hooks: events, matchers and exit codes

1 Concepts, configuration, scopes17

FeatureWhat it doesHowSinceDocs
Hook basicsbeginnerRun your own code at fixed points in a session, deterministically (unlike CLAUDE.md, which is only advice).Add a hooks block to a settings file, then check it with /hooks.not statedDocs ↗
Three level config shapebeginnerEvent, then matcher group, then handler list.{"hooks":{"PreToolUse":[{"matcher":"Bash","hooks":[{"type":"command","command":"..."}]}]}}not statedDocs ↗
Scope: userbeginnerHooks for all your projects, local to your machine.~/.claude/settings.jsonnot statedDocs ↗
Scope: project (shared)beginnerHooks committed to the repo for the team..claude/settings.jsonnot statedDocs ↗
Scope: project (private)beginnerPer project hooks that are gitignored..claude/settings.local.jsonnot statedDocs ↗
Scope: managed policyadvancedOrganization wide hooks that user settings cannot remove.Managed settings; disableAllHooks in lower scopes cannot disable them.not statedDocs ↗
Scope: pluginintermediateHooks that load when the plugin is enabled.hooks/hooks.json in the plugin (optional top-level description), or the manifest hooks key.not statedDocs ↗
Scope: skill frontmatteradvancedHooks registered when the skill is invoked, kept for the rest of the session.hooks: key in SKILL.md frontmatter; once: true removes after first success.not statedDocs ↗
Scope: subagent frontmatteradvancedHooks that live only while that subagent runs; a Stop hook is converted to SubagentStop.hooks: key in the agent file.not statedDocs ↗
Hooks merge, not replaceintermediateUser, project, local and plugin hooks add to managed ones. Identical handlers across files run once.Automatic.not statedDocs ↗
/hooks browserbeginnerRead only list of all configured hooks, labelled by source; "All events" shows events with no hooks.Type /hooks.not statedDocs ↗
Turn hooks offintermediateDisable all hooks without deleting them (cannot disable managed hooks from user scope)."disableAllHooks": true, or claude --settings '{"disableAllHooks": true}' for one run.not statedDocs ↗
Managed only hooksadvancedAdmin setting that blocks user, project, local and plugin hooks.allowManagedHooksOnly in managed settings.not statedDocs ↗
HTTP hook allowlistsadvancedRestrict which URLs HTTP hooks may call and which env vars may go in headers.allowedHttpHookUrls, httpHookAllowedEnvVars settings.not statedDocs ↗
Plugin only lockadvancedAdmins can lock hooks to plugins and managed settings.strictPluginOnlyCustomization managed setting.not statedDocs ↗
Hooks run in subagents toointermediateSettings, managed and plugin hooks fire inside subagents; input carries agent_id and agent_type.Automatic.not statedDocs ↗
Workspace trust gateintermediateInteractive sessions hold back ALL settings file hooks until you accept the folder trust dialog. -p and SDK runs never show the dialog and treat the folder as trusted.Review .claude/ first; use --bare or disableAllHooks for untrusted repos.not statedDocs ↗

2 Matchers and filters7

FeatureWhat it doesHowSinceDocs
Match allbeginner"*", "" or omitted matcher fires on every occurrence.omit matchernot statedDocs ↗
Exact name or listbeginnerLetters, digits, _, -, spaces, ,, | are treated as exact strings."Edit|Write" or "Edit, Write"not statedDocs ↗
Regex matcherintermediateAny other character makes it an unanchored JavaScript regex."^Notebook", "mcp__memory__.*"not statedDocs ↗
MCP tool matchersintermediateMCP tools are named mcp__<server>__<tool>; the .* suffix is required to match a whole server."mcp__github__.*"; plugin servers: mcp__plugin_<plugin>_<server>__.*not statedDocs ↗
if fieldintermediateOne permission rule filter per handler, so the command only runs for matching calls. Tool events only."if": "Bash(git *)" or "Edit(*.ts)"; no &&/||, use separate handlers.not statedDocs ↗
if is best effort for BashadvancedIf Claude Code cannot parse the command it runs the hook anyway. Use permissions for hard enforcement.See the Bash matching table.not statedDocs ↗
Events with no matcherintermediateA matcher on these is silently ignored.UserPromptSubmit, PostToolBatch, Stop, TeammateIdle, TaskCreated, TaskCompleted, WorktreeCreate, WorktreeRemove, MessageDisplay, CwdChangednot statedDocs ↗

3 Handler types and fields16

FeatureWhat it doesHowSinceDocs
command hookbeginnerRuns a shell command; JSON arrives on stdin; result via exit code, stdout, stderr.{"type":"command","command":"./check.sh"}not statedDocs ↗
Exec form (args)intermediateSpawn an executable directly with an argument array, no shell, safe with spaces in paths.{"type":"command","command":"node","args":["${CLAUDE_PLUGIN_ROOT}/x.js"]}not statedDocs ↗
shell fieldadvancedPick bash or powershell for shell form hooks."shell": "powershell"not statedDocs ↗
http hookadvancedPOSTs the event JSON to a URL; response body uses the same JSON output format. Non-2xx and connection failures are non blocking.{"type":"http","url":"http://localhost:8080/hook","headers":{"Authorization":"Bearer $MY_TOKEN"},"allowedEnvVars":["MY_TOKEN"]}not statedDocs ↗
mcp_tool hookadvancedCalls a tool on a configured MCP server; text output is read like stdout. Skipped for SessionStart at launch and Setup.{"type":"mcp_tool","server":"my_server","tool":"security_scan","input":{"file_path":"${tool_input.file_path}"}}not statedDocs ↗
prompt hookintermediateSingle turn LLM judgment; model replies {"ok":true/false,"reason":"..."}. Default timeout 30 s.{"type":"prompt","prompt":"Evaluate if Claude should stop: $ARGUMENTS"}not statedDocs ↗
agent hookadvancedSpawns a subagent with Read/Grep/Glob, up to 50 turns, returns {ok}. Experimental. Default timeout 60 s.{"type":"agent","prompt":"Verify all unit tests pass. $ARGUMENTS","timeout":120}not statedDocs ↗
Which events accept which typesadvancedAll five types: PermissionDenied, PostToolBatch, PostToolUse, PostToolUseFailure, PreToolUse, Stop, SubagentStop, TaskCompleted, TaskCreated, TeammateIdle, UserPromptExpansion, UserPromptSubmit. PermissionRequest: no agent. SessionStart and Setup: command and mcp_tool only. All others: command, http, mcp_tool.See the lists.not statedDocs ↗
continueOnBlock (prompt hooks)advancedFeed an ok:false reason back to Claude and continue instead of ending the turn."continueOnBlock": truenot statedDocs ↗
timeoutintermediateSeconds before cancel. Defaults: 600 command/http/mcp_tool, 30 prompt, 60 agent; lowered to 30 on UserPromptSubmit, PreModelSwitch, PostModelSwitch and 10 on MessageDisplay. SessionEnd shares a 1.5 s budget."timeout": 10not statedDocs ↗
statusMessageintermediateCustom spinner text while the hook runs."statusMessage": "Linting..."not statedDocs ↗
onceadvancedRemove the hook after its first successful run; only honored in skill frontmatter."once": truenot statedDocs ↗
asyncintermediateRun a command hook in the background; cannot block or decide. Output arrives next turn."async": truenot statedDocs ↗
asyncRewakeadvancedBackground hook that wakes Claude when it exits 2; stderr (or stdout) is shown as a system reminder."asyncRewake": truenot statedDocs ↗
onFailureadvancedMake a failing, crashing or timed out hook block the action ("block") or let it through ("continue"). Does nothing on Stop, SubagentStop, TaskCompleted, TeammateIdle or async hooks."onFailure": "block"v2.1.295Docs ↗
Parallel executionadvancedMatching hooks run in parallel; at most 12 prompt/agent hooks at once.Automatic.not statedDocs ↗

4 Environment variables and path placeholders for hooks8

FeatureWhat it doesHowSinceDocs
${CLAUDE_PROJECT_DIR}intermediateProject root where the session started. Also set for stdio MCP servers and plugin LSP servers. Does not follow into worktrees (use cwd in the input)."command": "${CLAUDE_PROJECT_DIR}/.claude/hooks/x.sh"not statedDocs ↗
${CLAUDE_PLUGIN_ROOT} / ${CLAUDE_PLUGIN_DATA}intermediatePlugin install dir and its persistent data dir (survives updates). Exported to the process too.Use in plugin hooks.json.not statedDocs ↗
$CLAUDE_PLUGIN_OPTION_<KEY>advancedPlugin userConfig values for shell form hooks. ${user_config.*} works in exec form only.$CLAUDE_PLUGIN_OPTION_WEBHOOK_URLv2.1.207 (shell form `${user_config.*}` removed)Docs ↗
$CLAUDE_ENV_FILEintermediateIn SessionStart hooks (the guide's direnv example also writes it from a CwdChanged hook), a file path; append export lines to persist env vars for later Bash commands.echo 'export NODE_ENV=production' >> "$CLAUDE_ENV_FILE"not statedDocs ↗
$CLAUDE_CODE_REMOTEintermediate"true" in remote web environments, unset in the local CLI.Read in the script.not statedDocs ↗
$CLAUDE_CODE_BRIDGE_SESSION_IDadvancedRemote Control session id while a connection is active.Read in the script.v2.1.199Docs ↗
No $CLAUDE_MODELintermediateThere is no model variable. Use PostModelSwitch (from_model/to_model) or the SessionStart model field.Nonenot statedDocs ↗
Environment inheritanceadvancedHooks inherit Claude Code's environment, minus OTEL_* exporter vars; CLAUDE_CODE_SUBPROCESS_ENV_SCRUB=1 strips more.Nonenot statedDocs ↗

5 Input, exit codes and output22

FeatureWhat it doesHowSinceDocs
Common input fieldsbeginnerEvery event gets session_id, prompt_id, transcript_path, cwd, scratchpad_dir, permission_mode, effort, hook_event_name, plus agent_id/agent_type inside subagents.Read JSON from stdin.`scratchpad_dir` v2.1.257Docs ↗
permission_mode valuesintermediatedefault (shown as Manual), plan, acceptEdits, auto, dontAsk, bypassPermissions.Read permission_mode.not statedDocs ↗
Exit 0beginnerSuccess. Plain stdout is only shown to Claude on UserPromptSubmit, UserPromptExpansion, SessionStart, PostModelSwitch; JSON stdout is applied.exit 0not statedDocs ↗
Exit 2beginnerBlocking error on events that can block; stderr becomes the reason shown to Claude. Even JSON allow cannot override it.echo "reason" >&2; exit 2not statedDocs ↗
Other exit codesbeginnerNon blocking error; the action goes ahead. Exit 1 does NOT block, use 2 for policy.Nonenot statedDocs ↗
Exit 2 per eventadvancedCan block: PreToolUse, UserPromptSubmit, UserPromptExpansion, Stop, SubagentStop, TeammateIdle, TaskCreated, TaskCompleted, ConfigChange (not policy), PostToolBatch, PreCompact, PreModelSwitch, Elicitation, ElicitationResult, WorktreeCreate/Remove (any non zero). Cannot block: PermissionRequest, PostToolUse(+Failure), PermissionDenied, Notification, SubagentStart, SessionStart, Setup, SessionEnd, CwdChanged, DirectoryAdded, FileChanged, PostCompact, PostModelSwitch, StopFailure, InstructionsLoaded, MessageDisplay.See table.not statedDocs ↗
JSON output rulesintermediatePrint exactly one JSON object and nothing else; shell profile noise breaks parsing. Choose exit codes OR JSON per hook.jq -nc '{...}'not statedDocs ↗
Universal JSON fieldsintermediatecontinue (false stops Claude), stopReason, systemMessage (warning for the user), terminalSequence; suppressOutput is accepted but has no effect.{"continue":false,"stopReason":"Build failed"}not statedDocs ↗
terminalSequenceintermediateHave Claude Code emit a desktop notification, window title or bell for you (hooks have no /dev/tty). Allowed OSC 0/1/2/9/99/777 and BEL. Interactive sessions only.{"terminalSequence":"\u001b]777;notify;T;msg\u0007"}not statedDocs ↗
additionalContextintermediateInjects text into Claude's context as a system reminder next to the event. 10,000 character cap, then saved to a file with a 2,000 char preview. Write facts, not commands.hookSpecificOutput.additionalContextnot statedDocs ↗
Top level decision: "block"intermediateBlock pattern for UserPromptSubmit, UserPromptExpansion, PostToolUse, PostToolUseFailure, PostToolBatch, Stop, SubagentStop, ConfigChange, PreCompact.{"decision":"block","reason":"Tests must pass"}not statedDocs ↗
PreToolUse decisionsintermediatepermissionDecision allow, deny, ask, defer, plus updatedInput and additionalContext. Precedence deny > defer > ask > allow. Old top level decision/reason are deprecated for this event.{"hookSpecificOutput":{"hookEventName":"PreToolUse","permissionDecision":"deny","permissionDecisionReason":"..."}}not statedDocs ↗
Rewrite tool inputadvancedupdatedInput replaces the whole input object before the tool runs. Do not rewrite from two hooks at once.Include unchanged fields too.not statedDocs ↗
Defer for SDK hostsadvanced"defer" pauses a claude -p run at a tool call so a host app can collect an answer, then --resume. Single tool call turns only.permissionDecision:"defer"resume in plan mode v2.1.246Docs ↗
PermissionRequest decisionsadvancedAllow or deny on the user's behalf with decision.behavior, optional updatedInput, updatedPermissions, message, interrupt. Does not override deny rules.{"hookSpecificOutput":{"hookEventName":"PermissionRequest","decision":{"behavior":"allow"}}}not statedDocs ↗
Replace a tool resultadvancedupdatedToolOutput (all tools) or updatedMCPToolOutput (MCP only) changes what Claude sees after the tool ran. Value must match the tool's output shape. The tool already ran.hookSpecificOutput.updatedToolOutputnot statedDocs ↗
classifierContextadvancedNote for the auto mode classifier about a tool result.hookSpecificOutput.classifierContextv2.1.236Docs ↗
Stop feedback without an errorintermediatehookSpecificOutput.additionalContext on Stop keeps the conversation going and is labelled "Stop hook feedback".{"hookSpecificOutput":{"hookEventName":"Stop","additionalContext":"Run the tests"}}not statedDocs ↗
Stop loop protectionintermediateCheck stop_hook_active; Claude Code overrides a Stop hook after 8 consecutive blocks with no tool call between.if event["stop_hook_active"]: exit 0not statedDocs ↗
Hook starts a background processadvancedPrint the decision first and redirect the child's stdout/stderr, else Claude Code blocks the call with "refusing to honor the suspect capture"../x.sh >/dev/null 2>&1 &not statedDocs ↗
Hooks can never loosen denyadvancedA hook "allow" does not bypass settings deny rules, and deny from a PreToolUse hook holds in every mode including bypassPermissions.Nonenot statedDocs ↗
@ file mentions skip PreToolUseadvancedFiles referenced with @ are inserted with no tool call, so PreToolUse cannot see them.Block paths in permissions or set CLAUDE_CODE_DISABLE_FILE_MENTIONS=1.not statedDocs ↗

6 Hook events (33)33

FeatureWhat it doesHowSinceDocs
SessionStartbeginnerSession begins or resumes.Matcher startup|resume|clear|compact|fork. Input: source, model, context_tokens, prompt_cache_likely_expired. Output: additionalContext, initialUserMessage (-p), sessionTitle, watchPaths, reloadSkills. Cannot block. Only command/mcp_tool types.not statedDocs ↗
SetupadvancedOne time prep for CI and scripts: --init-only, or --init/--maintenance with -p.Matcher init|maintenance. Input: trigger. No decision control.not statedDocs ↗
InstructionsLoadedadvancedA CLAUDE.md or .claude/rules/*.md file enters context.Matcher session_start|nested_traversal|path_glob_match|include|compact. Input: file_path, memory_type, load_reason. Side effects only.not statedDocs ↗
UserPromptSubmitintermediatePrompt submitted, before Claude sees it (also on turns Claude Code starts itself).No matcher. Input: prompt. Exit 2 or decision:"block" rejects it; additionalContext adds context. Cannot rewrite the prompt. Default timeout 30 s.not statedDocs ↗
UserPromptExpansionadvancedA typed slash command or skill expands into a prompt.Matcher = command name. Input: expansion_type, command_name, command_args, command_source, prompt. Can block.not statedDocs ↗
MessageDisplayadvancedWhile assistant text is displayed.No matcher. Input: turn_id, message_id, index, final, delta. hookSpecificOutput.displayContent changes the on-screen text only. Default timeout 10 s.not statedDocs ↗
PreToolUsebeginnerBefore a tool call runs.Matcher = tool name. Input: tool_name, tool_input, tool_use_id. Control: exit 2 or permissionDecision allow/deny/ask/defer, updatedInput.not statedDocs ↗
PermissionRequestadvancedA tool call needs a permission decision.Matcher = tool name. Input: tool_name, tool_input, permission_suggestions. Control: decision.behavior. Exit 2 is not honored. No agent hooks.not statedDocs ↗
PermissionDeniedadvancedAuto mode denied a call.Matcher = tool name. Input: tool_name, tool_input, tool_use_id, reason. hookSpecificOutput.retry: true lets the model retry (ignored when the classifier gave no verdict).not statedDocs ↗
PostToolUsebeginnerAfter a tool call succeeds.Matcher = tool name. Input: tool_name, tool_input, tool_response, tool_use_id, duration_ms. decision:"block", additionalContext, updatedToolOutput. Exit 2 shows stderr to Claude (tool already ran).not statedDocs ↗
PostToolUseFailureintermediateAfter a tool call fails.Matcher = tool name. Input: error, is_interrupt, duration_ms plus tool fields.not statedDocs ↗
PostToolBatchadvancedOnce after a whole batch of parallel tool calls resolves, before the next model call.No matcher. Input: tool_calls array. Exit 2 or block stops the loop.not statedDocs ↗
NotificationbeginnerClaude Code sends a notification.Matcher = type: permission_prompt, idle_prompt, auth_success, elicitation_dialog, elicitation_url_dialog, elicitation_complete, elicitation_response, agent_needs_input, agent_completed, quota_auto_resume_*, plugin_notification. Input: message, title, notification_type. Side effects only.not statedDocs ↗
SubagentStartintermediateA subagent is spawned.Matcher = agent type (general-purpose, Explore, Plan, custom, or ^plugin:name$). Can add additionalContext. Cannot block.not statedDocs ↗
SubagentStopintermediateA subagent finishes.Matcher = agent type. Input: stop_hook_active, agent_transcript_path, last_assistant_message, background_tasks, session_crons. Blocks like Stop.not statedDocs ↗
TaskCreatedadvancedA task is created via TaskCreate.No matcher. Input: task_id, task_subject, task_description, teammate_name, team_name. Exit 2 or decision:"block" rolls it back.not statedDocs ↗
TaskCompletedadvancedA task is marked complete.No matcher. Same input fields. Exit 2 prevents completion.not statedDocs ↗
StopbeginnerClaude finishes responding (not on user interrupt).No matcher. Input: stop_hook_active, last_assistant_message, background_tasks, session_crons. Exit 2 / decision:"block" makes Claude keep working.not statedDocs ↗
StopFailureintermediateTurn ended because of an API error.Matcher = error type (rate_limit, overloaded, authentication_failed, oauth_org_not_allowed, account_on_hold, billing_error, invalid_request, model_not_found, server_error, max_output_tokens, cloud_credential_error, unknown). Input: error, error_details, last_assistant_message. Output ignored except terminalSequence.`cloud_credential_error` v2.1.267Docs ↗
TeammateIdleadvancedAn agent team teammate is about to go idle.No matcher. Input: teammate_name, team_name. Exit 2 keeps it working.not statedDocs ↗
ConfigChangeadvancedA config file changes mid session.Matcher user_settings|project_settings|local_settings|policy_settings|skills. Input: source, file_path. Can block (except policy_settings).not statedDocs ↗
CwdChangedadvancedWorking directory changes (e.g. Claude runs cd). Handy for direnv.No matcher. Input: old_cwd, new_cwd.not statedDocs ↗
DirectoryAddedadvancedDirectory added via /add-dir or SDK register_repo_root.Matcher slash_command|register_repo_root. Input: directory, source.not statedDocs ↗
FileChangedadvancedA watched file changes on disk, whoever changed it.Matcher = literal filenames split on | (.envrc|.env), which also builds the watch list. Input: file_path, event.not statedDocs ↗
WorktreeCreateadvancedA worktree is created (--worktree, EnterWorktree, isolation: "worktree", background session). Replaces default git behaviour.No matcher. Input: name. Command hook prints the path on stdout; HTTP hook returns hookSpecificOutput.worktreePath. Any non-zero exit fails creation.not statedDocs ↗
WorktreeRemoveadvancedA hook created worktree is being removed.No matcher. Input: worktree_path. Non-zero exit fails removal if the directory remains.not statedDocs ↗
PreCompactintermediateBefore context compaction.Matcher manual|auto. Input: trigger, custom_instructions. Can block.not statedDocs ↗
PostCompactintermediateAfter compaction completes.Matcher manual|auto. Input: trigger, compact_summary. Side effects only.not statedDocs ↗
PreModelSwitchadvancedBefore a requested model switch is applied.Matcher = canonical model name (claude-opus-5, .*opus.*). Input: from_model, to_model, requested_model, source, context_tokens, prompt_cache_warm, cache_ttl, estimated_cache_write_usd, pricing. permissionDecision allow/deny/ask or decision:"block". A timeout blocks the switch. Default 30 s.not statedDocs ↗
PostModelSwitchadvancedAfter the session model changes, including automatic changes such as restore on resume.Matcher = model name. Input: from_model, to_model. additionalContext or plain stdout is added to context.not statedDocs ↗
SessionEndintermediateSession terminates.Matcher clear|resume|logout|prompt_input_exit|other. Input: reason. 1.5 s shared budget.not statedDocs ↗
ElicitationadvancedAn MCP server asks the user for input mid tool call.Matcher = MCP server name. Input: mcp_server_name, message, mode, requested_schema, url. Reply action accept/decline/cancel + content, or exit 2 to decline.not statedDocs ↗
ElicitationResultadvancedAfter the user answers an elicitation, before it goes to the server.Matcher = MCP server name. Input: mcp_server_name, action, content, mode. Can override or block (becomes decline).not statedDocs ↗

7 Official hook examples and security13

FeatureWhat it doesHowSinceDocs
Example: desktop notificationbeginnerPing you when Claude waits for input.Notification hook with osascript -e 'display notification ...' (macOS); guide also covers Linux and Windows.not statedDocs ↗
Example: auto format after editsbeginnerRun a formatter after each file edit.PostToolUse matcher Edit|Write, command jq -r '.tool_input.file_path' | xargs npx prettier --writenot statedDocs ↗
Example: protect filesintermediateBlock edits to .env, .git/ and similar.PreToolUse Edit|Write script that exits 2.not statedDocs ↗
Example: re inject context after compactionintermediateRe add key facts after /compact.SessionStart matcher compact with stdout or additionalContext.not statedDocs ↗
Example: audit config changesadvancedLog every settings change.ConfigChange hook.not statedDocs ↗
Example: reload env on cd or file changeadvanceddirenv style reload.CwdChanged and FileChanged hooks.not statedDocs ↗
Example: auto approve a permission promptadvancedSkip the dialog for one tool, the guide's example is ExitPlanMode.PermissionRequest hook with matcher ExitPlanMode returning decision.behavior: "allow".not statedDocs ↗
Official repo example scriptintermediatePython PreToolUse validator that tells Claude to use rg instead of grep/find.examples/hooks/bash_command_validator_example.py in anthropics/claude-code.not statedDocs ↗
Security warningbeginnerCommand hooks run with your full user permissions and can modify or delete anything you can.Review every command; validate input, quote variables ("$VAR"), block .. paths, use absolute paths, skip .env/.git//keys.not statedDocs ↗
Debug a hookintermediateHook execution is written to the debug log, not the terminal.claude --debug-file /tmp/x.log, or claude --debug then ~/.claude/debug/<session-id>.txt; CLAUDE_CODE_DEBUG_LOG_LEVEL=verbose for matcher detail; /debug mid-session.per hook duration lines v2.1.296Docs ↗
Hook not firing checklistbeginnerConfirm it appears under the right event in /hooks (skill frontmatter hooks only show after the skill is invoked); matchers are case sensitive; check you chose the right event (PreToolUse before, PostToolUse after)./hooks, then debug log.not statedDocs ↗
Hook JSON has no effectintermediateUsually shell profile output before the JSON, or decision fields at the wrong nesting level.Silence ~/.zshrc echoes for non-interactive shells; use hookSpecificOutput where required.not statedDocs ↗
hookify pluginintermediateOfficial plugin that creates hook rules from conversation patterns or markdown rule files./plugin install hookify@claude-plugins-officialnot statedDocs ↗

MCP servers

JSON
{
  "mcpServers": {
    "api-server": {
      "type": "http",
      "url": "${API_BASE_URL:-https://api.example.com}/mcp",
      "headers": {
        "Authorization": "Bearer ${API_KEY}"
      }
    },
    "local-tool": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@example/mcp-server"],
      "env": {
        "PROJECT_ROOT": "${CLAUDE_PROJECT_DIR:-.}"
      }
    },
    "slow-server": {
      "type": "http",
      "url": "https://mcp.example.com/mcp",
      "timeout": 120000,
      "alwaysLoad": true
    }
  }
}

1 CLI commands17

FeatureWhat it doesHowSinceDocs
Add remote HTTP serverbeginnerConnect a cloud MCP server (recommended transport). streamable-http is accepted as an alias for http in JSON.claude mcp add --transport http notion https://mcp.notion.com/mcpnot statedDocs ↗
Header authbeginnerPass a static token header.--header "Authorization: Bearer ..." (or -H)not statedDocs ↗
Add SSE serverintermediateLegacy transport, deprecated. HTTP is tried first and falls back to SSE.claude mcp add --transport sse asana https://mcp.asana.com/sseSSE auto fallback v2.1.265Docs ↗
Add stdio serverbeginnerRun a local process as the server. -- separates Claude's flags from the server command.claude mcp add --env KEY=val --transport stdio airtable -- npx -y airtable-mcp-servernot statedDocs ↗
Add WebSocket serveradvancedPersistent two way server; no OAuth, header auth only; only via JSON.claude mcp add-json events '{"type":"ws","url":"wss://...","headers":{...}}'not statedDocs ↗
claude mcp add-jsonintermediateAdd a server from a JSON string (stdio, SSE, HTTP, ws). url entries need type.claude mcp add-json <name> '<json>' [--scope user]not statedDocs ↗
claude mcp add-from-claude-desktopbeginnerImport servers from Claude Desktop through an interactive picker. macOS and WSL only; names must be letters, digits, -, _.claude mcp add-from-claude-desktop --scope usernot statedDocs ↗
claude mcp listbeginnerList servers with health: Connected, Needs authentication, Failed, Pending approval, Disabled.claude mcp listnot statedDocs ↗
claude mcp getbeginnerShow one server's details.claude mcp get <name>not statedDocs ↗
claude mcp removebeginnerRemove a server and delete its stored OAuth tokens.claude mcp remove <name> [--scope local|user|project]not statedDocs ↗
claude mcp login / logoutintermediateRun or clear OAuth from the shell. --no-browser prints the URL for SSH.claude mcp login <name> [--no-browser]; claude mcp logout <name>not statedDocs ↗
claude mcp reset-project-choicesintermediateForget approved and rejected .mcp.json servers for the project.claude mcp reset-project-choicesnot statedDocs ↗
claude mcp serveadvancedRun Claude Code itself as a stdio MCP server exposing its tools to another client. Prints nothing while waiting. Your client must handle per tool confirmation.claude mcp serve; Claude Desktop config {"mcpServers":{"claude-code":{"type":"stdio","command":"claude","args":["mcp","serve"],"env":{}}}}not statedDocs ↗
-s, --scopebeginnerWhere the config is stored: local (default), project, user.--scope projectnot statedDocs ↗
-e, --envintermediateEnvironment variables for the server; put another option between --env and the name.-e API_KEY=xxxnot statedDocs ↗
--client-id, --client-secret, --callback-portadvancedPre registered OAuth credentials and a fixed redirect port for HTTP/SSE servers. Secret via prompt or MCP_CLIENT_SECRET.claude mcp add --transport http --callback-port 8080 --client-id ID --client-secret srv URLnot statedDocs ↗
--mcp-config, --strict-mcp-configintermediateLoad servers for one session from JSON files; strict mode ignores every other MCP source.claude --mcp-config a.json --strict-mcp-configstrict skip approval v2.1.246Docs ↗

2 Scopes, config files, env expansion14

FeatureWhat it doesHowSinceDocs
Local scope (default)beginnerPrivate to you, this project only; stored in ~/.claude.json under the project path.defaultnot statedDocs ↗
Project scopebeginnerShared with the team via a committed .mcp.json at the project root; Claude asks you to approve each server first.--scope projectnot statedDocs ↗
User scopebeginnerAvailable in all your projects; stored in ~/.claude.json.--scope usernot statedDocs ↗
PrecedenceintermediateSame name in several places: local, then project, then user, then plugin, then claude.ai connectors. First wins whole; fields are not merged. A managedMcpServers entry outranks all.NonemanagedMcpServers v2.1.259Docs ↗
.mcp.json formatbeginner{"mcpServers": {"<name>": {"type":"http","url":"..."}}}. url with no type is a config error. Server names: letters, digits, -, _.See snippets/mcp_json.json.not statedDocs ↗
Env var expansionintermediate${VAR} and ${VAR:-default} in command, args, env, url, headers. Unset vars with no default load with a warning."Authorization": "Bearer ${API_KEY}"not statedDocs ↗
Credential vars read as emptyadvancedIn remote url/headers, names like ANTHROPIC_API_KEY, ANTHROPIC_AUTH_TOKEN, AWS_BEARER_TOKEN_BEDROCK, HTTPS_PROXY, NPM_TOKEN expand to empty so a repo cannot exfiltrate them. Copy into your own variable name.Nonenot statedDocs ↗
$CLAUDE_PROJECT_DIR in serversadvancedSet in a stdio server's environment to the project root; use ${CLAUDE_PROJECT_DIR:-.} when referencing it in .mcp.json. Servers can also implement roots/list."env":{"ROOT":"${CLAUDE_PROJECT_DIR:-.}"}not statedDocs ↗
Per server fieldsadvancedtimeout (ms hard wall clock, min 1000), alwaysLoad, headers, headersHelper, oauth (clientId, callbackPort).JSON keys in the entrynot statedDocs ↗
Dynamic headersadvancedA headersHelper command prints short lived auth headers as JSON; needs folder trust."headersHelper": "./get-headers.sh"`headersHelper` v2.1.238 (marketplaces)Docs ↗
Project approvalsintermediateProject servers need approval; claude -p and cloud sessions load them without asking. Approve or reject via settings.enabledMcpjsonServers, disabledMcpjsonServers, enableAllProjectMcpServersnot statedDocs ↗
Disable without removingbeginnerTurn a server off per project./mcp panel or /mcp disable <server|all>not statedDocs ↗
claude.ai connectorsbeginnerMCP servers you added at claude.ai/customize/connectors appear automatically when you are logged in with that account./mcp to view; disable with the connector setting.not statedDocs ↗
Plugin provided serversintermediatePlugins bundle servers in .mcp.json; tools appear as mcp__plugin_<plugin>_<server>__<tool>.In the plugin.not statedDocs ↗

4 Managed MCP policy (organizations)7

FeatureWhat it doesHowSinceDocs
managed-mcp.jsonadvancedExclusive control: users get only these servers (plus managedMcpServers). An empty server map disables MCP.macOS /Library/Application Support/ClaudeCode/managed-mcp.json, Linux/WSL /etc/claude-code/managed-mcp.json, Windows C:\Program Files\ClaudeCode\managed-mcp.jsonnot statedDocs ↗
managedMcpServersadvancedProvide remote servers to every user while they keep their own. Managed settings only.setting in managed settingsv2.1.259Docs ↗
allowedMcpServers / deniedMcpServersadvancedAllowlist and denylist by serverName, serverCommand (exact array) or serverUrl (wildcards). Denylist always applies.See snippets/mcp_managed_policy.jsonnot statedDocs ↗
allowManagedMcpServersOnlyadvancedLock the allowlist to managed sources.managed settingnot statedDocs ↗
Related switchesadvancedallowClaudeInChromeWithManagedMcp, allowAllClaudeAiMcps.managed settingsnot statedDocs ↗
Plugin servers onlyadvancedBlock ~/.claude.json and .mcp.json servers but keep plugin ones.strictPluginOnlyCustomizationnot statedDocs ↗
No built in registryintermediateClaude Code has no browsable MCP registry; share an approved list yourself or ship servers as plugins.Nonenot statedDocs ↗

Skills and custom commands

1 Format, locations, loading17

FeatureWhat it doesHowSinceDocs
Create a skillbeginnerA folder with SKILL.md (YAML frontmatter + Markdown). Type /skill-name or let Claude load it.~/.claude/skills/<name>/SKILL.mdnot statedDocs ↗
Location: personalbeginnerAvailable in all your projects on this machine (not Cowork or cloud sessions).~/.claude/skills/<name>/SKILL.mdnot statedDocs ↗
Location: projectbeginnerShared by committing it; not loaded in cloud threads of a Project..claude/skills/<name>/SKILL.mdnot statedDocs ↗
Location: nestedintermediateLoaded when you work in or below that subdirectory (monorepos).<subdir>/.claude/skills/<name>/SKILL.mdnot statedDocs ↗
Location: additional directoryintermediateSkills from a dir passed with --add-dir..claude/skills/ inside that dirname clash prefix v2.1.309Docs ↗
Location: enterpriseadvancedManaged settings directory, loaded for all users..claude/skills/ in the managed settings directorynot statedDocs ↗
Location: pluginintermediateNamespaced as /plugin-name:skill-name.<plugin>/skills/<name>/SKILL.mdnot statedDocs ↗
Location: claude.ai accountintermediateSkills enabled on your claude.ai account sync to Cowork, cloud and terminal sessions; command prefix anthropic-skills:. ! commands never run for synced skills.claude.ai settings`!` restriction v2.1.228Docs ↗
Reserved namesadvancedDo not name a folder synced or anthropic-skills; names with zero width or control characters do not load.Nonenot statedDocs ↗
Live editingbeginnerEdits to existing skills are picked up during a session.edit the filenot statedDocs ↗
Progressive disclosurebeginnerLevel 1 metadata (about 100 tokens per skill) is always loaded; Level 2 SKILL.md body (under 5k tokens) loads when triggered; Level 3 supporting files and script output load only when used.Keep SKILL.md short, link to reference.md, put scripts in scripts/.not statedDocs ↗
Skills in Claude Code: listing budgetadvancedDescriptions are listed for Claude; combined description + when_to_use is truncated at 1,536 characters; total listing budget is 1% of the context window (fallback 8,000 characters).SLASH_COMMAND_TOOL_CHAR_BUDGET overridesnot statedDocs ↗
How Claude choosesbeginnerClaude matches your request against each skill's description (and when_to_use); write what it does AND when to use it. paths limits auto activation to matching files.Nonenot statedDocs ↗
Invoke directlybeginner/name args at the start of a message runs the skill; a name after plain text only grants permission./deploy stagingnot statedDocs ↗
Content lifecycleadvancedThe rendered body enters the conversation once and stays; auto compaction re attaches the latest invocation (first 5,000 tokens each).Nonenot statedDocs ↗
Supporting filesbeginnerPut big references, examples and scripts next to SKILL.md and link them.my-skill/{SKILL.md,reference.md,scripts/}not statedDocs ↗
Skill folder as pluginadvancedAdd .claude-plugin/plugin.json to a personal or project skill folder to load it as <name>@skills-dir with its own agents, hooks, MCP servers.claude plugin init <name> scaffolds onenot statedDocs ↗

2 SKILL.md frontmatter, every field (from the official table)21

FeatureWhat it doesHowSinceDocs
namebeginnerCommand name shown in /. Defaults to the directory name. (Agent Skills spec: max 64 chars, lowercase letters, digits, hyphens, no anthropic/claude.)name: deploynot statedDocs ↗
descriptionbeginnerWhat it does and when to use it; Claude uses it to decide. Recommended. Spec max 1,024 chars.description: Deploy to productionnot statedDocs ↗
when_to_useintermediateExtra trigger phrases, appended to the description (the only field name with an underscore).when_to_use: "deploy to staging"not statedDocs ↗
argument-hintbeginnerAutocomplete hint.argument-hint: "[issue-number]"not statedDocs ↗
argumentsintermediateNamed positional args for $name substitution; string or YAML list.arguments: [issue, branch]not statedDocs ↗
disable-model-invocationbeginnertrue stops Claude from loading the skill on its own (description leaves context; also blocks preload into subagents and scheduled task runs).disable-model-invocation: truenot statedDocs ↗
user-invocableintermediatefalse hides it from the / menu so only Claude can use it.user-invocable: falsenot statedDocs ↗
allowed-toolsintermediateTools usable without a prompt during the invoking turn only; space/comma string or YAML list.allowed-tools: Bash(git *) Readnot statedDocs ↗
disallowed-toolsadvancedTools removed from Claude's pool while the skill is active.disallowed-tools: AskUserQuestionnot statedDocs ↗
modelintermediateModel for the rest of the turn; inherit keeps the current one.model: sonnetnot statedDocs ↗
effortintermediateEffort level while active: low, medium, high, xhigh, max.effort: highnot statedDocs ↗
contextintermediatefork runs the skill in a separate subagent that does not see your chat history.context: forknot statedDocs ↗
agentintermediateSubagent type for context: fork.agent: Explorenot statedDocs ↗
backgroundadvancedWith fork: false waits for the result instead of running in the background (default true).background: falsenot statedDocs ↗
hooksadvancedHooks registered when the skill is invoked and kept for the session.see Hooks 1.1not statedDocs ↗
pathsintermediateGlobs that limit automatic activation to matching files (comma string or list).paths: "src/**/*.ts"not statedDocs ↗
shelladvancedShell for ! blocks: bash (default) or powershell.shell: bashnot statedDocs ↗
metadataadvancedFree form map for your own tooling; ignored by Claude Code.metadata: {team: platform}not statedDocs ↗
license, compatibilityadvancedAgent Skills spec fields; accepted, not acted on (compatibility max 500 chars).license: MITnot statedDocs ↗
Unknown fieldsadvancedIgnored silently by Claude Code, but claude.ai uploads and the Skills API fail on anything outside name, description, license, compatibility, metadata, allowed-tools.Nonenot statedDocs ↗
Booleansadvancedyes/no/on/off/1/0 accepted besides true/false.Nonenot statedDocs ↗

3 Substitutions, dynamic context, control18

FeatureWhat it doesHowSinceDocs
$ARGUMENTSbeginnerAll arguments as typed; appended as ARGUMENTS: ... if the body has no placeholder.Fix $ARGUMENTSnot statedDocs ↗
$ARGUMENTS[N], $N, $nameintermediateIndexed (0 based) and named arguments; quote multi word values.$0, $1, $issuenot statedDocs ↗
Escape a literaladvancedBackslash before $1, $ARGUMENTS or a declared name.\$1.00not statedDocs ↗
${CLAUDE_SESSION_ID}, ${CLAUDE_EFFORT}intermediateSession id and current effort level.in the bodynot statedDocs ↗
${CLAUDE_SKILL_DIR}intermediateThe skill's own directory; also works inside allowed-tools Bash rules so a bundled script runs without a prompt.allowed-tools: Bash(${CLAUDE_SKILL_DIR}/scripts/x.sh *)not statedDocs ↗
${CLAUDE_PROJECT_DIR}, ${CLAUDE_PLUGIN_ROOT}, ${CLAUDE_PLUGIN_DATA}intermediateProject root; plugin root and data dir (plugin skills only).in the bodynot statedDocs ↗
Shell injectionintermediate !cmd runs a command before the prompt is sent and replaces the placeholder with its output; ! fences for multi-line. ! must start a line or follow whitespace. - Branch: !git branch --show-current not statedDocs ↗
Disable shell injectionadvancedReplace every injected command with a placeholder."disableSkillShellExecution": truev2.1.228Docs ↗
@ file referencesintermediate@path in a local skill body attaches the file (implied by the docs on synced skills). The syntax is not otherwise documented on the skills page.@docs/api.mdnot statedDocs ↗
ultrathinkintermediateInclude the word in a skill to request deeper reasoning for that run.in the bodynot statedDocs ↗
Permission rules for skillsintermediateAllow or deny by name; Skill(name) exact, Skill(name *) prefix; Skill alone denies all./permissionsnot statedDocs ↗
skillOverrides settingintermediateHide or collapse skills without editing them: on, name-only, user-invocable-only, off. Not applied to plugin skills."skillOverrides":{"deploy":"off"} or /skills + Spacenot statedDocs ↗
/skills menubeginnerList and filter skills, t sorts by token count, Space cycles visibility./skillsnot statedDocs ↗
/skill-doctorintermediateShows each skill's context cost and usage so you can drop unused ones; opens the /plugin Stats tab./skill-doctorv2.1.252Docs ↗
Disable all skillsadvancedTurn off every skill and command for a session; or disable only bundled ones.claude --disable-slash-commands; disableBundledSkills; CLAUDE_CODE_DISABLE_BUNDLED_SKILLS=1not statedDocs ↗
Eval a skilladvancedEvaluate and iterate with the skill creator skill.skill-creatornot statedDocs ↗
Verify/simplify before commitadvancedIf a skill named verify or simplify exists at personal, project or enterprise level, Claude runs it before each commit.create the skillv2.1.286Docs ↗
Skill vs subagent vs CLAUDE.mdbeginnerSkills are reusable content in your main context; subagents are isolated workers that return a summary; CLAUDE.md loads every session. They combine: subagent skills: preloads, skill context: fork runs isolated.Nonenot statedDocs ↗

4 Bundled skills (marked "Skill" in the commands reference)13

FeatureWhat it doesHowSinceDocs
/doctor (alias /checkup)beginnerSetup checkup: install health, extensions cost, CLAUDE.md duplication, permissions, usage advice. Asks before changing anything. prompt-audit audits instructions./doctor or /doctor prompt-audit [path]; terminal-only claude doctorusage check v2.1.305; prompt audit v2.1.283Docs ↗
/code-review (alias /review)beginnerReview the diff, a PR, branch or path for correctness bugs at a chosen effort; --fix applies findings, --comment posts inline PR comments./code-review high --fixnot statedDocs ↗
/batchintermediateSplit a large change into 5 to 30 independent units, plan, then run one background worktree isolated subagent per unit./batch migrate all callers of X to Ynot statedDocs ↗
/debugintermediateTurn on debug logging for the session and troubleshoot from the log./debug [description]not statedDocs ↗
/loopintermediateRe run a prompt on an interval; omit the interval to let Claude self pace./loop 5m check the deploynot statedDocs ↗
/claude-apiintermediateLoad Claude API and Managed Agents reference; subcommands migrate, upgrade, api-version, managed-agents-onboard, managed-agents-secure, prompt-audit, cost-optimize, build-eval, hillclimb, preserved-thinking-migration. Auto activates when code imports anthropic./claude-api migratesubcommand versions v2.1.236 to v2.1.307Docs ↗
/runintermediateLaunch and drive your app to see a change working./runnot statedDocs ↗
/verifyintermediateBuild and run the app to confirm a change works, not just tests. Records its own recipe in .claude/skills/verify/SKILL.md./verifynot statedDocs ↗
/run-skill-generatoradvancedWrites a per project skill (.claude/skills/run-<name>/) teaching /run and /verify how to launch your app./run-skill-generatornot statedDocs ↗
/simplifyintermediateFour parallel review agents (reuse, simplification, efficiency, altitude) then apply fixes. Quality only, not bugs./simplify [target]not statedDocs ↗
/deep-research (bundled workflow)intermediateFans out web searches, cross checks sources, votes on claims, returns a cited report. Needs WebSearch./deep-research <question>not statedDocs ↗
/workflow-authoring, /plugin-authoringadvancedReference skills for writing a Workflow script or a mod. Available only when workflows or built in plugins are enabled./plugin-authoringnot statedDocs ↗
Turn bundled skills offadvancedRemove bundled skills entirely (/doctor stays typable).disableBundledSkills settingnot statedDocs ↗

Custom slash commands13

FeatureWhat it doesHowSinceDocs
Project commandbeginnerMarkdown file whose body is the prompt; filename (no extension) is the command..claude/commands/review.md then /reviewnot statedDocs ↗
Personal commandbeginnerSame, available in every project.~/.claude/commands/review.mdnot statedDocs ↗
Namespacing by subfolderbeginnerSubdirectory path with / replaced by :..claude/commands/frontend/component.md gives /frontend:componentnot statedDocs ↗
Plugin commandsintermediatePlugin commands/ files are namespaced /plugin:command. The manifest can also define commands inline (source or content).commands/status.md; manifest commands.status.sourcenot statedDocs ↗
Command frontmatterintermediatedescription, argument-hint, arguments, allowed-tools, model, effort, disable-model-invocation, user-invocable, context, agent, hooks, shell, when_to_use, disallowed-tools, background, metadata, license, compatibility.YAML between ---not statedDocs ↗
Plugin command manifest fieldsadvancedInline command object keys: source, content, description, argumentHint, model, allowedTools.in plugin.jsonnot statedDocs ↗
$ARGUMENTS, $1, $NbeginnerArguments typed after the command; $ARGUMENTS is the whole string, $0/$1 positional./fix-issue 123 high with $1 = 123not statedDocs ↗
Bash execution with !intermediate !git status runs before the prompt is sent and inlines the output. Pre approve with allowed-tools: Bash(git status:*).see snippets/command_example.mdnot statedDocs ↗
File references with @beginnerTyping @file in a prompt attaches the file; adds CLAUDE.md from that directory. Within a command or skill body, local files attach the same way (see UNVERIFIED note in 3.3).@src/utils.jsnot statedDocs ↗
Official example commandbeginner.claude/commands/commit-push-pr.md in anthropics/claude-code: allowed-tools for git/gh, ! context lines, a numbered task. Repo also ships dedupe.md and triage-issue.md.read the filenot statedDocs ↗
Type /beginnerThe menu lists built in commands, skills, your commands and MCP prompts (/mcp__server__prompt)./not statedDocs ↗
Disable allintermediateTurn off every skill and custom command for one session.claude --disable-slash-commandsnot statedDocs ↗
Output styles (related)beginnerPersistent role and tone for a whole session; markdown files with name, description, keep-coding-instructions, force-for-plugin; built ins Default, Proactive, Concise, Explanatory, Learning./output-style concise; files in ~/.claude/output-styles/ or .claude/output-styles/; outputStyle setting`/output-style` v2.1.269Docs ↗

Subagents and agent teams

2 Subagent frontmatter, every field21

FeatureWhat it doesHowSinceDocs
name (required)beginnerUnique id up to 256 chars; no : (reserved for plugin scoping); becomes agent_type in hooks.name: code-reviewernot statedDocs ↗
description (required)beginnerWhen Claude should delegate. Add "use proactively" to encourage auto delegation. Combined descriptions over 15,000 tokens trigger a warning.description: Reviews code ...not statedDocs ↗
toolsbeginnerAllowlist; comma string or YAML list. Omitted = inherit all.tools: Read, Grep, Bashnot statedDocs ↗
disallowedToolsintermediateDenylist removed from the inherited or listed tools. Bash(git push *) still removes all of Bash.disallowedTools: Write, Editnot statedDocs ↗
modelbeginnersonnet, opus, haiku, fable, full model ID or inherit.model: haikunot statedDocs ↗
permissionModeintermediatedefault (alias manual), acceptEdits, auto, dontAsk, bypassPermissions, plan. The parent's mode can override it.permissionMode: plan`bypassPermissions` rule v2.1.267Docs ↗
maxTurnsintermediateTurn cap; output is marked partial and can be resumed.maxTurns: 20partial marking v2.1.246Docs ↗
autoCompactWindowadvancedLower the auto compact window to 100000 to 1000000 tokens.autoCompactWindow: 200000v2.1.296Docs ↗
skillsintermediatePreload full skill content at startup.skills: [api-conventions]not statedDocs ↗
mcpServersadvancedServer names or inline definitions scoped to this agent.mcpServers: [slack]not statedDocs ↗
hooksadvancedHooks that run only while this agent runs.see Hooks 1.1not statedDocs ↗
memoryintermediatePersistent cross session memory: user (~/.claude/agent-memory/<name>/), project (.claude/agent-memory/<name>/), local (.claude/agent-memory-local/<name>/). First 200 lines or 25 KB of MEMORY.md loads. Needs auto memory on.memory: projectnot statedDocs ↗
backgroundintermediatetrue keeps it in the background even when Claude asks to wait.background: truenot statedDocs ↗
omitClaudeMdadvancedStart without user/project/local CLAUDE.md.omitClaudeMd: truenot statedDocs ↗
effortintermediatelow to max; CLAUDE_CODE_EFFORT_LEVEL takes precedence.effort: highnot statedDocs ↗
isolationintermediateworktree gives the agent its own temporary git worktree, cleaned up automatically.isolation: worktreenot statedDocs ↗
colorbeginnerDisplay colour: red, blue, green, yellow, purple, orange, pink, cyan.color: bluenot statedDocs ↗
initialPromptadvancedAuto submitted first user turn when the agent runs as the main session agent.initialPrompt: "List migrations first"not statedDocs ↗
experimental.cacheTtladvancedChoose 5m or 1h prompt cache lifetime for this agent.experimental: {cacheTtl: 1h}not statedDocs ↗
Model orderintermediateResolved as: per invocation model parameter, then frontmatter model (inherit = parent), then CLAUDE_CODE_SUBAGENT_MODEL, then the main conversation's model. A user agent named Explore with model: haiku makes exploration cheap.see "Choose a model"order changed v2.1.251Docs ↗
Unknown fieldsintermediateIgnored silently; find typos with claude --debug and search the log for does not recognize or apply.Nonenot statedDocs ↗

3 Invoking and running subagents18

FeatureWhat it doesHowSinceDocs
Automatic delegationbeginnerClaude delegates based on your request, agent descriptions and context.write good descriptionsnot statedDocs ↗
Natural languagebeginnerName the agent in your prompt.Use the test-runner subagent to fix failing testsnot statedDocs ↗
@ mentionbeginnerGuarantees that specific subagent runs for one task. Plugin agents show scoped names.@"code-reviewer (agent)" look at auth or @agent-<name>not statedDocs ↗
Session wide agentintermediateRun the whole session as that agent (its prompt replaces the default system prompt). Persists on resume.claude --agent code-reviewer; setting "agent": "code-reviewer"not statedDocs ↗
Foreground vs backgroundintermediateSubagents Claude spawns start in the background by default; permission prompts surface in your session. Turn fork mode off (CLAUDE_CODE_FORK_SUBAGENT=0) to let Claude wait.Ctrl+B, settingsnot statedDocs ↗
Parallel researchbeginnerAsk for several agents at once so each explores a different area."Research A, B and C in parallel with separate subagents"not statedDocs ↗
Chain subagentsintermediateFeed one agent's output into the next.prompt patternnot statedDocs ↗
Nested subagentsadvancedSubagents can spawn their own, 3 layers deep by default.CLAUDE_CODE_MAX_SUBAGENT_SPAWN_DEPTH (1 turns it off)not statedDocs ↗
Concurrent limitadvancedDefault cap of 20 running subagents ("Concurrent subagent limit reached").CLAUDE_CODE_MAX_CONCURRENT_SUBAGENTSnot statedDocs ↗
Fork the conversationintermediateA subagent that inherits the whole conversation instead of starting fresh./subtask <task> (in-session fork); /fork copies the session to a background sessionnot statedDocs ↗
Resume a subagentadvancedContinue a finished subagent with its context; message by name after a restart.ask Claude to continue itnot statedDocs ↗
Subagent auto compactionadvancedPer agent compaction window via autoCompactWindow.frontmatterv2.1.296Docs ↗
Restrict spawnable agentsadvancedFor an agent running as the main thread (claude --agent), allowlist which subagent types it may spawn with Agent(type) in tools. Plain Agent allows all. The old Task(...) name still works (renamed in v2.1.63).tools: Agent(worker, researcher), Read, Bashv2.1.63 (rename)Docs ↗
Disable one agentadvancedDeny a specific agent type.permissions.deny: ["Agent(Explore)"] or claude --disallowedTools "Agent(Explore)"not statedDocs ↗
Project hooks for subagent eventsadvancedSubagentStart and SubagentStop in settings fire for every subagent.settings.jsonnot statedDocs ↗
Subagents vs main conversationbeginnerUse subagents for verbose output, tool restrictions, self contained work. Use /btw for a question about the current chat (no tools, not saved to history).Nonenot statedDocs ↗
Subagent output scanningadvancedClaude Code scans each subagent's final report for text imitating its own output (such as <system-reminder>); it inserts a backslash and may prepend a [harness: ...] marker line. It removes nothing and is not a substitute for permissions or sandboxing.automaticnot statedDocs ↗
Official example agentsbeginnerCode reviewer, debugger, data scientist, database query validator.copy from docsnot statedDocs ↗

4 Agent teams and other parallel tools9

FeatureWhat it doesHowSinceDocs
Agent teams (experimental)advancedA lead session plus teammates, each its own Claude Code session, with a shared task list and direct messaging. Disabled by default. One team per session, no nested teams, no /resume of in process teammates.CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1 (env or settings env)not statedDocs ↗
Teammate displayadvancedIn process (default; arrows select, Enter opens) or split panes (tmux or iTerm2 with it2; not VS Code terminal, Windows Terminal, Ghostty)."teammateMode": "auto" or claude --teammate-mode auto (flag hidden from --help)not statedDocs ↗
Quality gates for teamsadvancedTeammateIdle, TaskCreated, TaskCompleted hooks.see Hooks 1.6not statedDocs ↗
Agent view and background sessionsintermediateDispatch and watch many background sessions in one screen (research preview).claude agents, claude --bg, /backgroundnot statedDocs ↗
Dynamic workflowsadvancedA script that runs many subagents and cross checks results; run bundled /deep-research, save your own, ship in plugins (workflows/*.js)./workflows to watch; ask Claude for a workflownot statedDocs ↗
WorktreesintermediateGive each session a separate git checkout.claude --worktree [name] (-w)not statedDocs ↗
Cross session messagingadvancedClaude can list and message your other sessions on this or another machine.docsnot statedDocs ↗
/goalintermediateSet a completion condition; Claude keeps working turn after turn until a model judges it met./goal all tests pass / /goal clearnot statedDocs ↗
Compare all five ways to parallelisebeginnerSubagents, agent view, agent teams, projects, dynamic workflows.read the tablenot statedDocs ↗

Plugins and marketplaces

JSON
{
  "name": "deploy-tools",
  "displayName": "Deploy Tools",
  "version": "1.2.0",
  "description": "Deployment commands, a review agent, and a status monitor",
  "author": {
    "name": "Example Team",
    "email": "dev@example.com",
    "url": "https://example.com"
  },
  "homepage": "https://example.com/docs/deploy-tools",
  "repository": "https://github.com/example/deploy-tools",
  "license": "MIT",
  "keywords": ["deployment", "ci"],
  "defaultEnabled": true,
  "skills": ["./extra-skills/"],
  "commands": {
    "status": {
      "source": "./commands/status.md",
      "description": "Show the current deployment status"
    },
    "about": {
      "content": "Explain what the deploy-tools plugin provides.",
      "description": "Describe this plugin"
    }
  },
  "agents": ["./agents/reviewer.md"],
  "hooks": "./config/extra-hooks.json",
  "mcpServers": {
    "deploy-api": {
      "command": "node",
      "args": ["${CLAUDE_PLUGIN_ROOT}/server.js"]
    }
  },
  "lspServers": "./.lsp.json",
  "outputStyles": "./styles/",
  "userConfig": {
    "api_token": {
      "type": "string",
      "title": "API token",
      "description": "Token for the deployment API",
      "sensitive": true
    }
  }
}

1 Installing and managing (`/plugin` and `claude plugin`)15

FeatureWhat it doesHowSinceDocs
/plugin panelbeginnerOpens the Discover tab; other tabs for Installed, Marketplaces, Stats. Aliases /plugins, /marketplace. Interactive sessions only./pluginnot statedDocs ↗
Install in a sessionbeginnerOpens the plugin's details so you review components, context cost and pick a scope./plugin install commit-commands@claude-plugins-officialnot statedDocs ↗
Install scopesintermediateUser (~/.claude/settings.json), project (.claude/settings.json, committed; teammates still run claude plugin install), local (.claude/settings.local.json). Local beats project beats user.choose in the panel or --scope user|project|localnot statedDocs ↗
claude plugin installintermediateInstall from the shell; default scope user; loads next start or after /reload-plugins. Flags include --config key=value, --json, --marketplace <source>, --accept-command <sha256>.claude plugin install formatter@your-org --scope project`--marketplace` in session v2.1.275, shell v2.1.292Docs ↗
claude plugin uninstall / enable / disable / updateintermediateManage installed plugins; enable/disable act on the most specific scope that lists the plugin; update needs a restart.claude plugin disable name@mktnot statedDocs ↗
claude plugin list / detailsintermediateList installed (--json, --available); details <name> shows component inventory and projected token cost.claude plugin details namenot statedDocs ↗
claude plugin configureadvancedShow a plugin's userConfig options or save values from stdin with --values-stdin. In session: /plugin configure <plugin>.claude plugin configure namenot statedDocs ↗
claude plugin pruneadvancedRemove auto installed dependencies no longer needed.claude plugin prunenot statedDocs ↗
/reload-pluginsbeginnerApply plugin changes without restart; reports counts and load errors; --force./reload-pluginsnot statedDocs ↗
Load for one sessionintermediateTest a plugin without installing from a directory, zip or URL. Repeatable.claude --plugin-dir ./my-plugin; claude --plugin-url "https://x/a.zip"; CLAUDE_CODE_PLUGIN_DIRS`CLAUDE_CODE_PLUGIN_DIRS` v2.1.280Docs ↗
Auto updateintermediateOn by default for official marketplaces, off for others; toggle per marketplace in /plugin > Marketplaces; refresh now with claude plugin update.settings autoUpdatenot statedDocs ↗
Plugin dependenciesadvanceddependencies array in the manifest or marketplace entry; cross marketplace deps need allowCrossMarketplaceDependenciesOn."dependencies": ["secrets-vault"]not statedDocs ↗
Plugins from claude.aiintermediatePlugins on your claude.ai account sync to Claude Code./pluginnot statedDocs ↗
enabledPlugins settingintermediateTurn plugins on or off per scope, keyed name@marketplace. A plugin set false in managed settings is blocked everywhere."enabledPlugins":{"x@team":true}not statedDocs ↗
Reading before installingbeginnerPlugins can run hooks and MCP servers. Read the details pane and the security page.Nonenot statedDocs ↗

2 Marketplaces14

FeatureWhat it doesHowSinceDocs
Add a marketplacebeginnerA catalog defined by .claude-plugin/marketplace.json. Sources: GitHub owner/repo[#ref], any git URL, local path, hosted JSON URL. --scope user|project|local, --sparse./plugin marketplace add owner/repo or claude plugin marketplace add owner/reponot statedDocs ↗
Other marketplace commandsintermediatelist, update [name], remove (alias rm); session alias /plugin market .... Removing a marketplace uninstalls its plugins and deletes their data.claude plugin marketplace listnot statedDocs ↗
Official marketplacebeginnerclaude-plugins-official from anthropics/claude-plugins-official; registered automatically on first interactive start (blockable by managed policy or CLAUDE_CODE_DISABLE_OFFICIAL_MARKETPLACE_AUTOINSTALL)./plugin install <name>@claude-plugins-officialnot statedDocs ↗
Community marketplaceintermediateThird party plugins authors submitted to Anthropic; name claude-community./plugin marketplace add anthropics/claude-plugins-communitynot statedDocs ↗
Demo marketplacebeginnerclaude-code-plugins from anthropics/claude-code: example plugins (agent sdk dev, code-review, commit commands, explanatory output style, feature dev, frontend design, hookify, learning output style, plugin dev, pr review toolkit, ralph-loop, security-guidance). Plugin code actually lives in claude plugins official./plugin marketplace add anthropics/claude-codenot statedDocs ↗
Team marketplacesintermediatePre register a marketplace for everyone who opens a repo, or org wide via managed settings. Needs folder trust.extraKnownMarketplaces (alias additionalMarketplaces) with source github, git, url, file, directorynot statedDocs ↗
Restrict marketplacesadvancedAllowlist or blocklist sources users may add.strictKnownMarketplaces (managed)not statedDocs ↗
marketplace.json top levelintermediatename (required, no reserved words), owner (name required, email, url), plugins (required), description, version, forceRemoveDeletedPlugins, allowCrossMarketplaceDependenciesOn, renames..claude-plugin/marketplace.jsonnot statedDocs ↗
Marketplace plugin entryintermediatename, source, description, version, category, tags, strict (default true), relevance, dependencies, defaultEnabled, displayName, metadata, headers, headersHelper.in plugins[]`metadata` v2.1.222, `headersHelper` v2.1.238Docs ↗
Plugin source typesadvancedRelative path string, github (repo, ref, sha), url, git-subdir (url, path, ref), npm (package, version, registry), archive (url, sha256), command (runs a command that prints a directory)."source":{"source":"github","repo":"o/r"}archive v2.1.224, command v2.1.229Docs ↗
Reserved marketplace namesadvancedOfficial looking names such as claude-plugins-official, anthropic-marketplace, agent-skills, and anything starting claudeai- cannot be used.Nonenot statedDocs ↗
Create and hostadvancedGuides for building a marketplace repo, hosting it (including private, archive downloads) and publishing to Anthropic's directory.docsnot statedDocs ↗
Recommend pluginsadvancedrelevance signals tell Claude Code when to suggest a plugin to your org.marketplace entrynot statedDocs ↗
Org rolloutadvancedAllow the official marketplace plus your own, pre seed plugins in containers (CLAUDE_CODE_PLUGIN_SEED_DIR), measure usage.managed settingsnot statedDocs ↗

3 Authoring: manifest, components, CLI30

FeatureWhat it doesHowSinceDocs
ScaffoldbeginnerCreate a plugin at ~/.claude/skills/<name>/ that auto loads as <name>@skills-dir.claude plugin init my-pluginnot statedDocs ↗
plugin.json locationbeginner.claude-plugin/plugin.json; optional (components in default folders load without it). Only name is required; everything else sits at the plugin root, not inside .claude-plugin/.see snippets/plugin_manifest.jsonnot statedDocs ↗
Identity fieldsbeginnername (kebab case, no spaces, @, :), displayName, version (pins users until you change it), description, author {name,email,url}, homepage, repository, license, keywords, $schema.JSON keysnot statedDocs ↗
Directory listing fieldsadvancedicon, documentationUrl, supportUrl, privacyPolicyUrl, termsOfServiceUrl are for Anthropic's directory; Claude Code does not read them.JSON keysnot statedDocs ↗
Behaviour fieldsadvanceddefaultEnabled (start off or on), dependencies, settings (only agent and subagentStatusLine take effect), userConfig, channels, metadata, types.JSON keysnot statedDocs ↗
Component path keysintermediateskills, commands, agents, hooks, mcpServers, lspServers, outputStyles, workflows, experimental.{themes,monitors,evals}. Paths start with ./. commands/agents/outputStyles replace the default scan; skills/hooks/mcpServers/lspServers add to it.JSON keysnot statedDocs ↗
Standard layoutbeginnerskills/, commands/, agents/, hooks/hooks.json, .mcp.json, .lsp.json, output-styles/, workflows/, themes/, monitors/monitors.json, bin/, settings.json. A root CLAUDE.md is NOT loaded.folder treenot statedDocs ↗
Bundle: skills and commandsbeginnerPlugin skills are /plugin:skill; prefer skills/ over commands/ for new work.skills/<name>/SKILL.mdnot statedDocs ↗
Bundle: agentsintermediateSupported fields: name, description, model, effort, maxTurns, autoCompactWindow, tools, disallowedTools, skills, memory, background, omitClaudeMd, isolation, color, experimental.cacheTtl.agents/*.mdnot statedDocs ↗
Bundle: hooksintermediatehooks/hooks.json fires from plugin load, not only when its skills run.see snippets/plugin_hooks.jsonnot statedDocs ↗
Bundle: MCP serversintermediate.mcp.json or inline mcpServers; also .mcpb/.dxt bundles; tools get scoped names.${CLAUDE_PLUGIN_ROOT} in pathsnot statedDocs ↗
Bundle: LSP serversadvancedGive Claude diagnostics and code navigation for a language. Required command, extensionToLanguage; optional args, transport, env, initializationOptions, settings, workspaceFolder, startupTimeout, shutdownTimeout, requestTimeout, restartOnCrash, maxRestarts, diagnostics..lsp.json (see snippets/plugin_lsp.json)`requestTimeout` v2.1.288Docs ↗
Official code intelligence pluginsbeginnerPrebuilt language server plugins; install instead of writing your own./pluginnot statedDocs ↗
Bundle: output stylesintermediateMarkdown style files; force-for-plugin: true applies automatically when enabled.output-styles/*.mdnot statedDocs ↗
Bundle: executablesadvancedFiles in bin/ join the Bash tool's PATH while enabled (after user PATH entries). claude.ai and Cowork do not install plugins with bin/.bin/hello-pluginnot statedDocs ↗
Bundle: default settingsadvancedRoot settings.json with agent and subagentStatusLine only.{"agent":"security-reviewer"}not statedDocs ↗
Bundle: themes, monitors, channelsadvancedTheme JSON; background monitor commands (name, command, description, when); message channels bound to an MCP server. Themes and monitors live under experimental.manifestnot statedDocs ↗
Bundle: workflowsadvancedReusable workflow .js files in workflows/.plugin dirnot statedDocs ↗
userConfigadvancedPrompt the user for values on enable; field type string/number/boolean/directory/file, title, description, required, default, options, multiple, sensitive. Reference as ${user_config.KEY} (exec form) or $CLAUDE_PLUGIN_OPTION_KEY.manifest userConfig`options` v2.1.271Docs ↗
Path variablesintermediate${CLAUDE_PLUGIN_ROOT}, ${CLAUDE_PLUGIN_DATA} (persistent), ${CLAUDE_PROJECT_DIR}.in hooks, skills, MCP confignot statedDocs ↗
claude plugin validateintermediateValidate a plugin, marketplace manifest or a directory of skills/agents/commands; --strict fails on warnings; --json. Verified locally: the snippet manifest, marketplace, agents dir and skills dir all passed.claude plugin validate ./my-plugin --strictnot statedDocs ↗
claude plugin tagintermediateCreate {name}--v{version} git tag after checking plugin.json and the marketplace entry agree; in session /plugin tag [path] [--push] [--dry-run] [--force].claude plugin tag ./my-pluginnot statedDocs ↗
claude plugin eval / eval initadvancedRun eval suites (prompts + graders) against a plugin and score them, with a no plugin baseline arm. Runs as you; evaluate only trusted plugins.claude plugin eval ./my-pluginnot statedDocs ↗
claude plugin testadvancedRun a mod's tests.claude plugin test [dir]not statedDocs ↗
Convert .claude/ setupbeginnerStep by step guide to turn existing .claude/ files into a plugin.docsnot statedDocs ↗
PublishintermediateShare via your own marketplace repo or submit to Anthropic's directory; measure adoption.docsnot statedDocs ↗
ModsadvancedA mod is a plugin whose behaviour lives in a JavaScript hooks module (register(on, options)) that can draw in the interface. Four ship built in (sec-default, diff, telemetry, agents-md) with source in anthropics/claude-code/mods. Only the overview was read, details UNVERIFIED./plugin-authoring; claude plugin testnot statedDocs ↗
Plugin troubleshootingintermediateMarketplace not found, git clone timeout (CLAUDE_CODE_PLUGIN_GIT_TIMEOUT_MS), offline marketplaces (CLAUDE_CODE_PLUGIN_KEEP_MARKETPLACE_ON_FAILURE), HTTPS clone (CLAUDE_CODE_PLUGIN_PREFER_HTTPS).env varsnot statedDocs ↗
Plugin env varsadvancedCLAUDE_CODE_PLUGIN_CACHE_DIR (root dir, default ~/.claude/plugins), CLAUDE_CODE_PLUGIN_SEED_DIR, CLAUDE_CODE_PLUGIN_DIRS, CLAUDE_CODE_PLUGIN_DIR_WATCH.env varsPLUGIN_DIR_WATCH v2.1.287Docs ↗
Admin lockadvanceddisableSideloadFlags rejects --plugin-dir, --plugin-url and CLAUDE_CODE_PLUGIN_DIRS; disableCommandPluginSources blocks command plugin sources.managed settingscommand sources v2.1.229Docs ↗

The Agent SDK

The Agent SDK runs the same agent loop as a library, in Python and TypeScript. I keep a separate cheat sheet for it.

Agent SDK and headless (pointer only)5

FeatureWhat it doesHowSinceDocs
Agent SDKadvancedThe Claude Code agent loop, built in tools, permissions, sessions, hooks, MCP, skills and plugins as a library for Python and TypeScript. Another sheet covers it in depth.pip install claude-agent-sdk or npm install @anthropic-ai/claude-agent-sdk (from the Agent SDK quickstart)not statedDocs ↗
Headless CLIbeginnerRun Claude Code non interactively from scripts and CI with -p; add --output-format json or stream-json. Other languages can drive it as a subprocess.claude -p "Find and fix the bug in auth.py" --allowedTools "Read,Edit,Bash"not statedDocs ↗
Bare modeintermediateSkip auto discovery of hooks, skills, commands, subagents, plugins, MCP, memory and CLAUDE.md for fast scripted runs.claude --bare -p "..."not statedDocs ↗
Safe modeintermediateStart with every customization disabled to debug a broken config.claude --safe-modenot statedDocs ↗
Related SDK pagesadvancedHooks, subagents, skills, plugins, MCP and permissions each have an SDK page.docsnot statedDocs ↗

Topic 5 of 7

Where it runs

Editors, desktop, web, CI and automation.

Editors: VS Code, JetBrains and others

VS Code extension (also Cursor and other VS Code forks)63

FeatureWhat it doesHowSinceDocs
Install the extensionbeginnerAdds a graphical Claude Code panel to VS Code (needs VS Code 1.94.0 or later and a paid Claude plan or Console account)Cmd/Ctrl+Shift+X, search "Claude Code", Install; or open vscode:extension/anthropic.claude-code. Extension version equals the Claude Code version it bundlesnot statedDocs ↗
Install in Cursor and VS Code forksbeginnerSame extension in Cursor, Devin Desktop, KiroCursor: cursor:extension/anthropic.claude-code. Forks: search the Extensions view or use the Open VSX registrynot statedDocs ↗
Editors that cannot install the extensionbeginnerRun the CLI in any editor's integrated terminalInstall the CLI, run claude in the terminalnot statedDocs ↗
Windsurf as an extension targetbeginnerWindsurf is not named on the VS Code page; the changelog says Windsurf was renamed Devin DesktopSee Devin Desktop row aboveUNVERIFIED for the extension; rename is in the changelog onlyDocs ↗
Open the Claude panelbeginnerSpark icon in editor toolbar (file must be open), Activity Bar sessions list, Command Palette "Claude Code: Open in New Tab", status bar "Claude Code"Click the Spark icon, or Cmd/Ctrl+Shift+P then type "Claude Code"not statedDocs ↗
Sign in and onboarding checklistbeginnerBrowser sign in, then a "Learn Claude Code" checklistClick Sign in; reopen checklist by unchecking Hide Onboarding in Extensions > Claude Codenot statedDocs ↗
WalkthroughbeginnerGuided tour of the basicsCommand Palette: "Claude Code: Open Walkthrough"not statedDocs ↗
Automatic selection and open file contextbeginnerClaude sees your highlighted lines and the active file; footer shows the line countSelect text in the editornot statedDocs ↗
Insert @-mention with line rangebeginnerAdds @file.ts#5-10 to the promptOption+K (Mac) / Alt+K (Win/Linux) with editor focusednot statedDocs ↗
Turn off selection or open file sharingintermediateStops selection or active file going into messagesSettings claudeCode.attachSelection (v2.1.300) and claudeCode.attachOpenFile (v2.1.271); also applies to claude in the integrated terminalv2.1.300 and v2.1.271Docs ↗
Selection withheld from excluded filesadvancedFiles matching files.exclude, search.exclude or git ignored send only a path; Read deny rules protect the terminal pathSetting respectGitIgnore (default true)not statedDocs ↗
@-mention files and foldersbeginnerFuzzy file or folder referencesType @auth, or @src/components/ with trailing slashnot statedDocs ↗
@-mention terminal outputintermediateGives Claude the output of a named terminal@terminal:namenot statedDocs ↗
Read specific PDF pagesintermediateAsk for page 1, pages 1-10 or page 3 onwardNeeds poppler-utils on the machine running Claude Codenot statedDocs ↗
Attach images and filesbeginnerPaste images; Shift+drag files into the prompt boxClipboard paste; hold Shift while draggingnot statedDocs ↗
Inline diff reviewbeginnerSide by side original vs proposed edit with accept, reject or "tell Claude what to do instead"; your edits in the diff are reported to ClaudeHappens in Manual mode before each editnot statedDocs ↗
Per change accept and rejectintermediateReview one change at a time (not for diffs over 100 changes)Buttons under each change; Command Palette "Claude Code: Accept Change at Cursor" / "Reject Change at Cursor"v2.1.275Docs ↗
Permission mode switcherbeginnerAuto, Manual, Plan, Edit automatically from the prompt boxClick the mode indicator; Auto is the built-in start mode from v2.1.283v2.1.283 (Auto default)Docs ↗
Plan mode with commentsintermediateOpens the plan as a Markdown document where you add inline comments before Claude startsChoose Plan, or type /plan, /plan fix the auth bug, /plan open`/plan` v2.1.280Docs ↗
Model and effort pickerbeginnerSwitch model mid session; Effort row saves a default per model (except max)Click the model name; /model alone opens the pickername button and Effort row v2.1.257; `/model` picker v2.1.284Docs ↗
Ultracode switchadvancedPlans a dynamic workflow for each substantive taskSwitch under the Effort row when workflows are enabled and the model supports itv2.1.284Docs ↗
Command menubeginnerAttach files, switch model, toggle extended thinking, Customize section (MCP, hooks, memory, instructions, permissions, plugins)Click / or type /not statedDocs ↗
Slash commands dialog and /skillsintermediateFilterable list of commands; skill rows show visibility (On, Name only) you can changeCustomize > Slash commands; type /skillsdialog v2.1.257; `/skills` v2.1.280Docs ↗
Output styles pickerintermediatePick a built in or custom output style; "Build a custom style" writes the file for youCustomize > Output stylesv2.1.257, builder v2.1.261Docs ↗
Hooks and Permissions viewersintermediateSee hooks and permission rules by event or Allow/Ask/Deny; edit user, project and local entriesCustomize > Hooks, Customize > Permissionsv2.1.269Docs ↗
Memory and Instructions editorsintermediateTurn auto memory on or off, browse, edit or delete saved memories; open CLAUDE.md filesCustomize > Memory, Customize > Instructionsv2.1.274 (view/edit/delete memory v2.1.275)Docs ↗
/status, /sandbox, /chrome, /export in the panelintermediateVersion/account/MCP status; sandbox mode toggle and excluded commands; Chrome connection; export conversationCustomize section or type the commandv2.1.280Docs ↗
Enable Remote Control for all sessionsintermediateToggle that sets remoteControlAtStartup, applies to sessions already openCommand menu, Settings sectionv2.1.203 (all windows v2.1.261)Docs ↗
Focus viewbeginnerHides tool calls, results and thinking behind expandable rowsCtrl+Option+F (Mac) / Ctrl+Alt+F; Command Palette "Claude Code: Toggle Focus view"; setting focusViewv2.1.221Docs ↗
Sign outbeginnerSign out of the Anthropic accountSettings section or /logout (not shown on third-party providers)v2.1.277Docs ↗
Report a problembeginnerSends a bug report (or saves a local archive under ~/.claude/feedback-bundles/ on third party providers)"Report a problem", /bug or /feedbackv2.1.229; local archive v2.1.284Docs ↗
Side questions with /btwintermediateAsk about the session without adding to it; answer opens in a side panel; thread survives reloadsType /btw your questionv2.1.227Docs ↗
Copy response and BookmarksbeginnerCopy a response; bookmark responses and review themHover buttons, /copy, /copy 2, /bookmarks`/copy` v2.1.277; bookmarks v2.1.286Docs ↗
Files Claude sends youintermediate"Sent report.md" rows you can click to open (Remote Control sessions)Click the file namev2.1.295Docs ↗
Context indicator and prompt cache clockintermediateShows context use and minutes left on the prompt cache; red when expiredPrompt box footernot statedDocs ↗
Agent mapintermediateTree of subagents with status, time, tokens; open transcripts, stop agents; also lists background tasksClick the "N agents" count, or type /tasksmap v2.1.269; `/tasks` v2.1.277Docs ↗
Extended thinking toggle and Ctrl+OintermediateToggle thinking via / menu; Ctrl+O expands or collapses all thinking blocksCommand menu; Ctrl+Onot statedDocs ↗
Multi line inputbeginnerNew line without sendingShift+Enternot statedDocs ↗
LaTeX math renderingbeginnerTypesets $$...$$, \[...\], $...$, \(...\) and fenced math blocksAutomatic in the chat panel (not terminal mode)v2.1.301Docs ↗
Session history and resumebeginnerSearch or browse past conversations; plan mode is restored on resumeSession history button; titles are AI generated; rename or archive on hoverplan restore v2.1.246Docs ↗
Auto archive inactive sessionsintermediateMoves sessions idle for 14 days (default) to ArchivedSetting claudeCode.archiveInactiveSessions (1, 2, 7, 14, 0 to turn off)v2.1.265Docs ↗
Resume cloud sessions in VS CodeintermediatePull a claude.ai session into the editor; Remote Control sessions also listedSession history > Web tab (needs claude.ai sign-in)not statedDocs ↗
Account and usage dialogintermediatePlan usage bars, attribution by skill/subagent/plugin/MCP, Recommendations and a Fix button/usage; Day/Week togglefix button v2.1.305; session totals v2.1.277Docs ↗
Checkpoints and rewindintermediateFork conversation, rewind code, or both from any messageHover a message, click rewindnot statedDocs ↗
Move the panelbeginnerDock in secondary sidebar, primary sidebar, or editor areaDrag the panel tab; lockEditorGroups settinglock setting v2.1.274Docs ↗
Multiple conversationsbeginnerParallel tabs or windows; blue dot = permission pending, orange = finished while hiddenCommand Palette "Open in New Tab" / "Open in New Window"not statedDocs ↗
Session groups and filtersintermediateNamed collapsible groups; Active toggle and status filter in the Activity BarRight-click a session; funnel icongroups v2.1.229; filters v2.1.271; group from tab v2.1.257Docs ↗
Continue after reloadintermediateClaude continues an interrupted step after a window reloadSetting continueAfterReload (default true)v2.1.274Docs ↗
Terminal modeintermediateCLI style interface instead of the chat panelSetting claudeCode.useTerminal; Command Palette "Open in Terminal"not statedDocs ↗
Manage plugins in the panelintermediateInstall, uninstall, manage marketplaces; share a plugin install linkManage plugins dialog; handler vscode://anthropic.claude-code/install-pluginnot statedDocs ↗
Chrome from VS Codeintermediate@browser drives your Chrome (needs extension 1.0.36+); "Enabled by default" auto connects each session@browser go to localhost:3000 and check the consoleauto connect v2.1.287Docs ↗
Run in backgroundintermediateMoves a long command or subagent to a background task after ~2 sClick "Run in background" under the tool callv2.1.287Docs ↗
Keyboard shortcutsbeginnerFocus toggle Cmd/Ctrl+Esc; new tab Cmd/Ctrl+Shift+Esc; new conversation Cmd/Ctrl+N (needs enableNewConversationShortcut); reopen closed tab Cmd/Ctrl+Shift+T; insert @-mention Option/Alt+KCommand Palette lists all "Claude Code" commands; also Show Logs, Rename Session Tab, Mark Session as Unreadrename/group/unread v2.1.257Docs ↗
URI handleradvancedOpen a tab from scripts, bookmarklets or aliases, with prompt (prefilled, not sent) and sessionopen "vscode://anthropic.claude-code/open?prompt=review%20my%20changes"not statedDocs ↗
Extension settingsintermediateuseTerminal, initialPermissionMode, preferredLocation, autosave, useCtrlEnterToSend, showMessageTimestamps, spinnerVerbs, usePythonEnvironment, environmentVariables, disableLoginPrompt, allowDangerouslySkipPermissions, claudeProcessWrapper and moreSettings > Extensions > Claude Codeper settingDocs ↗
Settings JSON schemaintermediateAutocomplete and validation for settings.jsonAdd "$schema": "https://json.schemastore.org/claude-code-settings.json"not statedDocs ↗
Third party providers in VS CodeadvancedUse Bedrock, Agent Platform or Foundry; no plan usage bars, voice dictation or Web tabEnable "Disable Login Prompt", configure provider in ~/.claude/settings.jsonnot statedDocs ↗
Screen reader supportintermediateAnnounces conversation activity; "Focus last message" commandAutomaticfocus command v2.1.268Docs ↗
Extension vs CLIintermediateCLI only: ! Bash shortcut, tab completion, full command set; extension has checkpoints and MCP dialogRun claude in the integrated terminal (needs standalone CLI install)not statedDocs ↗
Share history with CLIbeginnerExtension and CLI share one historyclaude --resume in a terminalnot statedDocs ↗
MCP dialogintermediateAdd, remove (local/user/project), enable/disable, reconnect, OAuthType /mcp in the panel; or claude mcp add in the terminaladd/remove v2.1.261Docs ↗
Built in IDE MCP serveradvancedLocal ide server (loopback only, random port, auth token in ~/.claude/ide/<port>.lock) exposes mcp__ide__getDiagnostics and mcp__ide__executeCode (Jupyter, always asks via Quick Pick); chat panel uses mcp__claude-vscode__getDiagnosticsAutomatic; deny with permissions.deny rules naming both toolsclaude vscode server v2.1.285Docs ↗
Fix common issuesbeginnerExtension won't install, Spark icon missing, Cmd+Esc does nothing, Ctrl+J newline, blank panel, TLS proxySee headingsnot statedDocs ↗

JetBrains plugin (IntelliJ IDEA, PyCharm, Android Studio, WebStorm, PhpStorm, GoLand)14

FeatureWhat it doesHowSinceDocs
InstallbeginnerPlugin runs claude in the IDE terminal and connects; it does not bundle the CLIInstall the CLI, then the "Claude Code [Beta]" plugin from JetBrains Marketplace (plugin 27310); restart the IDEnot statedDocs ↗
Quick launchbeginnerOpens Claude Code from the editorCmd+Esc (Mac) / Ctrl+Esc, or the Claude Code buttonnot statedDocs ↗
IDE diff viewerbeginnerShows changes in the IDE diff, not the terminal/config > Diff tool: auto or terminal (shows only when connected)not statedDocs ↗
Selection and tab contextbeginnerCurrent selection or tab shared automatically; Read deny rules block it per fileAutomaticnot statedDocs ↗
File reference shortcutbeginnerInserts @src/auth.ts#L1-99Cmd+Option+K (Mac) / Alt+Ctrl+Knot statedDocs ↗
Diagnostic sharingintermediateClaude reads IDE inspection errors by calling getDiagnostics (not requested automatically after edits)Automaticnot statedDocs ↗
/ide from an external terminalbeginnerConnect a terminal claude to the IDE; also claude --ide auto connects when exactly one IDE is availableRun claude, then /ide; start from the project rootnot statedDocs ↗
Plugin settingsintermediateCustom Claude command path, suppress "not found" notice, Option+Enter multi line (macOS), auto update pluginSettings > Tools > Claude Code [Beta]not statedDocs ↗
ESC key fixintermediateLets ESC interrupt Claude in the JetBrains terminalSettings > Tools > Terminal: untick "Move focus to the editor with Escape"not statedDocs ↗
Remote development and WSLadvancedInstall the plugin on the remote host; WSL command wsl -d Ubuntu -- bash -lic "claude"; WSL2 firewall/mirrored networking stepsPlugin settings > Claude commandnot statedDocs ↗
Security noteadvancedacceptEdits and auto mode can edit IDE config files that auto run; prefer Manual mode in JetBrainsPermission modenot statedDocs ↗
Built in IDE MCP serveradvancedSame ide MCP server, ephemeral port, getDiagnostics only tool visible to the modelAutomaticnot statedDocs ↗
Third party providers in JetBrainsintermediateWorks because it runs the CLI in the IDE terminalConfigure the provider as for the CLInot statedDocs ↗
TroubleshootingbeginnerPlugin not working, IDE not detected ("No available IDEs detected"), command not foundRestart IDE, check root dir, set Claude command pathnot statedDocs ↗

Other editors and containers4

FeatureWhat it doesHowSinceDocs
Any terminal or editorbeginnerCLI works in any integrated terminalclaudenot statedDocs ↗
/ide commandbeginnerManage IDE integrations and show status/idenot statedDocs ↗
/terminal-setupbeginnerInstalls a Shift+Enter keybinding in VS Code, Cursor, Devin Desktop, Alacritty, Zed; Option+Enter in Apple Terminal/terminal-setupnot statedDocs ↗
Dev containersintermediateRun Claude Code (and the VS Code extension) inside a dev container, Codespaces, JetBrains or CursorDev Container Feature ghcr.io/anthropics/devcontainer-features/claude-code:1.0 (see snippet devcontainer.json)not statedDocs ↗

Desktop, web, mobile and the browser

Desktop app (the Code tab)37

FeatureWhat it doesHowSinceDocs
InstallbeginnerClaude app for macOS (universal), Windows x64 (and ARM64), Linux beta (.deb via apt for Ubuntu 22.04+/Debian 12+)Download from the docs page, sign in, click the Code tabLinux betaDocs ↗
Start a sessionbeginnerPick environment (Local, Cloud, SSH, WSL), project folder, permission mode, model in the row under the prompt boxType the task and press Enternot statedDocs ↗
Permission modesbeginnerManual (default), Accept edits, Plan, Auto, Bypass permissions; mode remembered per folder; dontAsk is CLI onlyMode selector or permissions.defaultModenot statedDocs ↗
Auto mode availabilityintermediateNeeds Opus 4.6+, Sonnet 4.6+, Haiku 5.5 or a Fable model; admins can disable with disableAutoModeMode selectornot statedDocs ↗
Suggested promptsbeginnerAccept the suggested next promptTab or Right arrow in an empty prompt boxnot statedDocs ↗
App preview (Browser pane)intermediateClaude starts the dev server, opens it in the pane, takes screenshots, inspects DOM, fixes issues; edit .claude/launch.json for custom dev commandsAsk to preview, or click Open on the server card; Dev servers menunot statedDocs ↗
Browse external sitesintermediateBrowser pane can open external sites; restrictable with browserExternalPageTools and disableBrowserExternalNavigationBrowser panenot statedDocs ↗
Diff view with line commentsbeginnerReview changes per file, comment on lines, send all comments at onceClick +12 -1 in the Changes card; hover a line and click +; submit with Cmd/Ctrl+Enternot statedDocs ↗
/code-review cardintermediateFindings grouped by file; "Walk through in diff", "Fix this one", "Apply fixes"Type /code-review in the prompt boxnot statedDocs ↗
PR monitoring: Auto fix and Merge when readyintermediateWatches CI, fixes failures and review comments, turns on GitHub auto merge (squash unless merge queue); needs ghChanges card, PR title menunot statedDocs ↗
Workspace panesintermediateDrag and drop chat, diff, browser, terminal and file editor; pop panes out into their own windowSession details panel, view modespop out: What's new week 37Docs ↗
Keyboard shortcutsbeginnerCmd+/ shows all; Cmd+N new session; Cmd+Shift+D diff; Cmd+Shift+B browser; Ctrl+\ terminal; Cmd+; side chat; Cmd+Shift+M/I/E mode/model/effort menus; Shift+Tab does NOT cycle modes in DesktopCmd/Ctrl+/not statedDocs ↗
Parallel sessions and split viewbeginnerSeveral sessions at once; split view with Option/Alt-click; own window with Cmd/Ctrl-click+ New, Cmd/Ctrl+N, Ctrl+Tabnot statedDocs ↗
Worktree per sessionintermediateIsolated git worktree under <project>/.claude/worktrees/; branch prefix and location in Settings; .worktreeinclude copies gitignored filesTurn on Worktree before startingnot statedDocs ↗
Add folders to a sessionintermediateExtra directories (like --add-dir)Session UInot statedDocs ↗
NotificationsbeginnerOS notification when a session finishes while you are elsewhereAutomaticnot statedDocs ↗
Side chatintermediateQuestion that uses session context without adding to it; not saved to diskCmd/Ctrl+; or /btwnot statedDocs ↗
Background tasks paneintermediateSubagents, background shell commands, dynamic workflowsTitle bar ⋮ > Background tasksnot statedDocs ↗
Work across sessionsadvancedClaude lists, reads, messages, renames and archives your other Code tab sessions (local, SSH, WSL only)Ask in plain languagenot statedDocs ↗
Suggested tasksintermediateClaude proposes side tasks with Start, Do it here, Options, Start allCards in chatnot statedDocs ↗
Cloud sessions from DesktopintermediatePick a Cloud environment; runs on Anthropic infrastructure and continues if you close the app; multiple reposEnvironment selector > Cloudnot statedDocs ↗
Continue in another surfaceintermediateMove a local session to Cloud (summary carried over) or open its folder in an editorSession menu > Open innot statedDocs ↗
Remote Control from DesktopintermediatePer session switch or Connect new sessions to Remote Control; disableRemoteControl blocks itSettings > Code, /remote-controlnot statedDocs ↗
DispatchbeginnerMessage a task from the phone; Dispatch (in Cowork) can spawn a Code session on your Desktop; Pro and Max onlyPair the mobile app with Desktopnot statedDocs ↗
Computer use in DesktopadvancedClaude opens apps, clicks and types on macOS or Windows; macOS can run it in the background; Pro and Max only; off by defaultSettings, then grant Accessibility and Screen Recording on macOSbackground mode: What's new week 36Docs ↗
ConnectorsintermediateConnect GitHub, Slack, Linear and other services through connectors UIConnectors in the Code tabnot statedDocs ↗
Skills, plugins, preview serversintermediateUse skills, plugin manager UI, .claude/launch.jsonDesktop UInot statedDocs ↗
Saved environmentsintermediateLocal, SSH, WSL or Cloud entries; Desktop auto creates up to eight from your recent foldersEnvironment selector > New environmentnot statedDocs ↗
SSH sessionsadvancedRun on a remote machine, task can keep going while Desktop is disconnected; preconfigure via sshConfigs, restrict via sshHostAllowlistNew environment > SSHnot statedDocs ↗
WSL sessionsintermediateRun in a WSL 2 distribution (WSL 1 unsupported)Environment selectornot statedDocs ↗
iOS Simulator paneintermediateLive simulator next to the chat, a separate simulator per session, no screen takeover (macOS; public beta; Desktop v1.24012.0+)Opens when Claude builds or runs your appnot statedDocs ↗
Scheduled tasks (local)intermediateRecurring sessions that run on your machine while the app is openSidebar > Scheduled > New taskDesktop 1.1.5368+Docs ↗
Move CLI session to DesktopintermediateContinue a terminal session in the app/desktop (alias /app), or claude --desktop, claude --desktop --resume <id>; in Desktop /resume`claude --desktop` v2.1.285Docs ↗
Shared config with CLIintermediateSame CLAUDE.md, settings, hooks, skills, MCP in ~/.claude.json and .mcp.json; claude_desktop_config.json servers also load; claude mcp add-from-claude-desktop imports themAutomaticnot statedDocs ↗
Not in Desktopintermediate--print/Agent SDK, agent teams, inline code suggestions, terminal dialog commands such as /permissionsUse CLInot statedDocs ↗
Enterprise controlsadvancedAdmin console toggles for Desktop, cloud sessions, Remote Control; managed keys (disableDesktopLocalSessions, sshConfigs, managedMcpServers for 3P); MDM via com.anthropic.claudefordesktop, Windows registry SOFTWARE\Policies\Claude, Linux /etc/claude-desktop/managed-settings.jsonAdmin settings, MDMper keyDocs ↗
Desktop troubleshootingbeginner403 in the Code tab, blank screen, "Failed to load session", missing tools, Git LFS, SSH host keys, app won't quitSee pagenot statedDocs ↗

Claude Code on the web and cloud sessions28

FeatureWhat it doesHowSinceDocs
Cloud sessionbeginnerClaude Code runs on Anthropic managed VMs (or your self hosted environment) and keeps going after you disconnect; counts toward plan limitsStart at claude.ai/code, the mobile Code tab, Desktop > Cloud, claude --cloud, or a scheduled tasknot statedDocs ↗
Plan requirementbeginnerPro, Max, Team; Enterprise needs a premium or Chat + Claude Code seat; custom roles need the cloud sessions permissionSign in with claude.ai (not Console, not Bedrock/Vertex/Foundry)not statedDocs ↗
QuickstartbeginnerConnect GitHub, create the Default environment, pick repo and branch, set mode (Auto, Accept edits, Plan), describe the taskclaude.ai/codenot statedDocs ↗
Connect GitHub (App or /web-setup)beginnerGitHub App gives access to repos where installed (and enables Auto fix and Projects); /web-setup sends your local gh token/web-setup in the terminalnot statedDocs ↗
Quick setup (org setting)advancedOwners remove GitHub App and environment prompts for membersOrganization settings > Claude Code > Quick setupnot statedDocs ↗
Prefill sessions by URLadvancedBuild buttons that open a new session with prompt, repos and environmenthttps://claude.ai/code?prompt=Fix%20the%20login%20bug&repositories=acme/webapp (params prompt/q, prompt_url, repositories/repo, environment)not statedDocs ↗
Start from the terminalintermediateCreate a cloud session for the current repo/branch (push first); parallel tasks each get a sessionclaude --cloud "Fix the authentication bug in src/auth/login.ts" (--remote deprecated alias)not statedDocs ↗
Send local repos without GitHubadvancedBundles and uploads your repo when there is no remote or the GitHub App is missing; CCR_FORCE_BUNDLE=1 for GitLab or BitbucketAutomatic with --cloudnot statedDocs ↗
Send a follow up from the CLIadvancedQueue one message into a running cloud session from any logged in machineclaude -p "your message" --cloud <session-id> (--output-format json returns {ok, session_id, url})not statedDocs ↗
Teleport: cloud to terminalintermediatePull a cloud session, its branch and history into your terminal as a local copy (one way); needs clean git state, same repo and accountclaude --teleport (picker), claude --teleport <id>, /teleport or /tp, /tasks then t, claude.ai "Open in > Terminal", or /teleport inside the cloud session`/teleport` inside cloud session needs v2.1.223Docs ↗
Push terminal session to cloudintermediateNot possible from the CLI; handoff is one way. Desktop "Open in > Cloud" carries a summaryDesktop session menunot statedDocs ↗
Cloud permission modesbeginnerAccept edits, Plan, Auto (no Manual, no Bypass)Mode dropdownnot statedDocs ↗
Review and comment on diffsbeginnerChanges card, diff view, inline comments, "Compare against" any branchClick the line countsnot statedDocs ↗
Take back a queued messagebeginnerUnsend a queued messageClick the ✕ on itnot statedDocs ↗
Share sessionsbeginnerTeam/Enterprise: Private or Team. Pro/Max: Private or Public (signed in users)Session visibility toggle; Slack sessions auto-shared with Teamnot statedDocs ↗
Archive and delete sessionsbeginnerArchive hides from the sidebar (claude.ai/code/sessions, Archived tab); delete is permanentSession ⋯ menunot statedDocs ↗
Auto fix pull requestsintermediateClaude watches a PR, fixes CI failures and review comments, asks when ambiguous; does not react to merge conflictsPR ⋮ menu > Auto-fix; /autofix-pr in the terminal; ask on mobile; paste a PR URLnot statedDocs ↗
Security and isolationadvancedIsolated VMs, network controls, credentials via GitHub proxy never enter the VM, network secretsDefaultnot statedDocs ↗
LimitationsintermediateShares rate limits; GitHub required for clone and PR (GHES for Team/Enterprise); IP allowlists affect cloud runs; not for ZDR, HIPAA or CMEK orgsSee pagenot statedDocs ↗
Cloud environmentsintermediateSaved config: network access, env vars, setup script; Default environment is Trusted accessEnvironment selector; /remote-env picks the default from the CLInot statedDocs ↗
Network access levelsintermediateNone, Trusted (allowlisted registries, GitHub, cloud SDKs), Full, Custom allowlistEnvironment dialognot statedDocs ↗
Environment variables and network secretsadvancedSet vars; network secrets are attached to matching requests outside the sandboxEnvironment dialognot statedDocs ↗
Setup scripts and cachingintermediateBash script run as root on Ubuntu 24.04 before Claude starts; cached if it finishes in about 5 minutes; cache refreshes after about 7 daysEnvironment > Setup script (exit zero)Bash editor in 2.1.312Docs ↗
Installed tools and limitsintermediatePython, Node 20/21/22, Ruby, PHP 8.3, Java 21, Go, Rust, C/C++, Docker, Postgres 16, Redis 7; about 4 vCPU, 16 GB RAM, 30 GB disk; ask Claude to run check-toolsAutomaticnot statedDocs ↗
Organization shared environmentsadvancedOwners define shared environments and the org defaultclaude.ai/admin-settings/claude-codenot statedDocs ↗
Self hosted environmentsadvancedCloud sessions run on your runners inside your network; public beta for Team/Enterprise, off by default; not for ZDR or HIPAA orgsOwner enables "Allow self-hosted environments", deploy runnerspublic betaDocs ↗
ProjectsintermediateOne conversation where Claude coordinates many cloud session threads with shared instructions; public beta on Pro and Max onlyclaude.ai/code sidebar > Projects (or More)public betaDocs ↗
Web troubleshootingbeginnerSession creation failed, branch not on GitHub, environment expired, org UUIDSee pagenot statedDocs ↗

Mobile, Remote Control, Dispatch, Channels16

FeatureWhat it doesHowSinceDocs
Claude app as Claude Code clientbeginnerThe iOS and Android apps are a client; there is no separate Claude Code mobile app. Open the Code tabInstall the Claude app; /mobile (aliases /ios, /android) shows a QR codenot statedDocs ↗
Cloud sessions from the phonebeginnerPick repo and branch, submit; steer anytime; ask Claude to watch a PRCode tab, claude.ai/code/newnot statedDocs ↗
Remote Control from the phoneintermediateDrive a session running on your computer; photos saved under ~/.claude/uploads/claude remote-control or /remote-controlnot statedDocs ↗
Push notificationsbeginnerClaude pings the phone when long work finishes or needs a decision/config: "Push when Claude decides", "Push when actions required"; or say "notify me when the tests finish"not statedDocs ↗
Remote Control: interactive sessionbeginnerNormal session also reachable from claude.ai or the appclaude --remote-control "My Project" (--rc)not statedDocs ↗
Remote Control: from a running sessionbeginnerMake the current session remote/remote-control or /rcnot statedDocs ↗
Auto connect every sessionintermediateEach interactive session registers remotely/config > Enable Remote Control for all sessions, or remoteControlAtStartup: truenot statedDocs ↗
Remote Control requirementsintermediatePro, Max, Team, Enterprise (Team/Enterprise: Owner enables); claude.ai login; not on API keys, Bedrock/Vertex/Foundry, gateways or non Anthropic ANTHROPIC_BASE_URL/loginnot statedDocs ↗
What connected devices seeadvancedModel and effort switching, diff pane, subagents, files; some commands are local only (/plugin, /resume)Use arguments such as /model sonnet, /effort high from mobilemodel switching v2.1.238Docs ↗
Security modelintermediateOutbound HTTPS only, no inbound ports, short lived credentials; transcript stored on Anthropic servers while connectedDefaultnot statedDocs ↗
Trusted DevicesadvancedOrg option requiring enrolled devices for Remote ControlAdmin settingnot statedDocs ↗
Remote Control vs cloud sessionsbeginnerLocal execution and MCP vs no setup cloudChoose by where files livenot statedDocs ↗
DispatchbeginnerMessage Cowork a task; it can start a Desktop Code session; Pro and Max onlyPair app with Desktop (Help Center)not statedDocs ↗
ChannelsadvancedPush events from Telegram, Discord, iMessage or your own MCP server into a running session; research preview; Anthropic auth only; admins must enable on Team/Enterpriseclaude --channels plugin:telegram@claude-plugins-official (also discord, imessage, fakechat); build your own per the referenceresearch previewDocs ↗
Cross session messagingadvancedClaude lists and messages your other sessions (same machine, other machines, cloud)Ask Claude; /list-agents (alias /peers)v2.1.224 macOS/Linux, v2.1.234 WindowsDocs ↗
Platforms comparisonbeginnerTable of Dispatch, Remote Control, Channels, Slack, self hosted, scheduled tasksRead the tablenot statedDocs ↗

Chrome, computer use, deep links11

FeatureWhat it doesHowSinceDocs
Claude in Chrome integrationbeginnerControls your logged in Chrome or Edge (Brave, Arc, Vivaldi, Opera detected); pauses on logins and CAPTCHAs; not in WSLInstall the extension (1.0.36+), start claude --chromenot statedDocs ↗
CapabilitiesbeginnerConsole and DOM debugging, design verification, form testing, authenticated apps, data extraction, file uploads, GIF recordingAsk in plain languagenot statedDocs ↗
/chromebeginnerCheck connection, manage permissions, reconnect, pick a browser, set Enabled by default/chromenot statedDocs ↗
Enable by defaultintermediateEvery session connects without --chrome; costs extra context/chrome > Enabled by defaultVS Code auto connect v2.1.287Docs ↗
--chrome / --no-chromebeginnerTurn the integration on or off for a sessionclaude --chromenot statedDocs ↗
RequirementsintermediateNeeds a direct Anthropic plan (Pro, Max, Team, Enterprise) and /login; API key or setup-token auth keeps it off; not on Bedrock/Vertex/Foundry/loginnot statedDocs ↗
Site permissionsintermediateInherited from the extension settingsExtension settingsnot statedDocs ↗
Computer use (CLI)advancedBuilt in computer-use MCP server: open apps, click, type, screenshots on macOS; research preview, Pro and Max only, interactive only/mcp > computer-use > Enable; grant Accessibility and Screen Recordingnot statedDocs ↗
Computer use priorityadvancedClaude prefers connector, then Bash, then Chrome, then iOS Simulator pane, then screen controlAutomaticnot statedDocs ↗
Deep linksadvancedclaude-cli://open?repo=owner/name&q=...&cwd=... opens a terminal session with a prefilled prompt (not sent until you press Enter; 5,000 character limit)Embed in runbooks, alerts, READMEs; open "claude-cli://..."not statedDocs ↗
VS Code launch linkadvancedvscode://anthropic.claude-code/open?prompt=...&session=...URL handlernot statedDocs ↗

Slack and Claude Tag5

FeatureWhat it doesHowSinceDocs
Claude Code in Slack (earlier version)beginner@Claude in a channel starts a cloud session under your own account; Pro and Max only, only in workspaces not connected to Claude Tag; channels only, not DMsAdmin installs the Claude app from the Slack Marketplace; you click Connect in the App Home; /invite @Claude; or /install-slack-appnot statedDocs ↗
Routing modeintermediate"Code only" or "Code + Chat" (auto detect); "Retry as Code" buttonClaude App Home > Routing Modenot statedDocs ↗
Thread context and session flowbeginnerClaude reads the thread or recent channel messages, posts progress, @mentions you with summary and buttons; Team visibility share; trust warning about instructions in contextMention @Claude with a tasknot statedDocs ↗
Claude Tag (public beta)intermediateRuns @Claude as the organization's shared identity with admin configured access, checklists in thread, usage based billing under a spend limit; Team and Enterprise only (not Free, Pro, Max, or third party deployments)Owner pairs Slack workspace with the Claude orgpublic betaDocs ↗
Platforms table entrybeginnerSlack vs Claude Tag guidanceTablenot statedDocs ↗

GitHub Actions, GitLab and code review

YAML
# .github/workflows/claude.yml
# Respond to @claude mentions in issue and PR comments (interactive mode).
# Source: https://code.claude.com/docs/en/github-actions#respond-to-claude-mentions
# Setup: run /install-github-app in Claude Code, or install https://github.com/apps/claude
# and add the ANTHROPIC_API_KEY repository secret yourself.
# Subscription auth instead of an API key: replace the anthropic_api_key line with
#   claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}   (token from `claude setup-token`)
name: Claude Code
on:
  issue_comment:
    types: [created]
  pull_request_review_comment:
    types: [created]
jobs:
  claude:
    if: contains(github.event.comment.body, '@claude')
    runs-on: ubuntu-latest
    permissions:
      contents: write
      pull-requests: write
      issues: write
      id-token: write
      actions: read
    steps:
      - uses: actions/checkout@v6
        with:
          fetch-depth: 1
      - uses: anthropics/claude-code-action@v1
        with:
          anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}

GitHub Actions, GitLab and other CI20

FeatureWhat it doesHowSinceDocs
Claude Code GitHub ActionintermediateRuns Claude Code in workflows; @claude in PR or issue comments, reviews, or new issues; or any event with a promptuses: anthropics/claude-code-action@v1 (repo https://github.com/anthropics/claude-code-action)v1 GA; beta upgrade notesDocs ↗
/install-github-app quick setupbeginnerInstalls the Claude GitHub App, stores the secret (ANTHROPIC_API_KEY or CLAUDE_CODE_OAUTH_TOKEN), pushes workflow files and opens a PR; github.com only; needs ghRun /install-github-app in the repo; Esc stops setupreview workflow posts on the PR from v2.1.229Docs ↗
Manual setupintermediateInstall https://github.com/apps/claude, add secret, copy examples/claude.ymlRepo admin access requirednot statedDocs ↗
Auth: API key or OAuth tokenbeginneranthropic_api_key from Console, or claude_code_oauth_token from claude setup-token (Pro, Max, Team, Enterprise)Repository or org secretnot statedDocs ↗
Auth: workload identity federationadvancedExchange the workflow OIDC token for API access; inputs anthropic_federation_rule_id, anthropic_organization_id, anthropic_service_account_id, anthropic_workspace_id; needs id-token: writeConsole service account and federation rulenot statedDocs ↗
GitHub App permissionsadvancedActions, Checks, Contents, Discussions, Issues, Pull requests, Workflows (read/write) plus Administration, Members, Merge queues, Metadata, Statuses (read), Repository hooks (read/write); shared by all Claude GitHub features; use a custom app for a subsetInstall the appnot statedDocs ↗
Interactive vs automation modeintermediateNo prompt = waits for trigger phrase (default @claude); prompt set = runs on the eventWorkflow confignot statedDocs ↗
Who can trigger runsadvancedNeeds write access (allowed_non_write_users to override) and a human actor (allowed_bots to allow bots)Inputsnot statedDocs ↗
Action parametersintermediateprompt, claude_args, anthropic_api_key, claude_code_oauth_token, github_token, plugin_marketplaces, plugins, settings, trigger_phrase, use_bedrock, use_vertex, use_foundry; action.yml also has assignee_trigger, label_trigger, base_branch, branch_prefix, allowed_bots, track_progress, use_sticky_comment, use_commit_signing, additional_permissionswith: blocknot statedDocs ↗
claude_argsintermediatePass CLI args: --max-turns, --model, --mcp-config, --allowedTools, --debugclaude_args: "--max-turns 5 --model claude-sonnet-5"not statedDocs ↗
Run a skill or plugin in CIadvancedPrompt can be /skill-name or /plugin:skill; install plugins via plugin_marketplaces and pluginsSee snippet github_action_review.ymlnot statedDocs ↗
Scheduled workflowintermediateCron triggered automationSee snippet github_action_schedule.ymlnot statedDocs ↗
Cloud providers in Actionsadvanceduse_bedrock, use_vertex, use_foundry with OIDC; custom GitHub App token stepSee snippet github_action_bedrock.ymlnot statedDocs ↗
Cost control in ActionsintermediateConcise @claude, concise CLAUDE.md, --max-turns, workflow timeouts, concurrency limits; OAuth token runs use your subscriptionWorkflow confignot statedDocs ↗
TroubleshootingintermediateNo response (check app, secrets, @claude as a whole word, write access); CI not running on Claude commits (do not pass GITHUB_TOKEN)See pagenot statedDocs ↗
Upgrade from betaintermediate@beta to @v1, drop mode, direct_prompt becomes prompt, CLI options move into claude_argsEdit workflownot statedDocs ↗
GitHub Enterprise ServeradvancedCloud sessions, Code Review, Claude Security, teleport, plugin marketplaces and Actions (manual workflow) work with GHES for Team/Enterprise; GitHub MCP server and contribution metrics do notOwner: Organization settings > Git providersnot statedDocs ↗
GitLab CI/CDintermediateBeta, maintained by GitLab: a job in .gitlab-ci.yml running claude -p, triggered manually, by merge request events or @claude comments via webhook; Claude API, Bedrock (OIDC) or Agent Platform (WIF)Masked ANTHROPIC_API_KEY variable; see snippet gitlab_ci.ymlbetaDocs ↗
Other CIintermediateAny CI can run claude -p with --bare, --allowedTools, --permission-mode, --permission-prompts none, --max-turns, --max-budget-usd, --output-format json; token from claude setup-tokenSee snippet headless_ci.sh`--permission-prompts` v2.1.259Docs ↗
Bitbucket and other hostsintermediate--from-pr and --worktree accept GitLab MR and Bitbucket PR URLs; cloud sessions need GitHub (bundle fallback)CLI flagsGitLab URLs: What's new week 33Docs ↗

Code review and security review19

FeatureWhat it doesHowSinceDocs
Code Review (managed)intermediateSeveral agents review each GitHub PR on Anthropic infrastructure, a verification step drops false positives, findings post inline with a "Claude Code Review" check run; never approves or blocks; Team and Enterprise, GitHub onlyOwner: Admin settings > Claude Code > Allow code reviewnot statedDocs ↗
Availability limitsadvancedNot available with ZDR, HIPAA configuration or CMEK; GHES supportedCheck before setupnot statedDocs ↗
Setup stepsintermediateAllow switch, connect GitHub, install the app, choose repos, Finish, test with a non draft PRAdmin pagenot statedDocs ↗
Review levelsintermediateQuick, Standard (default), Deep; set per org or per repoAdmin pagenot statedDocs ↗
When reviews runintermediateOnce after PR creation, After every push (default for new repos), or ManualRepository "Review runs" settingnot statedDocs ↗
Severity levelsbeginnerImportant (red), Nit (yellow), Pre existing (purple); "Why this was flagged" sectionRead findingsnot statedDocs ↗
Customize with REVIEW.md and CLAUDE.mdintermediateREVIEW.md (root and subdirectories) sets review only rules: cap nits, do not report, always check; read from the base/default branch onlyCommit REVIEW.mdnot statedDocs ↗
Drafts and forksintermediateSkipped by automatic reviews; request by commentComment commandnot statedDocs ↗
Costs and spend limitadvancedBilled on token usage through usage credits to the org; set a monthly Code Review limitclaude.ai/admin-settings/usagenot statedDocs ↗
TroubleshootingintermediateNo check run, failed or timed out, skipped for budgetRe-run from the check runnot statedDocs ↗
--comment and GitLabintermediatePosts findings as inline comments on a GitHub PR or a single note on a GitLab MR/code-review --commentnot statedDocs ↗
UltrareviewadvancedDeep multi agent review in a cloud sandbox; each finding independently reproduced; research preview; needs claude.ai login; 3 free runs on Pro and Max then usage credits/code-review ultra, /code-review ultra develop, /code-review ultra 1234; or claude ultrareview [target]; --post posts to a github.com PR`--post` v2.1.227Docs ↗
/security-reviewbeginnerSingle pass security review of the diff between your branch and origin's default branch (injection, auth, data exposure); needs an origin remote/security-reviewnot statedDocs ↗
Security review GitHub Actionintermediateanthropics/claude-code-security-review@main: diff aware PR security scan with false positive filtering. Inputs claude-api-key, comment-pr, exclude-directories, claude-model, claudecode-timeout (default 20), run-every-commit, false-positive-filtering-instructions, custom-security-scan-instructions. Repo last pushed 2026-02-11Workflow with uses: anthropics/claude-code-security-review@mainnot statedDocs ↗
Customize /security-reviewadvancedCopy security-review.md into .claude/commands/ and editProject command filenot statedDocs ↗
security-guidance pluginintermediateClaude reviews its own edits for vulnerabilities while it works and fixes them in the same session; per edit, end of turn and commit reviews; needs Python 3.7+ (3.10+ for agentic commit review)/plugin install security-guidance@claude-plugins-official; team: enabledPlugins in .claude/settings.jsonnot statedDocs ↗
Claude Security pluginadvancedMulti agent whole repo or change scoped vulnerability scan with threat model and patch generation; runs locally on your models; needs Python 3.9+ and dynamic workflows/plugin install claude-security@claude-plugins-officialnot statedDocs ↗
Defense in depth tableintermediateWhich tool covers which layer: security-guidance (as written), /security-review (on demand), Code Review (PR), Claude Security (deep scan)Read the tablenot statedDocs ↗
Compare review optionsbeginnerCode Review vs /code-review vs ultrareview vs your own CI vs your own subagent or skillRead the tablenot statedDocs ↗

Scheduling and background work

Shell
#!/usr/bin/env bash
# Background sessions: dispatch, watch, reattach, stop.
# The prompt is the positional argument; --bg cannot be combined with -p.
# Source: https://code.claude.com/docs/en/agent-view#manage-sessions-from-the-shell
claude --bg "investigate the flaky SettingsChangeDetector test"   # prints a short session id
claude agents                    # full-screen list of all sessions (interactive terminal needed)
claude agents --json             # active sessions as JSON for scripts
claude logs 7c5dcf5d             # recent output of one background session
claude attach 7c5dcf5d           # open it in this terminal (Left arrow returns to agent view)
claude stop 7c5dcf5d             # stop it; conversation is kept

Scheduling, background work and automation23

FeatureWhat it doesHowSinceDocs
Three scheduling optionsbeginnerCloud (runs with your machine off, min 1 hour), Desktop (your machine, 1 minute if Claude sets it, 1 hour in forms), /loop (open session, 1 minute)Pick from the comparison tablenot statedDocs ↗
/loopbeginnerRe run a prompt or skill on an interval inside the session: /loop 5m check the deploy; no interval = Claude paces itself (1 minute to 1 hour); bare /loop = built in maintenance prompt/loop [interval] [prompt]; units s, m, h, d; cancel fixed loops by asking Claude; Esc stops self-paced onesnot statedDocs ↗
loop.mdintermediateReplaces the built in maintenance prompt: .claude/loop.md (project) or ~/.claude/loop.md (user); edits apply next iteration; 25,000 byte capCreate the filenot statedDocs ↗
One time remindersbeginnerSingle fire tasks in natural language"remind me at 3pm to push the release branch"not statedDocs ↗
Cron toolsintermediateCronCreate (5-field cron), CronList, CronDelete; up to 50 tasks per session; local time zoneAsk Claude to list or cancelnot statedDocs ↗
Jitter and 7-day expiryintermediateRecurring tasks run up to half the gap late (max 30 min), */5 runs 15 s sooner, one shots at :00/:30 up to 90 s early; recurring tasks expire after 7 daysSchedule off the hournot statedDocs ↗
Disable the scheduleradvancedTurns off cron tools and /loopCLAUDE_CODE_DISABLE_CRON=1not statedDocs ↗
Cloud scheduled tasks (formerly routines)intermediateSaved prompt + repos + connectors that run as cloud sessions on a schedule, an API call or a GitHub event; research preview; Pro, Max, Team, Enterpriseclaude.ai/code/routines, Desktop > Scheduled, or /schedule (alias /routines)research previewDocs ↗
Create from the CLIbeginnerConversational creation: /schedule daily PR review at 9am; one off: /schedule in 2 weeks, open a cleanup PR; manage with /schedule update/schedule [description]GitHub trigger from CLI v2.1.225Docs ↗
Schedule triggerintermediateHourly/daily/weekly presets, custom cron (CRON_TZ= prefix, otherwise UTC), one off timestamps; minimum interval 1 hourEdit dialog on the webnot statedDocs ↗
API triggeradvancedHTTP POST to the task's fire URL with a bearer token starts a session; token shown once; web onlyEdit task > Trigger row > + APInot statedDocs ↗
GitHub triggeradvancedStart a session on repo events such as pull_request.opened; needs the Claude GitHub App; per task and per account hourly capsEdit task on the webnot statedDocs ↗
Limitsadvanced100 scheduled runs per hour per account; Run now/API/one-off rerun 30 per hour per task; no overage on these capsPlan accordinglynot statedDocs ↗
Permissions in scheduled runsadvancedAuto mode by default for cloud runs; connectors and environments define reachTask settingsnot statedDocs ↗
Org controladvancedOwners toggle "Scheduled tasks (Was Routines)" under Remote sessions; custom roles need the permissionAdmin settingsnot statedDocs ↗
Desktop scheduled tasksintermediateLocal recurring sessions with access to files and tools; fire only while the app is open and the computer awake; optional Worktree per runSidebar > Scheduled > New taskDesktop 1.1.5368+Docs ↗
Disable agent viewadvancedAdmin switchdisableAgentView managed settingnot statedDocs ↗
Run agents in parallelintermediateCompare subagents, agent view, agent teams (experimental), dynamic workflows, projects, worktrees, /batch, /subtaskRead the tablenot statedDocs ↗
Headless mode (-p)beginnerNon interactive runs for scripts and CI; exit code 0 on successclaude -p "prompt" --allowedTools "Read,Edit,Bash"not statedDocs ↗
Bare modeintermediateSkips hooks, skills, plugins, MCP, auto memory and CLAUDE.md for fast reproducible runs; recommended for scripts and will become the -p defaultclaude --bare -p ...; load things explicitly with --settings, --mcp-config, --agents, --plugin-dirtighter limits v2.1.286Docs ↗
Budget and turn capsintermediate--max-turns, --max-budget-usd (print mode only)CLI flagsnot statedDocs ↗
Hooks in CIadvancedHooks are the same format; use --bare to avoid loading a teammate's hooks; admins can restrict with allowManagedHooksOnlysettings.json hooksnot statedDocs ↗
Agent SDKadvancedPython and TypeScript packages with the same engine; the GitHub Action and GitLab job are built on ithttps://code.claude.com/docs/en/agent-sdk/overviewnot statedDocs ↗

Topic 6 of 7

Teams and enterprise

Cloud providers, admin, cost and troubleshooting.

Amazon Bedrock, Google Cloud, Foundry and gateways

Shell
#!/usr/bin/env bash
# Claude Code on Amazon Bedrock (manual setup via environment variables).
# Source: https://code.claude.com/docs/en/amazon-bedrock#set-up-manually
# Interactive alternative: run `claude`, choose "3rd-party platform" > "Amazon Bedrock",
# or run /setup-bedrock inside a session (wizard writes ~/.claude/settings.json).

# 1) Credentials: use the default AWS SDK chain. Pick ONE of these.
#    SSO profile:
#      aws sso login --profile=your-profile-name
#      export AWS_PROFILE=your-profile-name
#    Bedrock API key (bearer token, skips the credential chain):
#      export AWS_BEARER_TOKEN_BEDROCK=your-bedrock-api-key

# 2) Turn on Bedrock
export CLAUDE_CODE_USE_BEDROCK=1
export AWS_REGION=us-east-1   # optional if your AWS profile already sets a region

# 3) Optional: different region for the small/fast model, or a custom endpoint or gateway
# export ANTHROPIC_SMALL_FAST_MODEL_AWS_REGION=us-west-2
# export ANTHROPIC_BEDROCK_BASE_URL=https://bedrock-runtime.us-east-1.amazonaws.com

# 4) Pin model versions when rolling out to a team (aliases lag the newest release otherwise).
#    Example IDs from the docs; use the cross-region prefix for your region group (us., eu., apac., global.).
export ANTHROPIC_DEFAULT_OPUS_MODEL='us.anthropic.claude-opus-4-8'
export ANTHROPIC_DEFAULT_SONNET_MODEL='us.anthropic.claude-sonnet-4-6'
export ANTHROPIC_DEFAULT_HAIKU_MODEL='us.anthropic.claude-haiku-4-5-20251001-v1:0'

# 5) Optional: keep built-in defaults but change the prefix, or pick a service tier
# export ANTHROPIC_BEDROCK_REGION_PREFIX=eu          # us | eu | apac | jp | au | global
# export ANTHROPIC_BEDROCK_SERVICE_TIER=priority     # default | flex | priority

# 6) Optional: Mantle endpoint (native Anthropic API shape on Bedrock)
# export CLAUDE_CODE_USE_MANTLE=1

# Verify: start `claude`, then run /status. The provider line should read "Amazon Bedrock".

Providers13

FeatureWhat it doesHowSinceDocs
Deployment overviewintermediateCompare Teams/Enterprise, Console, Bedrock, Claude Platform on AWS, Agent Platform (Vertex), FoundryRead the tablenot statedDocs ↗
Amazon Bedrock wizardbeginnerGuided sign in for Bedrock (profile, API key, access key or env credentials), region and model pinsLogin screen > 3rd-party platform > Amazon Bedrock; /setup-bedrocknot statedDocs ↗
Bedrock manual setupintermediateCLAUDE_CODE_USE_BEDROCK=1, AWS_REGION, optional ANTHROPIC_SMALL_FAST_MODEL_AWS_REGION, ANTHROPIC_BEDROCK_BASE_URL; /logout unavailable; WebSearch unavailableSee snippet bedrock_env.shnot statedDocs ↗
Bedrock credentialsintermediateAWS SDK chain, aws configure, access keys, SSO profile, console credentials, or AWS_BEARER_TOKEN_BEDROCK API key; awsAuthRefresh auto refresh; credential cachingAWS_PROFILE, settings awsAuthRefreshnot statedDocs ↗
Pin model versionsintermediatePin ANTHROPIC_DEFAULT_OPUS_MODEL, _SONNET_, _HAIKU_ before team rollout; aliases otherwise use built in defaults that can lagEnv vars or settings envnot statedDocs ↗
Cross region prefixesadvancedus., eu., apac., global., us-gov.; ANTHROPIC_BEDROCK_REGION_PREFIX (us, eu, apac, jp, au, global)Env varnot statedDocs ↗
Bedrock IAMadvancedbedrock:InvokeModel, InvokeModelWithResponseStream, ListInferenceProfiles, GetInferenceProfile, plus Marketplace subscribeIAM policy in the docsnot statedDocs ↗
Bedrock extrasadvanced1M context by default for Fable, Sonnet 5+, Opus 4.7+; service tiers via ANTHROPIC_BEDROCK_SERVICE_TIER (default, flex, priority); Guardrails via ANTHROPIC_CUSTOM_HEADERS; Mantle endpoint via CLAUDE_CODE_USE_MANTLE=1Env vars1M default v2.1.287Docs ↗
Agent Platform (Vertex) setupintermediateCLAUDE_CODE_USE_VERTEX=1, CLOUD_ML_REGION, ANTHROPIC_VERTEX_PROJECT_ID, per model VERTEX_REGION_CLAUDE_*; role roles/aiplatform.user; wizard /setup-vertex; gcpAuthRefreshSee snippet vertex_env.shnot statedDocs ↗
Microsoft Foundry setupintermediateCLAUDE_CODE_USE_FOUNDRY=1, ANTHROPIC_FOUNDRY_RESOURCE (name only) or ANTHROPIC_FOUNDRY_BASE_URL; auth via ANTHROPIC_FOUNDRY_API_KEY, Entra ID (az login) or ANTHROPIC_FOUNDRY_AUTH_TOKEN; no wizard; roles Azure AI User or Cognitive Services UserSee snippet foundry_env.shnot statedDocs ↗
Claude Platform on AWSadvancedAnthropic operated API with AWS auth, IAM and Marketplace billingCLAUDE_CODE_USE_ANTHROPIC_AWS=1, ANTHROPIC_AWS_WORKSPACE_ID, optional ANTHROPIC_AWS_API_KEYnot statedDocs ↗
Feature availability matrixintermediateWhich features work per provider: web search not on Bedrock, fast mode and Advisor only on first party, Channels, Remote Control, cloud sessions, Chrome, Ultrareview need a claude.ai loginRead the tablesnot statedDocs ↗
Claude Desktop on 3PadvancedRuns the Code tab on Bedrock, Agent Platform, Foundry or a self hosted gatewayclaude.com/docs/third-party/claude-desktop/overviewnot statedDocs ↗

Gateways, network, containers10

FeatureWhat it doesHowSinceDocs
LLM gateway (bring your own)advancedOne place for credentials, usage, budgets, audit logs, provider switchingANTHROPIC_BASE_URL + ANTHROPIC_AUTH_TOKEN or ANTHROPIC_API_KEY or apiKeyHelper; see snippet gateway_env.shnot statedDocs ↗
Gateway rollout and protocoladvancedAdmin checklist, compatibility guide (endpoints, headers, feature pass through); allowedProviders: ["customEndpoint"] locks machines to the gatewayManaged settings`allowedProviders` v2.1.285Docs ↗
Claude apps gatewayadvancedSelf hosted gateway built into the claude binary: IdP SSO, short lived tokens, group model access, managed settings delivery, OTLP telemetry, routes to Bedrock, Claude Platform on AWS, Agent Platform, Foundry or Anthropic APIclaude gateway --config gateway.yaml; oidc.user_id_claim added in 2.1.3122.1.312 optionDocs ↗
Corporate proxyintermediateHTTPS_PROXY, HTTP_PROXY, NO_PROXY; no SOCKSSee snippet proxy_ca_env.shnot statedDocs ↗
CA certificatesintermediateBundled Mozilla CAs plus OS store by default (CLAUDE_CODE_CERT_STORE); extra CA with NODE_EXTRA_CA_CERTSEnv varsnot statedDocs ↗
mTLSadvancedCLAUDE_CODE_CLIENT_CERT, CLAUDE_CODE_CLIENT_KEY, CLAUDE_CODE_CLIENT_KEY_PASSPHRASE; hot reload after connection errorsEnv varsnot statedDocs ↗
Network allowlistintermediateapi.anthropic.com, claude.ai, claude.com, platform.claude.com, sso.claude.com, mcp-proxy.anthropic.com, downloads.claude.ai, registry.npmjs.org, github.com, raw.githubusercontent.com, bridge.claudeusercontent.com, code.claude.com, optional Datadog hostsFirewall rulesnot statedDocs ↗
Turn off nonessential trafficadvancedStops telemetry, version checks and release notes; disables auto update, fast mode check and feature flags (so also Remote Control)CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1not statedDocs ↗
Dev containersadvancedDev Container Feature, persistent ~/.claude volume with CLAUDE_CONFIG_DIR, /etc/claude-code/managed-settings.json in the image, init-firewall.sh egress rules in the reference container, --dangerously-skip-permissions allowed only as non rootSee snippet devcontainer.jsonnot statedDocs ↗
SandboxingintermediateOS level filesystem and network isolation; /sandbox toggles it; sandbox.enabled, sandbox.network.allowedDomains/sandbox or settingsnot statedDocs ↗

Admin, identity, plans and limits

JSON
{
  "permissions": {
    "deny": [
      "Bash(curl *)",
      "Read(./.env)",
      "Read(./.env.*)",
      "Read(./secrets/**)"
    ],
    "disableBypassPermissionsMode": "disable"
  },
  "allowManagedPermissionRulesOnly": true,
  "env": {
    "CLAUDE_CODE_ENABLE_TELEMETRY": "1",
    "OTEL_METRICS_EXPORTER": "otlp",
    "OTEL_LOGS_EXPORTER": "otlp",
    "OTEL_EXPORTER_OTLP_PROTOCOL": "grpc",
    "OTEL_EXPORTER_OTLP_ENDPOINT": "http://collector.example.com:4317",
    "OTEL_EXPORTER_OTLP_HEADERS": "Authorization=Bearer example-token"
  }
}

Admin, identity, data18

FeatureWhat it doesHowSinceDocs
Admin setup mapintermediateDecision list: provider, settings delivery, enforcement, usage visibility, data handlingRead the pagenot statedDocs ↗
Managed settings deliveryadvancedPriority: server managed (admin console or Claude apps gateway), plist/HKLM registry, managed file, HKCU. File paths: macOS /Library/Application Support/ClaudeCode/managed-settings.json, Linux/WSL /etc/claude-code/managed-settings.json, Windows C:\Program Files\ClaudeCode\managed-settings.jsonPick one mechanismnot statedDocs ↗
Server managed settingsadvancedOwners edit JSON at Organization settings > Claude Code > Managed settings; clients fetch at startup and hourly; Team and Enterprise only; claude doctor reports Managed settings (remote)claude.ai/admin-settings/claude-codedoctor line v2.1.248Docs ↗
Enforcement keysadvancedpermissions.allow/deny, allowManagedPermissionRulesOnly, permissions.disableBypassPermissionsMode, disableAutoMode, sandbox.*, allowedMcpServers/deniedMcpServers/managedMcpServers, strictPluginOnlyCustomization, allowManagedHooksOnly, forceLoginMethod, forceLoginOrgUUID, allowedProviders, availableModels, maxEffortLevel, minimumVersion, requiredMinimumVersion, requiredMaximumVersion, disableAgentView, wslInheritsWindowsSettingsManaged settings JSON (see snippet managed_settings.json)per keyDocs ↗
Managed policy CLAUDE.mdadvancedOrganization wide guidance file at the managed policy pathDeploy the filenot statedDocs ↗
Organization model controlsadvancedDisable models, set org default model, cap effort per role, enforced server side for Enterprise subscription loginsAdmin settingsnot statedDocs ↗
SSO, SCIM, seatsadvancedSSO on Team and Enterprise; SCIM and Compliance API on Enterprise; configured at the Claude account level, not in Claude CodeClaude admin console, Help Centernot statedDocs ↗
Restrict loginadvancedforceLoginMethod (claudeai, console, gateway) and forceLoginOrgUUID; blocks env var credentials when setDeploy via MDMapplies on all login paths from v2.1.212Docs ↗
Authentication precedenceintermediateCloud provider vars, then ANTHROPIC_AUTH_TOKEN, then ANTHROPIC_API_KEY, then apiKeyHelper, then subscription loginKnow the ordernot statedDocs ↗
Long lived token for CIintermediateOne year OAuth token for Pro, Max, Team, Enterprise; set as CLAUDE_CODE_OAUTH_TOKEN; cannot start Remote Controlclaude setup-tokennot statedDocs ↗
Credential storageintermediatemacOS Keychain (falls back to ~/.claude/.credentials.json), Linux and Windows file with restricted accessAutomaticnot statedDocs ↗
Data usageintermediateFree, Pro, Max: choose whether data trains models (5-year vs 30-day retention); Team, Enterprise, API: no training by default, 30-day retention; local transcripts under ~/.claude/projects/ for 30 days (cleanupPeriodDays)claude.ai/settings/data-privacy-controlsnot statedDocs ↗
Telemetry opt outsintermediateDISABLE_TELEMETRY, DISABLE_ERROR_REPORTING, DISABLE_FEEDBACK_COMMAND, CLAUDE_CODE_DISABLE_FEEDBACK_SURVEY, CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC; all default off on Bedrock, Agent Platform, Foundry, Claude Platform on AWSEnv varserror reporting v2.1.198+Docs ↗
Zero Data RetentionadvancedPrompts and responses not stored after the response; Claude for Enterprise, qualified accounts, enabled per org by AnthropicContact sales; enforce with forceLoginMethod + forceLoginOrgUUIDnot statedDocs ↗
HIPAA configurationadvancedOrg setting on Claude Enterprise with a BAA; covers CLI and the Code tab (local mode), not cloud sessions, Remote Control, mobile, gateways, VS Code or JetBrainsPrimary Owner applies it; follow the prep guidenot statedDocs ↗
Legal and complianceadvancedCommercial vs Consumer terms, BAA, embedding Claude Code in products (unmodified binary, users bring their own credentials), AUP, Trust Center, HackerOne reportingRead the pagenot statedDocs ↗
Security overviewintermediateThreat model and safeguardsRead the pagenot statedDocs ↗
Rollout kitsbeginnerChampion kit and communications kit for internal adoptionRead the pagesnot statedDocs ↗

Plans, access and usage limits (as the docs and pricing page state them, fetched 2026-10-28)15

FeatureWhat it doesHowSinceDocs
Free planbeginnerNo Claude Code (pricing comparison shows "No")claude.com/pricingnot statedDocs ↗
ProbeginnerClaude Code included; $17 per month with annual billing ($200 up front) or $20 if billed monthlyclaude.com/pricingnot statedDocs ↗
MaxbeginnerEverything in Pro with 5x or 20x more usage per 5-hour session, higher output limits, priority access; from $100 per month. Exact 20x price not captured: UNVERIFIEDclaude.com/pricingnot statedDocs ↗
TeamintermediateStandard seat $20 per seat per month billed annually ($25 monthly); Premium seat (5x standard usage) $100 annual ($125 monthly); for 2 to 150 people; Claude Code included in paid plansclaude.com/pricingnot statedDocs ↗
Enterpriseintermediate$20 per seat per month billed annually plus usage at API rates, 20-seat minimum (as shown on the pricing page); adds SCIM, audit logs, custom retention, role based accessclaude.com/pricingnot statedDocs ↗
API / ConsoleintermediatePay as you go through a Console account; workspaces with spend limitsSign in with Console or set ANTHROPIC_API_KEYnot statedDocs ↗
Plan feature matrixintermediateCloud sessions and scheduled tasks on all paid plans; Remote Control and Channels admin enabled on Team/Enterprise; computer use and Dispatch Pro/Max only; Code Review, analytics, server managed settings and SSO Team/Enterprise; SCIM, Compliance API, ZDR EnterpriseRead the tablenot statedDocs ↗
Usage limitsbeginnerAll plans have limits on a rolling 5-hour window; paid plans add weekly limits; chat and Claude Code share one pool; no fixed message countCheck Settings > Usage or /usagemessage wording "5-hour limit" in 2.1.312Docs ↗
When you hit a limitintermediateWait for reset, upgrade (/upgrade), or turn on usage credits (/usage-credits); Claude Code can wait and continue after the reset/rate-limit-options; autoContinueAtUsageLimitauto wait v2.1.234Docs ↗
Usage creditsintermediateKeep working past plan limits at API rates; admins set spend limits per org, group or member/usage-credits; claude.ai/settings/usagenot statedDocs ↗
Team and Enterprise allowanceintermediatePer seat allowance on 5-hour and weekly windows, shared with chat and CoworkSeat tiernot statedDocs ↗
API rate limit guidance (TPM and RPM)advancedPer user: 1-5 users 200k-300k TPM and 5-7 RPM; 5-20: 100k-150k and 2.5-3.5; 20-50: 50k-75k and 1.25-1.75; 50-100: 25k-35k and 0.62-0.87; 100-500: 15k-20k and 0.37-0.47; 500+: 10k-15k and 0.25-0.35Request org limits accordinglynot statedDocs ↗
Typical spendintermediateAverage about $13 per developer per active day and $150-250 per developer per month; under $30 per active day for 90% of usersPilot firstnot statedDocs ↗
Which features need a claude.ai loginbeginnerCloud sessions, mobile, Slack, Desktop, /schedule, ultrareview, Code Review, Remote Control, Chrome, computer use, Artifacts, voice dictationSign in with /loginnot statedDocs ↗
Share a free weekbeginner/passes shares a free week of Claude Code (only if your account is eligible)/passesnot statedDocs ↗

Cost, usage and monitoring

Shell
#!/usr/bin/env bash
# OpenTelemetry monitoring for Claude Code.
# Source: https://code.claude.com/docs/en/monitoring-usage#quick-start
# Org-wide: put the same keys in the "env" block of managed settings (see managed_settings.json).
# Claude Code ignores OTEL exporter variables set in a repo's .claude/settings.json.

# 1) Enable telemetry (required)
export CLAUDE_CODE_ENABLE_TELEMETRY=1

# 2) Exporters (configure only what you need)
export OTEL_METRICS_EXPORTER=otlp          # otlp | prometheus | console | none
export OTEL_LOGS_EXPORTER=otlp             # otlp | console | none   (events are emitted as logs)

# 3) OTLP endpoint. Claude Code has no default protocol, so set one.
export OTEL_EXPORTER_OTLP_PROTOCOL=grpc    # grpc | http/json | http/protobuf
export OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317

# 4) Auth, if your collector needs it
# export OTEL_EXPORTER_OTLP_HEADERS="Authorization=Bearer your-token"

# 5) Debugging: shorter export intervals (defaults: metrics 60000 ms, logs 5000 ms)
export OTEL_METRIC_EXPORT_INTERVAL=10000
export OTEL_LOGS_EXPORT_INTERVAL=5000

# 6) Privacy gates, all OFF by default. Turn on only if you need the content.
# export OTEL_LOG_USER_PROMPTS=1       # prompt text
# export OTEL_LOG_TOOL_DETAILS=1       # Bash commands, MCP/skill names, tool inputs
# export OTEL_LOG_TOOL_CONTENT=1       # tool output in span events (needs tracing)

# 7) Optional distributed tracing (beta)
# export CLAUDE_CODE_ENHANCED_TELEMETRY_BETA=1
# export OTEL_TRACES_EXPORTER=otlp

# Verify: look for the metric claude_code.session.count in your backend, or the
# claude_code.user_prompt event after sending a prompt. If nothing arrives:
#   claude --debug-file /tmp/claude-otel.log   and search the log for "[3P telemetry]" errors.
claude

Observability, cost and usage tracking21

FeatureWhat it doesHowSinceDocs
/usage (aliases /cost, /stats)beginnerSession cost (client side list price), tokens by model, prompt cache line, plan usage bars, attribution by skill, subagent, plugin and MCP server, /loop rows, recommendations; d/w toggle 24 h or 7 days/usage; f applies fixescache line v2.1.251; loops v2.1.242; `f` v2.1.305; totals reset on `/clear` v2.1.211Docs ↗
/insightsintermediateHTML report on how you use Claude Code on this machine/insightsnot statedDocs ↗
Status line cost displaybeginnerCustom bottom bar fed JSON including cost.total_cost_usd, duration, lines changed, context use/statusline or statusLine in settings; see the statusline pagenot statedDocs ↗
Status line cache fieldsadvancedprompt_cache object available to scriptsStatus line scriptnot statedDocs ↗
Token count by the spinnerbeginnerLive token counterDefault UInot statedDocs ↗
Cost reduction tipsbeginnerContext management, model choice, MCP overhead, hooks, skills over CLAUDE.md, thinking budget, subagentsRead the pagenot statedDocs ↗
Analytics dashboard (Team, Enterprise)intermediateUsage metrics, contribution metrics via GitHub integration, leaderboard, CSV exportclaude.ai/analytics/claude-code (Admin or Owner)contribution metrics public betaDocs ↗
Console analytics (API)intermediateUsage, spend tracking, team insightsplatform.claude.com/claude-codenot statedDocs ↗
Enterprise Analytics APIadvancedPer user usage and cost across surfacesKey with read:analytics scope at claude.ai/analytics/api-keysEnterprise onlyDocs ↗
OpenTelemetry quick startadvancedExport metrics and events to any OTLP backendCLAUDE_CODE_ENABLE_TELEMETRY=1, OTEL_METRICS_EXPORTER, OTEL_LOGS_EXPORTER, OTEL_EXPORTER_OTLP_PROTOCOL, OTEL_EXPORTER_OTLP_ENDPOINT; see snippet otel_env.shnot statedDocs ↗
OTel metricsadvancedclaude_code.session.count, .lines_of_code.count, .pull_request.count, .commit.count, .cost.usage (USD), .token.usage, .code_edit_tool.decision, .active_time.total (s)Backend queriesnot statedDocs ↗
OTel eventsadvancedLogs/events include claude_code.user_prompt, assistant_response, tool_result, tool_decision, api_request, api_error, api_refusal, api_retries_exhausted, permission_mode_changed, auth, mcp_server_connection, plugin_installed, plugin_loaded, skill_activated, at_mention, hook_*, compaction, subagent_completed, feedback_survey, retention_sweep, managed_settings_resolved, internal_error, safety_event; prompt.id links all events from one promptOTEL_LOGS_EXPORTER=otlp`OTEL_LOG_MANAGED_SETTINGS` v2.1.274Docs ↗
Content privacy gatesadvancedOff by default: OTEL_LOG_USER_PROMPTS, OTEL_LOG_ASSISTANT_RESPONSES, OTEL_LOG_TOOL_DETAILS, OTEL_LOG_TOOL_CONTENT, OTEL_LOG_RAW_API_BODIES; content cap CLAUDE_CODE_OTEL_CONTENT_MAX_LENGTH (60 KB)Env varsnot statedDocs ↗
Traces (beta)advancedSpans link a prompt to API requests and tool runs; TRACEPARENT passed to Bash/PowerShellCLAUDE_CODE_ENHANCED_TELEMETRY_BETA=1 + OTEL_TRACES_EXPORTER=otlpbetaDocs ↗
Admin configured telemetryadvancedPut the env block in managed settings; OTLP destination is locked; repo level OTEL vars are ignoredSee snippet managed_settings.jsonnot statedDocs ↗
Dynamic headers, multi team, cardinality control, mTLSadvancedRotating OTLP headers via a helper; team attributes; reduce metric cardinality; client certs for exportersSee headingsnot statedDocs ↗
Security audit eventsadvancedMap security questions to events, send to a SIEM, check the retention sweepSee headingsnot statedDocs ↗
Cloud sessions and Claude Tag telemetryadvancedTelemetry from cloud sessions with attributionSee pagenot statedDocs ↗
Bedrock monitoringadvancedAWS guidance project for Bedrock monitoringLink on the pagenot statedDocs ↗
Code Review spend viewintermediateReview activity and spend in its own dashboardAdminnot statedDocs ↗
Cost caps for runsadvanced--max-budget-usd, --max-turns, modelPricing managed table for accurate cost figuresCLI flags, managed settingsnot statedDocs ↗

Troubleshooting and diagnostics

Diagnostics, debug flags, feedback, logs14

FeatureWhat it doesHowSinceDocs
/doctorbeginnerIn session setup checkup of install health, invalid settings, unused extensions, duplicate subagent names, redundant CLAUDE.md content; proposes fixes you confirm; /doctor prompt-audit [path] audits instructions/doctornot statedDocs ↗
claude doctorbeginnerRead only installation and settings diagnostics without starting a session (install health, validation errors, Remote Control eligibility, remote managed settings)claude doctor in the shellremote settings line v2.1.248Docs ↗
/contextbeginnerBreakdown of everything in the context window/contextnot statedDocs ↗
/statusbeginnerVersion, model, account, connectivity, setting sources, provider, session kind/statussession kind row v2.1.221Docs ↗
/debug [issue]intermediateTurns on debug logging for the session and diagnoses from the log/debugnot statedDocs ↗
--debug, --debug-file, DEBUG=1intermediateDebug mode with category filter (--debug='mcp,startup', '!mcp'); log to a path; default log ~/.claude/debug/<session-id>.txtclaude --debug-file /tmp/claude-debug.log; CLAUDE_CODE_DEBUG_LOGS_DIR (a file path), CLAUDE_CODE_DEBUG_LOG_LEVELnot statedDocs ↗
--verbosebeginnerFull turn by turn outputclaude --verbosenot statedDocs ↗
--safe-modeintermediateStarts with CLAUDE.md, skills, plugins, hooks, MCP, commands, agents, styles, themes, keybindings, status line, LSP and auto memory all disabledclaude --safe-modenot statedDocs ↗
/heapdumpadvancedWrites a heap snapshot and diagnostics JSON to ~/Desktop/heapdumpnot statedDocs ↗
/bug and /feedbackbeginnerSend a report (consent screen, choose how much history); stored 5 years when sent; on third party providers saved to ~/.claude/feedback-bundles/; DISABLE_FEEDBACK_COMMAND=1 turns off/bug [report], /feedback [report]not statedDocs ↗
Claude drafted feedbackintermediateClaude drafts a report for you to review and send/feedback opens the drafts queueWhat's new week 35Docs ↗
Where logs liveintermediateDebug: ~/.claude/debug/<session-id>.txt; transcripts: ~/.claude/projects/; credentials: ~/.claude/.credentials.json (non macOS); background supervisor: ~/.claude/daemon.log; background jobs: ~/.claude/jobs/<id>/; IDE lock files: ~/.claude/ide/<port>.lock; feedback: ~/.claude/feedback-bundles/Inspect the pathsnot statedDocs ↗
Error referenceintermediateMessage by message fixesSearch the pagenot statedDocs ↗
Get helpbeginner/doctor, /mcp, /feedback, GitHub issues, ask Claude itself; account and billing questions go to support.claude.comSee pagenot statedDocs ↗

More features

3 Auth, in-session use, limits19

FeatureWhat it doesHowSinceDocs
/mcp panelbeginnerCheck server status, authenticate (OAuth in the browser), re authenticate, clear auth, reconnect, enable or disable./mcp, or /mcp reconnect <server|all>, /mcp enable|disable <server|all>not statedDocs ↗
OAuth 2.0 flowbeginnerA 401/403 from a remote server flags it "Needs authentication"; tokens are stored securely and refreshed automatically; a rejected refresh token gives a notice pointing at /mcp. claude -p cannot run OAuth, so sign in interactively first./mcp or claude mcp login <name>not statedDocs ↗
OAuth callback portadvancedFix the redirect port.--callback-port 8080 or MCP_OAUTH_CALLBACK_PORTnot statedDocs ↗
MCP resources via @beginnerType @ to list resources from connected servers; reference one as @server:protocol://path. Fetched and attached automatically.Analyze @github:issue://123not statedDocs ↗
MCP prompts as commandsbeginnerServer prompts show up as /mcp__<server>__<prompt>; arguments are space separated./mcp__github__pr_review 456not statedDocs ↗
ElicitationintermediateServers can ask you for form input or to open a URL mid task. Auto answer with an Elicitation hook.automatic`elicitation` capability for user config servers v2.1.287Docs ↗
Tool search (lazy loading)intermediateMCP tool definitions are deferred; only names load at start and Claude searches on demand. On by default for Opus 4, Sonnet 4, Haiku 4.5 and later.ENABLE_TOOL_SEARCH=true|auto|auto:N|false; exempt a server with "alwaysLoad": true; deny the ToolSearch tool to load all upfront.not statedDocs ↗
Output limitsintermediateWarning above 10,000 tokens; default max 25,000 tokens (MAX_MCP_OUTPUT_TOKENS); text over 50,000 characters is saved to a file; servers can raise a tool's cap with _meta["anthropic/maxResultSizeChars"]; responses over 16 MiB fail.export MAX_MCP_OUTPUT_TOKENS=50000not statedDocs ↗
MCP_TIMEOUTintermediateServer startup timeout in ms (default 30000).MCP_TIMEOUT=60000 claudenot statedDocs ↗
MCP_TOOL_TIMEOUTintermediateTool execution timeout in ms (default 100000000, about 28 hours); HTTP/SSE requests also time out at 60 s unless raised.MCP_TOOL_TIMEOUT=120000not statedDocs ↗
Idle timeoutadvancedAborts a call that sends no response or progress for 5 minutes (HTTP/SSE/WS) by default; 0 disables.CLAUDE_CODE_MCP_TOOL_IDLE_TIMEOUT (ms)not statedDocs ↗
Auto backgroundingintermediateAn MCP call still running after two minutes moves to a background task (see /tasks).automaticnot statedDocs ↗
Startup tuningadvancedNon blocking startup by default; MCP_CONNECTION_NONBLOCKING=0, MCP_CONNECT_TIMEOUT_MS, MCP_SERVER_CONNECTION_BATCH_SIZE (3 local), MCP_REMOTE_SERVER_CONNECTION_BATCH_SIZE (20).env varsnot statedDocs ↗
Tool level approvaladvancedServers can force a prompt on every call with _meta["anthropic/requiresUserInteraction"]: true, even in bypass mode.server sidenot statedDocs ↗
Push messages with channelsadvancedA server declaring claude/channel can push events (CI results, alerts) into your session; opt in with --channels.claude --channels ...not statedDocs ↗
Server side MCP tasksadvancedLong server tasks that survive leaving the session; stop or fetch them from /tasks.automaticnot statedDocs ↗
Automatic reconnectionintermediateRemote servers reconnect after drops; retry failed ones yourself with /mcp reconnect./mcp reconnect allnot statedDocs ↗
MCP client runtimesadvancedv1 (SDK 1.x) or v2 (SDK 2.0, protocol revision 2026-07-28). Pin with MCP_SDK_GENERATION.env varv2 default from v2.1.232 / v2.1.274 depending on session typeDocs ↗
MCP quickstartbeginnerWalk through connecting a server end to end.claude mcp add --transport http sentry https://mcp.sentry.dev/mcp, then /mcpnot statedDocs ↗

1 Built-in subagents and managing agents14

FeatureWhat it doesHowSinceDocs
ExplorebeginnerFast read only search agent (Write/Edit denied); starts without CLAUDE.md and git status; thoroughness quick, medium, very thorough.Claude delegates automaticallynot statedDocs ↗
PlanbeginnerRead only research agent used in plan mode to gather context.automatic in plan modenot statedDocs ↗
general-purposebeginnerAll tools agent for multi step research plus changes.automaticnot statedDocs ↗
Other built insintermediateclaude (catch all, default for background sessions), statusline-setup (Sonnet, runs on /statusline), claude-code-guide (Haiku, answers Claude Code questions).automaticnot statedDocs ↗
Remove built insadvancedBlock a type with permissions.deny, deny Agent to stop all delegation, or drop Explore and Plan.CLAUDE_CODE_DISABLE_EXPLORE_PLAN_AGENTS=1 (v2.1.198); SDK/-p: CLAUDE_AGENT_SDK_DISABLE_BUILTIN_AGENTS=1v2.1.198Docs ↗
/agents commandbeginnerIn current docs it only prints a reminder to ask Claude to create or manage subagents or to edit .claude/agents/. Before v2.1.197 it opened an interactive editor./agentschanged after v2.1.197Docs ↗
claude agentsintermediateDifferent feature: the background agent view (research preview). --json lists sessions; flags --model, --effort, --agent, --cwd, --mcp-config, --add-dir.claude agents, claude --bg, /backgroundnot statedDocs ↗
Create a file agentbeginnerMarkdown with YAML frontmatter (name, description required) and the system prompt as body. Changes are picked up within seconds (restart needed for a brand new agents dir)..claude/agents/code-reviewer.mdnot statedDocs ↗
Scope: managedadvancedHighest priority (1), org wide..claude/agents/ in the managed settings dirnot statedDocs ↗
Scope: --agents flagintermediateSession only, priority 2. JSON of name -> {description, prompt, tools, model ...}; file form with --print. color and experimental ignored here.claude --agents '{...}'file form v2.1.281Docs ↗
Scope: projectbeginnerPriority 3. Walks up from cwd; closest definition wins. Commit it..claude/agents/not statedDocs ↗
Scope: userbeginnerPriority 4, all your projects; subfolders allowed (identity comes from name).~/.claude/agents/not statedDocs ↗
Scope: pluginintermediatePriority 5 (lowest); appears as plugin:agent. Plugin agents ignore hooks, mcpServers, permissionMode, initialPrompt.plugin agents/not statedDocs ↗
Validate agent filesintermediateFind files whose frontmatter does not parse.claude plugin validate .claude/agentsnot statedDocs ↗

Topic 7 of 7

Reference

The PDF, latest releases, 2026 changes and answers.

Get the PDF and release alerts

PDF · 57 pages · 6.2 MB

Get the PDF and release alerts

The whole sheet in one file: a beginner, an intermediate and an advanced poster, the recipes, and every feature with its link to the official page. Tick the box and I will also email you when Claude Code ships a new feature, at most once a week.

Enter your email and the PDF arrives in your inbox.

A fan of pages from the Claude Code cheat sheet

Latest releases

The latest Claude Code release is 2.1.312. This list comes from the official changelog and is refreshed every day, so it can be newer than the rest of the page. Last check: Oct 28, 2026.

  1. 2.1.312 · Oct 27, 2026

    • Added oidc.user_id_claim to the Claude apps gateway, to identify people by an id_token claim other than sub, such as Microsoft Entra ID's oid
    • Added click to send: in fullscreen, clicking the "to send now" hint under a queued message sends it right away, as its key does
    • Improved the prompt's effort indicator: a change made mid task now says it may wait for your next message, and the note clears when it no longer applies
    • Improved WebFetch errors in cloud sessions: a host that does not resolve is now explained as possibly outside the allowed network domains, so Claude names the host to allow
    • Changed Bedrock, Vertex, Foundry and Mantle to use the shorter system prompt for model names Claude Code doesn't recognize, such as custom deployment names and inference profile ARNs, even when they front Sonnet or Haiku; set CLAUDE_CODE_SIMPLE_SYSTEM_PROMPT=0 to keep the full prompt
    • Changed automatic model switches after a flagged message to also cover model names Claude Code doesn't recognize, such as custom deployment names; set CLAUDE_CODE_DISABLE_REFUSAL_FALLBACK=1 to turn them off
  2. 2.1.311 · Oct 26, 2026

    • Added --hold-idle-file and --max-hold-min to self-hosted-runner, to keep an idle session while your host reports processes it left running
    • Added a tip for the Explanatory output style, shown when you ask Claude for explanations
    • Linux: Fixed sandboxed Bash commands failing with bwrap: Can't create file when a --plugin-dir folder was also an added directory and permissions.blockReadsOutsideWorkingDirectories was on
    • Self hosted runner: Fixed a session failing to start when a rate limit (HTTP 429, or a git wrapper that exits 75) blocks an added read only repository; it now starts without that repository
    • Improved startup time for Pro and Max accounts by skipping two network requests on launches within an hour of the last check
    • Improved /teleport and claude --teleport to warn when a compacted cloud session loads from its last compaction, so the messages it summarized aren't in the local copy
  3. 2.1.310 · Oct 23, 2026

    • Added the Monitor tool and plugin monitors on Bedrock, Vertex, and Foundry, and when telemetry or nonessential traffic is disabled; long foreground sleeps are now blocked there too
    • Windows: Fixed PreToolUse and PermissionRequest hooks letting a tool call through when Git Bash is missing and the hook's command is only quoted strings, such as a quoted path
    • Improved auto mode's prompt before the first read outside the working directories: it now says when blocking those reads makes shell commands ask for permission
    • Improved memory use of non interactive sessions (-p, Agent SDK) during compaction when the transcript file is very large
    • Improved a mod's Image to draw inside tmux with allow-passthrough and focus-events on, in kitty, Ghostty, and iTerm2 3.5+ with fullscreen rendering, where it showed only its alt text
    • Linux: Improved /sandbox and the sandbox startup warning to name Ubuntu's AppArmor restriction on user namespaces, and how to lift it, when it keeps bubblewrap from starting the sandbox
  4. 2.1.309 · Oct 22, 2026

    • Linux: Fixed sandbox write denies lifting when a background command outlived the session
    • Windows: Fixed PowerShell permission checks auto approving some Set-Location or cd commands that target the current directory and carry extra arguments; these now prompt for approval
    • macOS: Fixed the "Install Command Line Developer Tools" dialog opening each time Claude Code starts on a Mac without Xcode or the Command Line Tools
    • Self hosted runner: Fixed --startup-timeout-min stopping a session whose first prompt, such as /code-review, was still working in a subagent; a frozen process is still stopped
    • Improved the speed of many git commands Claude Code runs for itself on Windows; on every platform, errors from those commands now show in English even when git is set to another language
    • Improved the error when a hooks module is nested too deep to load: it now names the file instead of showing a bare stack overflow message
  5. 2.1.308 · Oct 22, 2026

    • Bug fixes and reliability improvements
  6. 2.1.307 · Oct 21, 2026

    • Added /claude-api api-version to move Claude API code to API version 2026-10-21
    • Added the claude_code.safety_event OpenTelemetry event for each tool call a permission rule, auto mode, a safety check, a hook or the sandbox stopped, prompted or sent back
    • Self hosted runner: Fixed sessions with --use-anthropic-git-proxy committing a .claude/settings.local.json left in the clone by an earlier session
    • Self hosted runner: Fixed archiving or requeueing a session, or stopping the runner, during its checkout hook leaving the hook's processes running and the runner's slot held
    • Improved recovery from unparseable tool calls: Claude Code now retries the call up to twice before ending the turn with an error
    • Improved fork subagents launched together: each is now told which launch is its own, so forks are much less likely to try to start each other's work
  7. 2.1.305 · Oct 20, 2026

    • Added sandbox.allowNestedUserNamespaces so sandboxed commands on Linux can create user namespaces (Chromium, rootless podman); this lets them get around the sandbox's file protections
    • Added CLAUDE_CODE_RETRY_WATCHDOG_USAGE_LIMIT_RECHECK_MS so unattended retry mode (CLAUDE_CODE_RETRY_WATCHDOG) notices a usage limit that was lifted before its reset
    • Self hosted runner: Fixed a start script that shares only its stdout with the runner or orchestrator failing with Resource temporarily unavailable when TERM is set (a 2.1.300 regression)
    • Self hosted runner: Fixed repository access failing since 2.1.296 when a git credential helper or askpass program reads its settings through GIT_CONFIG
    • Self hosted runner: Fixed the orchestrator reporting a spawn runner hook as timed out when a runner it started in the background kept its output open
    • Improved /usage: each warning is now a one line fix that names its source, and f applies the fixes; the same fixes appear in VS Code and /doctor
  8. 2.1.304 · Oct 19, 2026

    • Added a transcript line when a plugin that runs first skips one of your mod's hooks, naming the event and the plugin
    • Added decider: "person" to a mod's tool.check answer: only the permission dialog or a host's callback can approve the ask, and it is refused with the mod's reason where nobody can be asked
    • Added e.isReadOnly to a mod's tool.check event, set when the tool call is read only
    • Added /auto-mode-setup: a guided setup that reads your project and recent sessions to teach auto mode about your environment, now also available on Bedrock, Vertex, Foundry, Claude apps gateway and telemetry disabled sessions
    • Added /claude-api managed-agents-secure, which compares a Managed Agents agent's settings with Anthropic's published security guide, without changing anything
    • Added the names of the tools called earlier to the compaction summary in the transcript view (Ctrl+O)
  9. 2.1.303 · Oct 18, 2026

    • Bug fixes and reliability improvements
  10. 2.1.302 · Oct 16, 2026

    • Added CLAUDE_CODE_AUTO_MODE_MODEL to choose the model the client side auto mode classifier uses; it does not change the model for server side auto mode
    • Added an Idle compaction row to /config for turning idle compaction off or back on; the notices shown after an idle compaction now say how to turn it off
    • Added a notice to /design-sync and /design-login that standalone Claude Design (claude.ai/design) closes by December 14, 2026
    • Self hosted runner: Fixed git fetches failing with "bad object refs/heads" in sessions that reuse a checkout stored in git's reftable format
    • Windows: Fixed every file write being refused or asked about for projects on exFAT or FAT32 drives, including in sessions started with --plugin-dir
    • Improved startup time with many plugins enabled: plugin command and agent files now take far fewer file system calls to load, most of all on Windows

Full history: CHANGELOG.md on GitHub

What changed in 2026

  1. Jan 7 · 2.1.0

    Skills hot reload, wildcard Bash permission rules such as Bash(npm *), hooks in agent and skill frontmatter, and /teleport. CHANGELOG.md on GitHub

  2. Feb 5 to 6 · 2.1.32 and 2.1.33

    Claude Opus 4.6, agent teams as a research preview, and memory frontmatter for agents. CHANGELOG.md on GitHub

  3. Feb 19 · 2.1.49

    --worktree and -w for an isolated git worktree. CHANGELOG.md on GitHub

  4. Mar 6 · 2.1.71

    /loop and in session scheduling tools. CHANGELOG.md on GitHub

  5. Mar 20 · 2.1.81

    --bare for scripted -p calls. CHANGELOG.md on GitHub

  6. Apr 4 · 2.1.92

    /tag and /vim were removed. Vim mode is under /config now. CHANGELOG.md on GitHub

  7. Apr 22 · 2.1.118

    /cost and /stats merged into /usage. CHANGELOG.md on GitHub

  8. May 11 · 2.1.139

    Agent view (claude agents) as a research preview, and /goal. CHANGELOG.md on GitHub

  9. May 21 · 2.1.147

    /simplify was renamed /code-review. /review became an alias of it on Aug 5. CHANGELOG.md on GitHub

  10. Jun 24 to 30 · 2.1.191 to 2.1.197

    /rewind can resume from before /clear, admins can set an organization default model, and Claude Sonnet 5 became the default model. CHANGELOG.md on GitHub

  11. Jul 1 · 2.1.198

    The /agents wizard was removed. Ask Claude or edit .claude/agents/. CHANGELOG.md on GitHub

  12. Jul 8 · 2.1.205

    /doctor became a full setup checkup. CHANGELOG.md on GitHub

  13. Aug 4 · 2.1.222

    The ultraplan feature was removed. Use plan mode. CHANGELOG.md on GitHub

  14. Aug 7 · 2.1.224

    Self hosted environments for Team and Enterprise, and the 200 subagent per session cap was removed. CHANGELOG.md on GitHub

  15. Sep 1 · 2.1.257

    Claude Fable 5.1 became the default Fable model. CHANGELOG.md on GitHub

  16. Sep 4 · 2.1.261

    /skill-doctor shows each skill's context cost and usage. CHANGELOG.md on GitHub

  17. Sep 22 and 28 · 2.1.280 and 2.1.284

    Claude Opus 5.5 and Claude Sonnet 5.5 became the default Opus and Sonnet models. CHANGELOG.md on GitHub

  18. Oct 27 · 2.1.312

    The latest release at the time of this check. See the live list above for anything newer. Claude Code changelogCHANGELOG.md on GitHub

All dates are 2026. These libraries release often, so read each changelog before you take a minor release.

Questions people ask

How do I install Claude Code?

Run curl -fsSL https://claude.ai/install.sh | bash on macOS, Linux or WSL, or the PowerShell installer on Windows. Homebrew, WinGet, apt, dnf and apk are also documented. The native install updates itself.

How do I undo something Claude changed?

Press Esc twice on an empty prompt, or type /rewind. You can restore the code, the conversation or both. Changes made only through Bash or outside Claude Code are not restored, so keep using Git.

What is the difference between a skill, a subagent and a hook?

A skill is a workflow Claude loads when the task matches. A subagent is a helper with its own context window and tools. A hook is your own script that runs at a fixed point, such as before a tool call, so a rule always holds.

Why did my hook not block the tool call?

A hook blocks only with exit code 2, or with a JSON deny. Exit code 1 is a non blocking error and the tool still runs. @ file mentions also bypass PreToolUse hooks.

How do I use Claude Code in a script or CI?

Use print mode: claude -p "prompt" --output-format json. Add --json-schema for a checked result, --max-budget-usd to cap spend and --bare to skip hooks, skills, plugins and MCP.

How do I keep Claude out of my secrets?

Use Read(...) deny rules for the files, and turn on the sandbox. A .claudeignore file does nothing, and Bash deny rules are not a security boundary on their own.

How often does Claude Code change?

Very often. There were 271 npm releases between Jan 6 and Oct 27, 2026, about six a week. That is why the release list on this page refreshes daily, and why the PDF carries a date.

Can I get an email when Claude Code ships a new feature?

Yes. Use the form on this page and tick the alerts box. I check the official changelog every day and email you at most once a week, only when there is a new feature. You confirm by email first and every email has an unsubscribe link.

Sources

Your AI agents, built by an AI engineer. No handoffs, no lock in. Start my agent build.