Skip to main content

Reference · Reference

Claude Code Commands

Complete reference for Claude Code CLI commands, slash commands, and keyboard shortcuts. Search by category and copy commands with one click.

Last updated:

Compatible with v2.1.x (verified on v2.1.261) | Updated September 2026

How to Use

Expand how to use
  1. 1

    Search for commands

    Enter a command name in the search field, or filter by category (Slash Commands, Keyboard Shortcuts, etc.) to find the command you need.

  2. 2

    Review descriptions and examples

    Check the command description and practical usage examples.

  3. 3

    Copy commands

    Click the copy button to copy the command to your clipboard for immediate use in your terminal.

Latest Updates (Summary)

Check the most important updates at a glance. See the section below for details.

v2.1.261 (September 4, 2026)

  • Added --append-subagent-system-prompt-file to read the subagent system prompt from a file, for prompts too large to pass on the command line
  • Added /skill-doctor to show which loaded skills go unused and what they cost in context, so you can prune them
  • Added an "Organization policy" line to /status and claude doctor that says why your organization's policy could not be loaded, such as a proxy not passing the endpoint through

v2.1.260 (September 3, 2026)

  • Added a diff panel that opens beside the conversation in fullscreen mode and shows your uncommitted changes as Claude edits; toggle it with /diff
  • Added a likely cause for prompt-cache misses (e.g. tool definitions or system prompt changed, idle past the TTL) to /cost and the status line's prompt_cache field
  • Added /reload-plugins to headless sessions, so it appears in the Claude Code Desktop and SDK command lists
View detailed update history

/help
Show help and documentation

Examples

/help
Display available commands and help

/compact
Compact the context window

Examples

/compact
Summarize and compress conversation history
/compact [instructions]
Compact with custom instructions

/clear
Clear conversation history

Examples

/clear
Reset the current conversation

/config
Manage settings. Use the /config key=value syntax to set any setting directly from the prompt (works in interactive, -p, and Remote Control)

Examples

/config
View and modify current settings
/config thinking=false
Set a setting directly with key=value syntax

/context
Visualize context usage

Examples

/context
Check current context window usage as a colored grid

/copy
Copy last response to clipboard (with code block selection)

Examples

/copy
Copy Claude's last response to clipboard (shows picker for multiple code blocks)

/cost
Show token usage and costs

Examples

/cost
Display token usage for the current session

/debug
View session debug log

Examples

/debug
Display debug information and logs

/desktop
Hand off CLI session to Desktop app

Examples

/desktop
Open current session in Claude Desktop app

/doctor
Comprehensive installation & settings checkup

Examples

/doctor
Check environment, settings, and connection status (same as /checkup)

/exit
Exit the REPL

Examples

/exit
End the Claude Code session

/export
Export conversation to file or clipboard

Examples

/export
Export current conversation

/init
Initialize project with CLAUDE files

Examples

/init
Generate CLAUDE.md file to set up the project

/mcp
Configure and manage MCP servers (shows tool count per connected server and flags servers connected with 0 tools, since v2.1.128)

Examples

/mcp
Check MCP server status, including connected tool counts and zero-tool warnings

/memory
Edit CLAUDE files

Examples

/memory
Open and edit CLAUDE.md files

/model
Switch AI model and Effort level

Examples

/model
Select and change model (use arrow keys to adjust Effort level)
/model claude-sonnet-4-6
Switch to a specific model

/permissions
Manage allow, ask, and deny rules for tool permissions. The dialog lets you review rules by scope, add or remove them, manage working directories, and review recent auto mode denials. v2.1.246 added an Auto mode tab for viewing and editing auto mode classifier rules

Examples

/permissions
View and modify tool permissions

/plan
Enter plan mode directly

Examples

/plan
Switch to plan mode for creating implementation plans

/rename
Rename the current session

Examples

/rename [new name]
Give the session a name for easier management

/resume
Resume a session by ID or name

Examples

/resume
Select and resume from previous sessions

/rewind
Rewind conversation or code to a previous point (aliases: /undo, /checkpoint)

Examples

/rewind
Restore code and/or conversation to a previous point, or summarize from a selected message
/undo
Alias for /rewind (added in v2.1.108)

/stats
Visualize usage statistics and session history

Examples

/stats
Display usage statistics

/status
Show current session status

Examples

/status
Display model, context usage, and more

/statusline
Configure the status line UI

Examples

/statusline
Customize status line display

/tasks
List and manage background tasks

Examples

/tasks
Check running background tasks

/teleport
Resume a remote session from claude.ai

Examples

/teleport
Resume a session started on claude.ai in the CLI

/terminal-setup
Display terminal key settings

Examples

/terminal-setup
Check recommended terminal settings

/theme
Change color theme

Examples

/theme
Select and change the UI color theme

/todos
List current TODO items
Available up to v2.1.70

Examples

/todos
View TODO items in the task list

/usage
Show plan usage and limits with per-category breakdown

Examples

/usage
Display current plan usage and remaining limits, broken down by skills, subagents, plugins, and MCP servers

/powerup
Interactive lessons for Claude Code features

Examples

/powerup
Start interactive lessons with animated demos

/agents
Show guidance for managing subagents. As of v2.1.198 the interactive wizard was removed; ask Claude to manage subagents or edit .claude/agents/ directly

Examples

/agents
Show how to create and manage subagents

/effort
Set model effort level (low/medium/high/xhigh/max/ultracode/auto; available levels depend on the model)

Examples

/effort
Open an interactive slider (arrow keys to pick, Enter to apply). Takes effect immediately.
/effort xhigh
Set effort to xhigh for your hardest tasks (Opus 4.8 defaults to high)
/effort ultracode
Session-only setting combining xhigh reasoning with automatic workflow orchestration

/fast
Toggle Fast mode

Examples

/fast
Enable or disable Fast mode for faster output with the same model

/hooks
Configure and manage hooks

Examples

/hooks
Set up and view shell command hooks for tool execution

/plugin
Install and manage plugins

Examples

/plugin
List, install, or remove plugins

/simplify
Cleanup-only review of changed code that applies fixes (v2.1.154+; does not hunt for bugs)

Examples

/simplify
Four parallel agents review reuse, simplification, efficiency, and altitude, then apply fixes (use /code-review to find bugs)

/batch
Execute multiple tasks in batch mode

Examples

/batch
Queue and execute multiple tasks in batch processing mode

/btw
Send a side message without interrupting the main conversation
Available depending on environment/settings

Examples

/btw Also add docs for this function later
Send a side request without interrupting the main task

/chrome
Manage Chrome integration
Available depending on environment/settings

Examples

/chrome
View and configure Chrome integration settings

/color
Change theme color (bare /color picks a random session color)
Available depending on environment/settings

Examples

/color
Pick a random session color (bare invocation, since v2.1.128)
/color blue
Set the UI theme color to a specific value

/diff
Show session diff with keyboard scrolling

Examples

/diff
Show file changes from the current session. Scroll with arrows, j/k, PgUp/PgDn, Space, or Home/End

/usage-credits
Configure usage credits to keep working when you hit a limit. Previously /extra-usage.
Available depending on environment/settings

Examples

/usage-credits
View and adjust usage credit settings

/feedback
Opens the same dialog as /bug, with the same consent step and sending rules applied (v2.1.216+; it is an alias of /bug). From v2.1.247, in sessions where Claude has drafted feedback, /feedback with no argument opens the drafts queue instead, where you review, edit, send, or discard the drafts (passing an argument opens the dialog directly)

Examples

/feedback
Open the same feedback-sharing dialog as /bug

/fork
Copy this conversation into a new background session — its own row in claude agents — while you keep working here (changed in v2.1.212; the in-session subagent it used to launch is now /subtask)

Examples

/fork
Fork the current conversation into a background session
/fork <directive>
Fork into a background session with a directive

/ide
Manage IDE integration

Examples

/ide
View and configure IDE integration settings

/install-github-app
Install Claude GitHub App

Examples

/install-github-app
Install Claude GitHub App to your repository

/install-slack-app
Install Claude Slack App

Examples

/install-slack-app
Install Claude Slack App to your workspace

/keybindings
Configure key bindings
Available depending on environment/settings

Examples

/keybindings
View and modify key binding settings

/login
Log in to your Anthropic account

Examples

/login
Start the authentication flow to log in

/logout
Log out of your Anthropic account

Examples

/logout
Log out of the current session

/mobile
Connect with mobile device

Examples

/mobile
Manage mobile device connections

/pr-comments
Fetch and display PR comments
Available up to v2.1.90

Examples

/pr-comments
Display review comments for the current PR

/privacy-settings
Manage privacy settings
Available depending on environment/settings

Examples

/privacy-settings
View and configure privacy-related settings

/reload-plugins
Reload plugins

Examples

/reload-plugins
Reload installed plugins

/remote-control
Connect session to browser/mobile
Available depending on environment/settings

Examples

/remote-control
Bridge your session to claude.ai/code to continue from a browser or phone

/review
Run code review. Became an alias for /code-review in v2.1.223, so it reviews the current diff and can also take a GitHub PR number
Deprecated

Examples

/review
Review the current diff (same behavior as /code-review)
/review 1234
Review the given GitHub pull request number

/sandbox
Manage sandbox mode

Examples

/sandbox
View and configure sandbox settings

/skills
List available skills

Examples

/skills
Display configured skills

/stickers
Manage stickers

Examples

/stickers
View and manage available stickers

/upgrade
Upgrade your plan
Available depending on environment/settings

Examples

/upgrade
View plan upgrade options

/voice
Toggle voice input mode
Available depending on environment/settings

Examples

/voice
Enable or disable voice input mode

/add-dir
Add a working directory to the session

Examples

/add-dir ../other-project
Add access to another directory in the current session

/branch
Create a branch of the current conversation

Examples

/branch
Branch the current conversation at this point
/branch my-experiment
Create a named conversation branch

/insights
Generate a session analysis report
Available depending on environment/settings

Examples

/insights
Generate a report analyzing usage patterns and interaction insights

/passes
Share a free week of Claude Code
Available depending on environment/settings

Examples

/passes
Share a free week pass of Claude Code with friends

/release-notes
View the changelog

Examples

/release-notes
View the full changelog with the most recent version

/remote-env
Configure remote environment

Examples

/remote-env
Configure the default remote environment for web sessions started with --remote

/schedule
Manage Cloud scheduled tasks

Examples

/schedule
Create, update, list, or run Cloud scheduled tasks conversationally

/security-review
Analyze pending changes for security vulnerabilities

Examples

/security-review
Review the current branch's git diff for security risks

/setup-bedrock
Configure Amazon Bedrock authentication, region, and model pins through an interactive wizard
Available depending on environment/settings

Examples

/setup-bedrock
Walks you through AWS auth, region, credential verification, and model selection (visible only when CLAUDE_CODE_USE_BEDROCK=1)

/setup-vertex
Configure Google Vertex AI authentication, project, region, and model pins through an interactive wizard
Available depending on environment/settings

Examples

/setup-vertex
Walks you through GCP auth, project, region, credential verification, and model selection (visible only when CLAUDE_CODE_USE_VERTEX=1)

/ultraplan
Draft, review, and execute a plan in an ultraplan session
Available until v2.1.221 (removed in v2.1.222)

Examples

/ultraplan refactor the auth module
Draft a plan, review it in your browser, then execute remotely or locally

/autofix-pr
Spawn a web session that watches the current branch's PR and auto-fixes CI failures and review comments
Available depending on environment/settings

Examples

/autofix-pr
Watch the current branch's PR and push fixes for CI failures and review comments (requires gh CLI)
/autofix-pr only fix lint and type errors
Pass a prompt to narrow the fix scope

/web-setup
Connect your GitHub account to Claude Code on the web using local gh CLI credentials

Examples

/web-setup
Connect your GitHub account to Claude Code on the web using your local gh CLI credentials

/team-onboarding
Generate teammate ramp-up documentation from local usage patterns

Examples

/team-onboarding
Analyze project usage patterns and generate onboarding documentation for team members

/claude-api
Load Claude API reference for your project's language (Bundled Skill)

Examples

/claude-api
Load Claude API reference material for your project's language (Python, TypeScript, etc.)

/loop
Run a prompt repeatedly on an interval (Bundled Skill)

Examples

/loop 5m check if the deploy finished
Run a prompt every 5 minutes
/loop
Run an autonomous maintenance check (Claude self-paces the interval)

/vim
Toggle Vim editing mode
Available until v2.1.91 (removed in v2.1.92)

Examples

/vim
Switch between Vim mode and Normal mode for input editing

/proactive
Alias for /loop (run a prompt repeatedly)
Alias for /loop

Examples

/proactive
Run an autonomous maintenance check (same behavior as /loop)
/proactive 5m check if the deploy finished
Run a prompt repeatedly every 5 minutes

/recap
Generate an on-demand summary of the current session (added in v2.1.108)

Examples

/recap
Produce a one-line summary of the session so far. A recap also appears automatically after you've been away

/tui
Switch between default and fullscreen renderers (added in v2.1.110)

Examples

/tui fullscreen
Relaunch into the flicker-free alt-screen renderer, preserving the conversation
/tui
Print the currently active renderer

/focus
Toggle focus view — only last prompt, one-line tool summary, and final response (added in v2.1.110)

Examples

/focus
Show a distraction-free view. The selection persists across sessions. Only available in fullscreen rendering

/ultrareview
Run a deep multi-agent code review in a cloud sandbox (added in v2.1.111, Skill)

Examples

/ultrareview
Review the current branch using parallel multi-agent analysis (3 free runs on Pro/Max, then requires extra usage)
/ultrareview 123
Fetch and review a specific GitHub PR

/fewer-permission-prompts
Scan transcripts and propose a prioritized Bash/MCP allowlist (added in v2.1.111 as /less-permission-prompts, later renamed, Skill)

Examples

/fewer-permission-prompts
Scan your transcripts for common read-only Bash and MCP tool calls and add a prioritized allowlist to project .claude/settings.json

/heapdump
Write a JavaScript heap snapshot and memory breakdown for diagnosing high memory usage

Examples

/heapdump
Save a heap snapshot and memory breakdown to ~/Desktop

/radio
Open Claude FM lo-fi radio in your browser (not available on Bedrock, Vertex, or Foundry; prints the stream URL when no browser is available)
Available depending on environment/settings

Examples

/radio
Launch Claude FM lo-fi radio

/goal
Set a completion condition: Claude keeps working across turns until the goal is met. With no argument, shows the current or most recently achieved goal.

Examples

/goal all tests pass
Keep working across turns until the condition is met
/goal clear
Remove the active goal early

/scroll-speed
Adjust mouse wheel scroll speed interactively with a ruler you can scroll to preview the change. Available in fullscreen rendering only (not in JetBrains IDE terminal).

Examples

/scroll-speed
Open the interactive scroll speed dialog

/background
Detach the current session to run as a background agent and free this terminal. Optionally pass a prompt to send one more instruction before detaching. Monitor sessions with claude agents. Alias: /bg.

Examples

/background
Detach the current session and continue running in the background
/background investigate the flaky auth test
Send a final instruction, then detach

/stop
Stop the current background session. Only available while attached to a background session; the transcript and any worktree are kept. To detach without stopping, use /exit or press the left arrow key.

Examples

/stop
Stop the attached background session (transcript preserved)

/run
Launch and drive your project's app to confirm a change works in the running app, not just in tests (bundled skill, requires v2.1.145 or later).

Examples

/run
Launch and drive the app to see a change working

/verify
Confirm a code change does what it should by building your project's app, running it, and observing the result, rather than relying on tests or type checks (bundled skill, requires v2.1.145 or later).

Examples

/verify
Build and run the app to verify a change

/run-skill-generator
Teach /run and /verify how to build, launch, and drive your project's app from a clean environment by writing a per-project skill (bundled skill, requires v2.1.145 or later).

Examples

/run-skill-generator
Generate a per-project skill for /run and /verify

/code-review
Review changed code for correctness bugs and optionally apply fixes. Full syntax is /code-review [low|medium|high|xhigh|max|ultra] [--fix] [--comment] [target]; when the effort level is omitted it reuses the level you last typed (v2.1.223 and later)

Examples

/code-review
Review the current diff at your last-used effort level to surface correctness bugs
/code-review high
Switch the effort level to high for broader coverage (may include uncertain findings)
/code-review ultra
Run the deepest cloud-backed review at maximum effort
/code-review --comment
Post review findings as inline GitHub PR comments
/code-review --fix
Apply reuse, simplification, and efficiency suggestions to the working tree after review
/code-review 1234
Pass a PR number as the target to review that pull request

/reload-skills
Re-scan skill directories without restarting the session

Examples

/reload-skills
Pick up newly installed skills in the current session

/workflows
Open the workflow progress view to watch, pause, resume, or save running and completed workflows

Examples

/workflows
List dynamic workflow runs and monitor or control their progress

/deep-research
Fan out web searches on a question, fetch and cross-check sources, and synthesize a cited report (bundled Workflow)

Examples

/deep-research What are the latest trends in React state management?
Run parallel web searches, verify sources, and produce a research report with citations

/cd
Move the session to a new working directory without breaking the prompt cache mid-session. From v2.1.246 the new directory's project settings, hooks, `.mcp.json` servers, skills, and agents take effect right after the move instead of on `--resume`

Examples

/cd ../other-project
Switch the working directory while keeping the prompt cache intact

Escape
Interrupt current operation / clear input

Examples

Escape
Stop running operations or clear current input

Tab
Auto-complete file paths

Examples

Tab
Complete file paths and commands while typing

Enter
Send message

Examples

Enter
Send the typed message to Claude

Shift+Tab
Cycle permission modes. On Windows, use Alt+M when the Node or Bun runtime doesn't enable VT input mode

Examples

Shift+Tab
Cycle through default (labeled Manual in the mode indicator), acceptEdits, plan, and any modes you have enabled, such as auto or bypassPermissions

Up Arrow
Move cursor or navigate command history. Also bound to Down Arrow, Ctrl+P, and Ctrl+N

Examples

Up Arrow
When the input spans more than one visual row, first moves the cursor within the prompt. Once the cursor is on the first or last visual row, pressing again navigates command history

Ctrl+B
Background running tasks

Examples

Ctrl+B
Background bash commands and agents (tmux users press twice)

Ctrl+C
Interrupt current operation

Examples

Ctrl+C
Stop running tasks or commands

Ctrl+D
Exit session

Examples

Ctrl+D
End the Claude Code session

Ctrl+G
Open in default text editor

Examples

Ctrl+G
Edit your prompt in $VISUAL/$EDITOR. Enable 'Show last response in external editor' in /config to prepend Claude's previous reply as #-commented context

Ctrl+J
Insert newline

Examples

Ctrl+J
Add a newline while typing

Ctrl+K
Kill from cursor to end of line

Examples

Ctrl+K
Delete text from cursor to end of line

Ctrl+L
Clear prompt input and redraw screen

Examples

Ctrl+L
Clears typed text and forces a full terminal redraw. Use this to recover if the display becomes garbled

Ctrl+O
Toggle verbose output

Examples

Ctrl+O
Enable or disable verbose output mode

Ctrl+R
Reverse search command history

Examples

Ctrl+R
Incrementally search through command history

Ctrl+T
Toggle task list visibility

Examples

Ctrl+T
Show or hide the task list panel

Ctrl+U
Clear entire input buffer (paste back with Ctrl+Y)

Examples

Ctrl+U
Clears the entire input buffer. Stores the cleared text so Ctrl+Y can paste it back (changed in v2.1.111)

Ctrl+V
Paste image from clipboard. Also bound to Cmd+V (iTerm2) and Alt+V (Windows and WSL)

Examples

Ctrl+V
Inserts an [Image #N] chip at the cursor so you can reference it positionally in your prompt. On WSL, both Ctrl+V and Alt+V are bound; use Alt+V if your terminal intercepts Ctrl+V

Ctrl+Y
Yank (paste) killed text

Examples

Ctrl+Y
Paste text deleted with Ctrl+K or Ctrl+U

Ctrl+X Ctrl+K
Kill all background agents

Examples

Ctrl+X Ctrl+K
Stop all running background agents (press twice within 3s to confirm)

Ctrl+X Ctrl+E
Open in external editor

Examples

Ctrl+X Ctrl+E
Edit prompt in default text editor (readline-native alias for Ctrl+G)

Esc+Esc
Rewind or summarize conversation

Examples

Esc+Esc
Rewind recent changes or summarize conversation

Option+P
Switch model

Examples

Option+P
Quickly switch the AI model

Option+T
Toggle extended thinking

Examples

Option+T
Enable or disable extended thinking mode

Option+O
Toggle fast mode

Examples

Option+O
Toggle fast mode on or off (same model, faster output)

Shift+Enter
Insert newline (supported terminals)

Examples

Shift+Enter
Add a newline while typing in supported terminals

Alt+B
Move back one word

Examples

Alt+B
Move cursor one word to the left

Alt+F
Move forward one word

Examples

Alt+F
Move cursor one word to the right

Alt+Y
Cycle paste history

Examples

Alt+Y
After Ctrl+Y, cycle through previously deleted text

Ctrl+E
Move cursor to end of current line

Examples

Ctrl+E
In multiline input, moves to the end of the current logical line

Ctrl+A
Move cursor to start of current line

Examples

Ctrl+A
In multiline input, move the cursor to the start of the current logical line (readline-compatible since v2.1.113)

Ctrl+W
Delete previous word

Examples

Ctrl+W
Delete the word before the cursor. Deleted text is stored for pasting with Ctrl+Y (on Windows, Ctrl+Backspace also deletes the previous word)

Hold Space
Push-to-talk voice dictation
Available depending on environment/settings

Examples

Hold Space
Hold spacebar to start voice dictation. Release to confirm input

\ + Enter
Multiline input (Quick escape)

Examples

\ + Enter
Type backslash then Enter to insert a newline. Works in all terminals

Option+Enter
Multiline input (macOS default)

Examples

Option+Enter
Default macOS key for inserting a newline

Left/Right
Cycle through dialog tabs

Examples

Left/Right
Navigate between tabs in permission dialogs and menus

/
Command and skill input

Examples

/
Type at the start of a prompt to show available commands and skills

!
Bash mode (direct command execution)

Examples

! npm test
Run a shell command directly and add its output to the conversation

@
File path autocomplete. From v2.1.232, typing at least one letter after @ also suggests your other live sessions on this machine, so you can name the session Claude should message.

Examples

@
Trigger file path autocomplete for mentioning files
@api-worker
Mention another live session to name the message target (v2.1.232+)

?
Toggle the keyboard shortcut help panel in the transcript viewer. Requires fullscreen rendering.
Available depending on environment/settings

Examples

?
Show the shortcut reference panel

{ / }
Jump to the previous or next user prompt in the transcript viewer (vim paragraph motion). Requires fullscreen rendering.
Available depending on environment/settings

Examples

{
Jump to the previous user prompt
}
Jump to the next user prompt

v
Write the conversation to a temporary file and open it in $VISUAL or $EDITOR from the transcript viewer. Requires fullscreen rendering.
Available depending on environment/settings

Examples

v
Open the conversation in your editor

[
Write the full conversation to your terminal's native scrollback from the transcript viewer, so Cmd+F, tmux copy mode, and other native tools can search it. Requires fullscreen rendering.
Available depending on environment/settings

Examples

[
Write the conversation to scrollback for native search

q
Exit the transcript viewer and return to the normal view. Ctrl+C and Esc do the same, and all three can be rebound via transcript:exit.
Available depending on environment/settings

Examples

q
Close the transcript viewer and return to the normal view

claude
Start interactive mode

Examples

claude
Launch Claude Code in interactive mode

claude "prompt"
Run in one-shot mode

Examples

claude "Is there a bug in this code?"
Execute a one-time question and exit

claude -p "prompt"
Run in pipe mode (stdin support)

Examples

cat file.py | claude -p "Review this code"
Process data from standard input

claude -c
Continue the last conversation

Examples

claude -c
Resume from the previous session's conversation

claude -r
Resume a session by ID or name

Examples

claude -r
Select and resume from session list
claude -r session-name
Resume a specific named session

claude --version
Output the version number (short form: -v)

Examples

claude --version
Print the installed Claude Code version
claude -v
Print the version with the short flag

claude --model
Specify the model to use (alias or full name)

Examples

claude --model sonnet
Launch with a model alias
claude --model claude-sonnet-4-6
Launch with a full model name

claude --permission-mode
Specify permission mode (default/acceptEdits/plan/auto/dontAsk/bypassPermissions). As of v2.1.200, default is labeled "Manual" in the UI, and manual is accepted as an alias

Examples

claude --permission-mode plan
Launch in plan mode (confirm before execution)
claude --permission-mode auto
Launch directly in auto mode (replaces the removed --enable-auto-mode flag)

claude --debug
Launch in debug mode

Examples

claude --debug
Launch with debug information enabled
claude -d "api,hooks"
Show debug info for specific categories only

claude --verbose
Enable verbose logging

Examples

claude --verbose
Launch with detailed debug logging

claude --system-prompt
Customize system prompt

Examples

claude --system-prompt "You are a TypeScript expert"
Launch with a custom system prompt

claude --system-prompt-file
Load system prompt from file

Examples

claude --system-prompt-file ./prompt.txt
Replace system prompt with file contents

claude --append-system-prompt
Append to default system prompt

Examples

claude --append-system-prompt "Always respond in English"
Keep the default system prompt and add custom instructions

claude --append-system-prompt-file
Append system prompt from file

Examples

claude --append-system-prompt-file ./rules.txt
Append file contents to the default system prompt

claude --exclude-dynamic-system-prompt-sections
Move dynamic system prompt sections to user message

Examples

claude -p --exclude-dynamic-system-prompt-sections "query"
Move cwd, env info, git status from system prompt to user message for better cross-user prompt cache reuse

claude --effort
Set effort level (low/medium/high/xhigh/max)

Examples

claude --effort high
Set model reasoning level to high
claude --effort xhigh
Use xhigh effort (Opus 4.7 only; other models fall back to high)

claude --worktree
Create isolated environment with Git worktree

Examples

claude --worktree
Run in an isolated Git worktree environment

claude --tmux
Open worktree in a tmux session

Examples

claude --worktree --tmux
Launch worktree in a tmux session (uses iTerm2 native panes when available)

claude --bare
Minimal mode — skip hooks, LSP, plugin sync, and more

Examples

claude --bare -p "query"
Run in minimal mode (skips hooks, LSP, plugin sync, auto-memory)

claude --allowedTools
Specify allowed tools

Examples

claude --allowedTools "Bash,Read,Write"
Restrict available tools on launch

claude --disallowedTools
Specify disallowed tools

Examples

claude --disallowedTools "Bash"
Completely exclude specified tools from model context

claude --tools
Specify the set of available tools

Examples

claude --tools "Bash,Edit,Read"
Explicitly specify which built-in tools to use
claude --tools ""
Disable all tools

claude --dangerously-skip-permissions
Bypass all permission checks (sandbox only)

Examples

claude --dangerously-skip-permissions
Skip all permission checks in offline sandbox environments

claude --allow-dangerously-skip-permissions
Enable permission bypass as an option

Examples

claude --allow-dangerously-skip-permissions
Allow permission bypass without enabling it by default

claude --permission-prompt-tool
Specify MCP tool for permission prompts

Examples

claude -p --permission-prompt-tool mcp_auth "query"
Delegate permission prompts to an MCP tool in non-interactive mode

claude --output-format
Specify output format (text/json/stream-json)

Examples

claude -p "test" --output-format json
Output results in JSON format

claude --input-format
Specify input format (text/stream-json)

Examples

claude -p --input-format stream-json
Run with realtime streaming input format (--print mode only)

claude --json-schema
Structured output with JSON Schema

Examples

claude -p "user info" --json-schema '{"type":"object"}'
Get structured output conforming to the specified JSON Schema

claude --include-partial-messages
Include partial message chunks

Examples

claude -p --output-format stream-json --include-partial-messages
Include partial message chunks in streaming output

claude --replay-user-messages
Echo user messages to stdout

Examples

claude -p --input-format stream-json --output-format stream-json --replay-user-messages
Re-emit stdin user messages to stdout for acknowledgment

claude --include-hook-events
Include hook lifecycle events in output

Examples

claude -p --output-format stream-json --include-hook-events "query"
Include hook events (PreToolUse, PostToolUse, etc.) in stream output

claude --max-turns
Limit agentic turns

Examples

claude -p --max-turns 3 "query"
Stop agent after 3 turns (print mode only)

claude --prompt-suggestions
Enable prompt suggestions (in print/SDK mode, emits a prompt_suggestion message after each turn with a predicted next user prompt)

Examples

claude -p --prompt-suggestions --output-format stream-json --verbose "query"
Emit a suggested next prompt after each turn (requires stream-json + verbose)

claude --agent
Specify the agent to use

Examples

claude --agent my-agent
Start session with a specified agent configuration

claude --agents
Define custom agents as inline JSON

Examples

claude --agents '{"reviewer":{"description":"Reviews code","prompt":"You are a code reviewer"}}'
Define and use custom agents inline

claude --brief
Enable SendUserMessage tool for agent-to-user communication

Examples

claude --brief
Launch with the SendUserMessage tool enabled for agent-to-user messaging

claude --mcp-config
Load MCP server config from file

Examples

claude --mcp-config mcp.json
Load MCP server settings from a JSON file on launch

claude --strict-mcp-config
Use only MCP servers from --mcp-config

Examples

claude --mcp-config mcp.json --strict-mcp-config
Use only the specified MCP servers, ignoring all other MCP configurations

claude --mcp-debug
Enable MCP debug mode (use --debug instead)
Available until v2.1.218 (removed in v2.1.219 or later)

Examples

claude --mcp-debug
Show MCP server errors (use --debug on current versions)

claude --disable-slash-commands
Disable all skills (slash commands)

Examples

claude --disable-slash-commands
Launch with all custom skills disabled

claude --channels
Specify channel notification MCP servers

Examples

claude --channels plugin:notifier@marketplace
Listen for channel notifications from specified MCP servers

claude --dangerously-load-development-channels
Load development channels

Examples

claude --dangerously-load-development-channels server:webhook
Load channels not on the approved allowlist for local development

claude --teammate-mode
Set agent team display mode

Examples

claude --teammate-mode tmux
Set teammate display: auto, in-process, or tmux

claude --name
Set a display name for the session

Examples

claude -n "feature-auth"
Set a name shown in /resume and terminal title

claude --fork-session
Create new session ID when resuming

Examples

claude -c --fork-session
Continue conversation as a new session

claude --session-id
Specify a session ID

Examples

claude --session-id <uuid>
Start or resume a session with a specific UUID

claude --no-session-persistence
Disable session persistence

Examples

claude -p --no-session-persistence "test"
Run as a temporary session that is not saved and cannot be resumed

claude --from-pr
Resume session linked to a GitHub PR

Examples

claude --from-pr 123
Resume a session associated with the specified PR number

claude --fallback-model
Specify a fallback model

Examples

claude -p "test" --fallback-model sonnet
Automatically switch to the fallback model when the primary is overloaded or not found. Pass a comma-separated list to try each in order (also applies to interactive sessions as of v2.1.166)

claude --max-budget-usd
Set API spending limit

Examples

claude --max-budget-usd 10
Set maximum API spending in USD for the session

claude --add-dir
Add additional working directories

Examples

claude --add-dir /path/to/other-project
Specify additional directories alongside the main directory

claude --file
Download file resources at startup

Examples

claude --file file_abc:doc.txt file_def:img.png
Download specified file resources on startup

claude --chrome
Enable Chrome integration

Examples

claude --chrome
Launch with Claude in Chrome integration enabled

claude --no-chrome
Disable Chrome integration

Examples

claude --no-chrome
Launch with Claude in Chrome integration disabled

claude --ide
Enable automatic IDE connection

Examples

claude --ide
Auto-connect to available IDE on startup

claude --plugin-dir
Load a plugin from a directory or .zip archive (repeatable, .zip support added in v2.1.128)

Examples

claude --plugin-dir /path/to/plugins
Load plugins from the specified directory on launch
claude --plugin-dir A --plugin-dir B.zip
Load multiple plugins, mixing directory and .zip archive sources

claude --plugin-url
Fetch a .zip plugin archive from a URL for the current session only (repeatable, added in v2.1.129)

Examples

claude --plugin-url https://example.com/plugin.zip
Download and load a .zip plugin archive from the given URL
claude --plugin-url A --plugin-url B
Load plugin archives from multiple URLs in one session

claude --remote
Create a web session on claude.ai (deprecated alias for --cloud)
Deprecated alias for --cloud

Examples

claude --remote "Fix the login bug"
Send task to claude.ai and start a web session (prefer --cloud)

claude --remote-control
Start with Remote Control enabled

Examples

claude --remote-control
Start an interactive session controllable from claude.ai or the Claude app

claude --remote-control-session-name-prefix
Set prefix for Remote Control session names

Examples

claude --remote-control-session-name-prefix my-project
Generate session names like "my-project-graceful-unicorn" with a custom prefix

claude --teleport
Resume a web session locally

Examples

claude --teleport
Move a web session from claude.ai to your local terminal

claude --settings
Load settings from file or JSON string

Examples

claude --settings settings.json
Launch with a custom settings file

claude --setting-sources
Specify setting sources to load

Examples

claude --setting-sources user,project
Load only user and project settings

claude --debug-file
Write debug logs to a file

Examples

claude --debug-file /tmp/claude-debug.log
Write debug logs to the specified file path

claude --betas
Include beta headers (API key users)

Examples

claude --betas feature-name
Include beta headers in API requests

claude --init
Run initialization hooks and start

Examples

claude --init
Run initialization hooks then start interactive mode

claude --init-only
Run initialization hooks and exit

Examples

claude --init-only
Run initialization hooks without starting a session

claude --maintenance
Run maintenance hooks and exit

Examples

claude --maintenance
Run maintenance hooks and exit

claude auth
Manage authentication (login/logout/status)

Examples

claude auth login
Log in to your Anthropic account
claude auth logout
Log out of the current account

claude auth login
Sign in to your Anthropic account

Examples

claude auth login
Sign in to your Anthropic account through the browser

claude auth logout
Log out from your Anthropic account

Examples

claude auth logout
Discard the stored credentials and sign out

claude auth status
Show authentication status as JSON

Examples

claude auth status
Check the signed-in account and auth method as JSON

claude agents
List configured agents

Examples

claude agents
Display list of available agents

claude mcp
MCP server management commands

Examples

claude mcp add server-name -s user -- command
Add an MCP server
claude mcp list
List configured MCP servers

claude plugin
Plugin management

Examples

claude plugin list
List installed plugins

claude plugins
Alias for claude plugin. claude --help lists it as plugin|plugins, so either spelling runs the same subcommand
Alias for claude plugin

Examples

claude plugins list
List installed plugins (same as claude plugin list)

claude doctor
Check auto-updater health

Examples

claude doctor
Diagnose auto-updater status

claude update
Update Claude Code to latest version

Examples

claude update
Update to the latest version

claude upgrade
Alias for claude update. claude --help lists it as update|upgrade, so either spelling runs the same subcommand
Alias for claude update

Examples

claude upgrade
Update to the latest version (same as claude update)

claude install
Install Claude Code or manage versions

Examples

claude install
Install Claude Code or switch to a specific version

claude setup-token
Set up long-lived authentication token

Examples

claude setup-token
Configure a long-lived authentication token for CI/CD environments

claude auto-mode
Inspect auto mode classifier configuration

Examples

claude auto-mode
View and inspect the auto mode classifier configuration

claude auto-mode defaults
Print the built-in default configuration for the auto mode classifier

Examples

claude auto-mode defaults
Check the initial values before your settings override them

claude auto-mode config
Show the effective auto mode configuration with your settings applied

Examples

claude auto-mode config
Check the final configuration after your settings are merged into the defaults

claude remote-control
Start Remote Control server

Examples

claude remote-control --name "My Project"
Start a Remote Control server to connect your environment to claude.ai

claude ultrareview
Run a cloud-hosted multi-agent code review of the current branch (or a PR number / base branch) and print the findings

Examples

claude ultrareview
Review the current branch and print findings to stdout
claude ultrareview 123
Review pull request #123 non-interactively (use --json for raw output)

claude project
Manage Claude Code project state (added in v2.1.126)

Examples

claude project --help
Show available subcommands
claude project purge
Delete project state (transcripts / tasks / file history / config entry)

claude project purge
Delete all Claude Code state for a project (transcripts, tasks, file history, config entry) — added in v2.1.126

Examples

claude project purge
Delete project state for the current directory (with confirmation prompt)
claude project purge --dry-run
List what would be deleted without deleting anything
claude project purge --all -y
Purge state for every project, skipping confirmation
claude project purge ~/dev/myproject -i
Interactively prompt for each item before deleting state at the given path

claude import
Start an interactive session that imports config from another AI coding agent (Codex or Gemini) into Claude Code

Examples

claude import codex
Read the Codex config and choose interactively what to import
claude import gemini --dry-run
Preview what would be imported without changing anything
claude import codex --yes
Skip the confirmation prompts and import right away

claude --bg
Start the session as a background agent and return immediately. Prints the session ID and the commands to manage it. Combine with --agent to run a specific subagent.

Examples

claude --bg "investigate the flaky test"
Spawn a background agent with an initial task and free this terminal
claude --bg --agent reviewer "review the PR"
Run a specific subagent type as a background agent

claude --safe-mode
Start with all customizations (CLAUDE.md, skills, plugins, hooks, MCP servers, and more) disabled for troubleshooting a broken configuration

Examples

claude --safe-mode
Start with every customization disabled to isolate a broken config (admin-managed policy settings still apply)

claude --advisor
Enable the server-side advisor tool for this session with a model alias (opus, sonnet, or fable) or a full model ID

Examples

claude --advisor opus
Enable the advisor tool with the opus model (takes precedence over the advisorModel setting)

claude --ax-screen-reader
Render screen-reader friendly output: flat text without decorative borders or animations (forces the classic renderer)

Examples

claude --ax-screen-reader
Start in screen-reader mode (takes precedence over the tui and axScreenReader settings)

claude mcp login
Authenticate with an MCP server (HTTP, SSE, or claude.ai connector) from the CLI without opening the /mcp menu. Use --no-browser for SSH/headless sessions (added in v2.1.186)

Examples

claude mcp login server-name
Authenticate the specified MCP server via the browser
claude mcp login server-name --no-browser
Print the authorization URL for SSH/headless sessions (paste the redirect URL back)

claude mcp logout
Clear stored OAuth credentials for an MCP server (added in v2.1.186)

Examples

claude mcp logout server-name
Remove stored credentials for the specified MCP server

claude gateway
Run the enterprise auth/telemetry gateway. Use --config to point to a gateway YAML config file

Examples

claude gateway
Start the enterprise auth/telemetry gateway
claude gateway --config ./gateway.yaml
Start the gateway with the specified YAML config

/dataviz
Bundled skill for chart and dashboard design guidance with a runnable color-palette validator (added in v2.1.198)

Examples

/dataviz
Load design guidance before building any chart or dashboard

/advisor
Enable or disable the advisor tool, which consults a second model for guidance at key moments during a task. Accepts opus, sonnet, fable, or a full model ID; without an argument, opens a picker (v2.1.98+)

Examples

/advisor opus
Enable Opus as the advisor model
/advisor off
Disable the advisor tool

/design-login
Authorize design-system access for /design-sync with your claude.ai account

Examples

/design-login
Authenticate before uploading to Claude Design

/design-sync
Bundled skill that converts your repo's React design system and uploads it to Claude Design, so generated designs use your real components (available on the Anthropic API; not on Bedrock/Vertex/Foundry)

Examples

/design-sync Acme DS
Upload the design system under a custom name

claude --cloud
Create a cloud session on claude.ai from a task description; pass a session ID (session_... / cse_...) or a claude.ai/code URL to target an existing session instead, where -p queues a message into it and omitting -p attaches your terminal

Examples

claude --cloud "Fix the login bug"
Send task to claude.ai and start a web session
claude --cloud session_abc123
Attach your terminal to an existing cloud session

claude --append-subagent-system-prompt
Append custom text to every subagent's system prompt (non-interactive mode only, v2.1.205+)

Examples

claude -p --append-subagent-system-prompt "Cite file paths in every answer" "query"
Append an instruction to every subagent's system prompt, including nested subagents

claude attach
Open a background session in this terminal (return to agent view with ←, or drop back to your shell with Ctrl+Z — the session keeps running either way)

Examples

claude attach 7c5dcf5d
Attach to a background session to resume interacting with it

claude daemon
Manage the lifecycle of the daemon process that supervises background sessions (run/status/logs/uninstall/stop)

Examples

claude daemon status
Show the daemon's pid, version, and uptime

claude daemon status
Print the background-session daemon's current status

Examples

claude daemon status
Check the daemon's pid, version, and uptime

claude daemon stop --any
Stop the background-session daemon (--any stops a running daemon regardless of its version)

Examples

claude daemon stop --any
Stop the daemon even when it runs a different version

claude logs
Print a background session's recent terminal output

Examples

claude logs 7c5dcf5d
View the output of a specific background session

claude respawn
Restart a background session (or all of them with --all) so it picks up the current Claude binary

Examples

claude respawn 7c5dcf5d
Restart a specific background session

claude rm
Delete a background session and its worktree. Unlike stop, this works on already-exited sessions

Examples

claude rm 7c5dcf5d
Delete a background session that has already exited

claude stop
Stop a background session. Its conversation is kept; resume it later with claude attach

Examples

claude stop 7c5dcf5d
Stop a running background session

claude kill
Alias for claude stop that stops a background session (documented in the official claude stop description)
Alias for claude stop

Examples

claude kill 7c5dcf5d
Stop a running background session (same as claude stop)

/subtask
Send a subagent off with your full context to work on a task in the current session; its result comes back here (added in v2.1.212, taking over the in-session subagent role /fork used to have)

Examples

/subtask <task>
Have an in-session subagent work on the given task

Ctrl+S
Stash or restore prompt. With text in the input, stashes it and clears the prompt. Pressed again on an empty prompt, restores the stashed text, cursor position, and pasted content

Examples

Ctrl+S
Stash the current input, or restore previously stashed input

Ctrl+Z
Suspend Claude Code (Unix only). Suspends the process to your shell; run fg to resume
Available depending on environment/settings

Examples

Ctrl+Z
Suspend Claude Code and return to the shell

claude --forward-subagent-text
Forward subagent text and thinking blocks as assistant/user messages with parent_tool_use_id set (only works with --print and --output-format=stream-json; requires v2.1.211 or later)

Examples

claude -p --output-format stream-json --verbose --forward-subagent-text "query"
Include subagent text and thinking in the stream-json output

claude auto-mode reset
Restore the default auto-mode configuration, with a confirmation prompt (pass --yes to skip) (added in v2.1.212)

Examples

claude auto-mode reset
Reset auto-mode configuration with a confirmation prompt
claude auto-mode reset --yes
Reset auto-mode configuration without confirmation

/bug
Report a bug or share the current conversation. When connected directly to Anthropic it is sent to Anthropic; when using a third-party provider it is saved locally to ~/.claude/feedback-bundles/ (added in v2.1.216; alias /share)

Examples

/bug
Share a bug report or the conversation after a consent step
/share
Alias of /bug; opens the same sharing dialog

Ctrl+_
Undo the last input edit, restoring the input text and cursor position (alternate key: Ctrl+Shift+-)

Examples

Ctrl+_
Undo the last input edit and restore the previous state

:
Emoji shortcode autocomplete in the prompt input. Type a full :name: to insert the emoji, or two or more characters for suggestions (requires v2.1.217 or later)

Examples

:heart:
Insert ❤️
:hea
Show suggestions after two or more characters

?
Press ? on an empty prompt to toggle the shortcut help panel. Typing ? when the input already contains text inserts the character instead

Examples

?
Toggle the shortcut help panel on an empty prompt

/autocompact
Set the auto-compact window: how full the context window gets before Claude Code compacts automatically. Pass a size such as 500k, or auto to return to the window tuned for your model (available in v2.1.221 or later)

Examples

/autocompact
Open a dialog showing the current auto-compact window
/autocompact 500k
Set the auto-compact window to 500k tokens and save it to your user settings
/autocompact auto
Reset to the window tuned automatically for your model

/import [codex|gemini] [--dry-run] [--yes]
Import config from another AI coding agent (Codex or Gemini) into Claude Code. Use --dry-run to preview what would be imported, or --yes to skip the confirmation prompts

Examples

/import codex
Import the Codex config, choosing interactively what to bring over
/import gemini --dry-run
Preview what would be imported from Gemini without changing anything

/list-agents
List the subagents and other Claude Code sessions Claude can message, with the name to use for each. Also available as /peers (requires v2.1.224 or later)

Examples

/list-agents
Check the names you can use to message an agent or session

claude --autocompact
Set the auto-compact window for this session only, without changing your saved settings (pass auto or a token size; available in v2.1.221 or later)

Examples

claude --autocompact 500k
Launch with the auto-compact window set to 500k tokens for this session
claude --autocompact auto
Launch with the auto-compact window tuned automatically for your model

claude --environment
With -p, create a new cloud session on the given self-hosted environment (ccpool_...) and exit without waiting for a reply (cannot be combined with --cloud; available in v2.1.224 or later)

Examples

claude -p "Run the smoke test" --environment ccpool_abc123
Create a cloud session on that self-hosted environment (run it from a git checkout so the repository is auto-detected)
claude -p "Run the smoke test" --environment ccpool_abc123 --output-format json
Get the new session ID as JSON for use from a CI script

claude --ref
With --environment (or --cloud), base the new cloud session's checkout on the named branch or ref instead of your local HEAD (available in v2.1.224 or later)

Examples

claude -p "Run the regression tests" --environment ccpool_abc123 --ref main
Create the session on the self-hosted environment with its checkout based on main
claude -p "Verify this fix" --environment ccpool_abc123 --ref release/2026-08
Base the session on a release branch so it is unaffected by your local working state

claude self-hosted-runner
Start your own machine or container as a runner so Claude Code web, mobile, and desktop sessions can run on it (public beta on Team and Enterprise plans; added in v2.1.224)

Examples

claude self-hosted-runner --environment-secret-file ./runner-secret
Start the runner with the environment secret read from a file (the SELF_HOSTED_RUNNER_ENVIRONMENT_SECRET environment variable also works)
claude self-hosted-runner --capacity 4
Start the runner with up to 4 concurrent sessions (the default is 1)

Ctrl+E
Toggle show all content in the transcript viewer. Available in the classic renderer only, not in fullscreen rendering
Available depending on environment/settings

Examples

Ctrl+E
Toggle full content visibility in the transcript viewer opened with Ctrl+O

Ctrl+T
Toggle syntax highlighting for code blocks. Only works inside the /theme picker menu
Available depending on environment/settings

Examples

Ctrl+T
With the /theme picker open, control whether code in Claude's responses uses syntax coloring

claude --bg --exec
Run a shell command as a PTY-backed background job instead of starting a Claude session. Must be combined with --bg — claude --exec on its own fails with unknown option

Examples

claude --bg --exec 'pytest -x'
Run the test suite as a background job and get the terminal back immediately (no Claude session is started)
claude --bg --exec 'npm run dev'
Start the dev server as a background job, managed with the session ID and commands printed at launch

/artifacts
List the artifacts you own or that are shared with you, then attach one to the session, open it in your browser, or copy its link (available in v2.1.208 and later; attaching with Enter requires v2.1.216)

Examples

/artifacts
Open the artifact list and attach one to the session

/auto-mode-setup
Draft `autoMode.environment` entries from your project and recent sessions, then review the draft and save it to your user settings (requires a Pro, Max, or Team plan and v2.1.228 or later; native Windows requires v2.1.233 or later)

Examples

/auto-mode-setup
Draft auto mode environment entries, review them, and save

Alt+D
Delete next word

Examples

Alt+D
Delete the word after the cursor through the space that follows it (or to the end of the word when `keybindingFlavor` is `readline`). Requires Option as Meta on macOS

/rate-limit-options
Show ways to keep working when a claude.ai usage limit blocks a request: wait and continue automatically when the limit resets, add usage credits, or upgrade your plan (requires a claude.ai subscription; hidden from the command menu, so type it in full)

Examples

/rate-limit-options
Review options for continuing after hitting a usage limit

claude --restricted
Start in restricted mode: removes the built-in tools that run commands or code and WebFetch (unless named individually in --tools), confines file tools to the working directories, skips user, project, and local settings files, and refuses bypassPermissions (available in v2.1.248 and later; CLAUDE_CODE_RESTRICTED=1 does the same)

Examples

claude --restricted -p "query"
Run from an evaluation harness on a shared machine without letting Claude Code run commands or read that machine's settings
claude --restricted --tools "Read,Grep" -p "query"
Name the tools to keep in restricted mode (the default preset does not bring the removed tools back)

/design
Bundled skill. Draft UI mockups, screen flows, landing pages, or posters as artboards on a single canvas, published as an artifact that runs a research preview of the Claude Design editor. Takes an optional brief as its argument (requires Claude Code v2.1.234 or later and a session where artifacts are available; unavailable on Amazon Bedrock, Google Cloud's Agent Platform, Microsoft Foundry, and Claude Platform on AWS, where artifacts are not supported)
Available depending on environment/settings

Examples

/design
Create a design canvas. Follow the command with a brief describing the screen or page you want, and the artboards are drafted from it

/workflow-authoring
Bundled skill. Load the reference for writing dynamic workflow scripts: the script API, resume behavior, quality patterns, and worked examples. Claude usually loads it on its own while writing a script; run it yourself before editing a saved script by hand (requires Claude Code v2.1.248 or later and a session where dynamic workflows are enabled)
Available depending on environment/settings

Examples

/workflow-authoring
Load the script API reference before hand-editing a saved workflow script

claude --permission-prompts
Choose where permission prompts go in non-interactive mode (--print): host | none. The none target, added in v2.1.259, automatically denies anything that would prompt, while the active permission mode (including auto mode) still decides everything else

Examples

claude -p --permission-prompts none "query"
Deny every would-be prompt automatically on an unattended headless host
claude -p --permission-prompts host "query"
Send permission prompts to the host

claude --system-prompt-snapshot
Toggle whether the system prompt is recorded once per conversation and reused as-is for later requests and resumes (on | off). On by default for the built-in prompt; passing --system-prompt or --append-system-prompt turns it off automatically

Examples

claude --system-prompt-snapshot off
Disable the snapshot so the system prompt is rebuilt on every request
claude --system-prompt-snapshot on
Record the system prompt once per conversation and reuse it (spelling out the default for the built-in prompt)

claude auto-mode critique
Get AI feedback on your custom auto mode rules (listed in the Commands section of `claude auto-mode --help`)

Examples

claude auto-mode critique
Have the AI review your configured auto mode rules and report back

claude --append-subagent-system-prompt-file
Load subagent system prompt append text from a file (for prompts too large to pass on the command line)

Examples

claude -p --append-subagent-system-prompt-file ./subagent-rules.txt "query"
Append the file's contents to every subagent's system prompt, nested subagents included

/skill-doctor
Show what each of your skills costs in context and how often it's used, so you can find skills to turn off

Examples

/skill-doctor
List the context cost and usage frequency of loaded skills

Key Updates (by Version)

Key changes organized based on Anthropic's official release notes.

v2.1.261 (September 4, 2026)

View official release

  • Added --append-subagent-system-prompt-file to read the subagent system prompt from a file, for prompts too large to pass on the command line
  • Added /skill-doctor to show which loaded skills go unused and what they cost in context, so you can prune them
  • Added an "Organization policy" line to /status and claude doctor that says why your organization's policy could not be loaded, such as a proxy not passing the endpoint through
  • Added bashOutputMaxChars and taskOutputMaxChars settings to raise how much command and background-task output Claude receives inline before it is saved to a file, up to 128K characters
  • Fixed typed or pasted characters occasionally landing out of order or being dropped during fast input or key repeat
  • Fixed the Bedrock setup wizard hanging when AWS or an AWS credential helper never responds; it now times out with a clear error
v2.1.260 (September 3, 2026)

View official release

  • Added a diff panel that opens beside the conversation in fullscreen mode and shows your uncommitted changes as Claude edits; toggle it with /diff
  • Added a likely cause for prompt-cache misses (e.g. tool definitions or system prompt changed, idle past the TTL) to /cost and the status line's prompt_cache field
  • Added /reload-plugins to headless sessions, so it appears in the Claude Code Desktop and SDK command lists
  • Added a text form of /advisor (/advisor, /advisor <model>, /advisor off) for the desktop app, Remote Control, and other headless (-p/Agent SDK) sessions
  • Fixed Edit/Write/Read permission rules whose path contains parentheses being dropped as invalid or ignored by the Bash sandbox, which left "read-only" folders writable
  • Reverted the 2.1.259 change applying Read() deny rules to Bash arguments; it denied npm run build under a Read(./**/build/**) rule in every mode and made cd … && grep prompt even in auto mode
  • No commands, flags, or shortcuts were added or removed (the 282 entries in this reference are unchanged)
v2.1.259 (September 2, 2026)

View official release

  • Added managedMcpServers managed setting so organizations can provide HTTP/SSE MCP servers to every user
  • Added --permission-prompts none to deny all would-be prompts automatically on unattended headless hosts, while the active permission mode still decides everything else
  • Added recognition of glab mr create/merge/close/reopen/note/update so GitLab merge requests show as MR !N in the collapsed tool summary and refresh the footer MR badge
  • Added --json to claude plugin validate for a machine-readable validation report
  • Fixed concurrent sessions silently reverting each other's ~/.claude.json changes (workspace trust resets, lost MCP/project state)
  • Fixed several worktree-isolation and background-workflow/agent stop-resume reliability issues
v2.1.258 (September 1, 2026)

View official release

  • Bug fixes only. Fixed a regression introduced in v2.1.255 that stopped Claude Code from launching on macOS 12 (Monterey)
  • Fixed remote and scheduled sessions failing with "user messages must have non-empty content" after a re-sent permission approval could not be applied
  • v2.1.253 through v2.1.256 were never released and are a gap in the sequence (no such versions exist in the upstream releases or tags)
  • No commands, flags, or shortcuts were added or removed (the 279 entries in this reference are unchanged)
v2.1.257 (September 1, 2026)

View official release

  • Added Claude Fable 5.1 (claude-fable-5-1), now the default Fable model (1M context, $10/$50 per Mtok)
  • Added a timeFormat setting for how times are displayed and a timeZone setting for which time zone to use
  • Added a Containment Escape rule to auto mode, so actions such as fetching cloud metadata credentials are no longer auto-approved
  • Added a one-time prompt in auto mode before the first file read outside the working directories (permissions.blockReadsOutsideWorkingDirectories)
  • Added s to /effort, so effort can be changed for the current session only, matching /model
  • Added the CLAUDE_CODE_SUBAGENT_MODEL_FORCE environment variable, a /doctor warning for stale sandbox mask files, and support for a gateway-supplied description in the /model picker; /btw history browsing moved from Left/Right to Shift+Left/Right (or [ / ])
  • No commands, flags, or shortcuts were added or removed (the 279 entries in this reference are unchanged; the items above are behavior changes to existing commands or new settings)
v2.1.252 (August 31, 2026)

View official release

  • Bug fixes only. Fixed Bash commands failing with "task output swap refused" on some Macs, and "always allow" not being saved in a project that has no .claude/settings.local.json yet
  • Fixed Remote Control sessions hosted by Claude Desktop or VS Code stalling for minutes after a tool finished when the connection to claude.ai was degraded
  • Fixed background task notifications with very large failure output (a git error on a full disk, for example) pushing the conversation past the API request size limit
  • v2.1.252 itself added or removed no commands, flags, or shortcuts
  • While verifying this release we diffed the data against the official command reference and found two long-standing bundled skill commands missing: /design (v2.1.234 and later) and /workflow-authoring (v2.1.248 and later). Both were added here, taking the reference from 277 to 279 entries — neither is new in v2.1.252
v2.1.251 (August 28, 2026)

View official release

  • Added the PreModelSwitch and PostModelSwitch hook events, so a model switch can be blocked, confirmed, or annotated
  • Foreground subagent tool calls and their results now stream live to Remote Control clients
  • Added a spend limit bar to /usage, and a per-session prompt cache line to /cost showing the cache hit rate and how many tokens were re-cached
  • Fixed many bugs, including security-related ones: a file tool permission bypass via symlinks, path traversal in plugins, and permission checks skipped by Bash arithmetic assignment
  • No commands, flags, or shortcuts were added or removed (the 277 entries in this reference are unchanged)
v2.1.250 (August 28, 2026)

View official release

  • Bug fixes and reliability improvements only. No commands, flags, or shortcuts were added or removed
  • v2.1.249 was never released and is a gap in the sequence (no such version exists in the upstream releases or tags)
v2.1.248 (August 27, 2026)

View official release

  • Added --restricted (or CLAUDE_CODE_RESTRICTED=1): removes the built-in tools that run commands or code and WebFetch (unless named in --tools), keeps file tools inside the working directory, refuses bypassPermissions, and ignores user, project, and local settings files (now covered by the 277 listed entries)
  • Added experimental.cacheTtl ("5m" or "1h") to agent frontmatter: a per-agent prompt cache TTL used when no subagent TTL setting is configured
  • Added claude self-hosted-runner --client-label <label> (or SELF_HOSTED_RUNNER_CLIENT_LABEL) to override the label the runner registers with (the hostname by default)
  • Added /usage-credits for Enterprise organizations billed through AWS Marketplace, self-serve Enterprise, and Enterprise trials, so members can request a higher usage limit from their admin
  • Cross-session messaging (SendMessage / ListAgents) between sessions on the same machine now works on Bedrock, Vertex, and Foundry, and when telemetry is disabled
  • Added a warning in /web-setup when the GitHub CLI token lacks the workflow scope, since pushes to very large repositories can be rejected without it
  • Added server-managed settings diagnostics: a startup warning when the settings fail to load, and a /doctor and /status line explaining the failure (Bedrock/Vertex/third-party provider, custom ANTHROPIC_BASE_URL)
  • Changed shift+enter in the agent view dispatch input to insert a newline and ctrl+enter to dispatch and attach. /loop self-paced dynamic mode and the no-prompt autonomous default are now always available, including on Bedrock/Vertex/Foundry
  • Improved the Workflow tool's prompt footprint from about 5.7k tokens to about 1k, with the script-writing reference moved into a bundled workflow-authoring skill
v2.1.247 (August 26, 2026)

View official release

  • Added the SendFeedback tool: when something goes wrong in a session, Claude drafts a feedback report for you. Running /feedback with no argument now opens the drafts queue, where you review, edit, send, or discard what Claude queued (turn it off with the feedbackDrafts setting)
  • Added /claude-api cost-optimize to profile an existing project's Claude API spend and work through cost levers — caching, token hygiene, batch, effort, and model choice — one measured change at a time. The /claude-api skill also gained Admin API coverage (organization members, invites, workspaces, API keys, rate limit reports)
  • Bash permission prompts now show a tip pointing to auto mode, with a one-keystroke "Yes, and switch to auto mode" option
  • No commands were added or removed (the 276 entries in this reference are unchanged), and claude --help confirms no changes to CLI flags or subcommands
  • Cross-session peer messages now collapse by default to a one-line Message from @<sender>: <first line> preview, with Ctrl+O expanding the full body
  • Sonnet 5's default auto-compact window changed to its full 1M context, so sessions on the 1M window auto-compact at about 967K tokens instead of about 934K
  • Fixed fast arrow-key and Enter sequences acting on the row above the one you navigated to in history search, /config, /mcp, /skills, background tasks, and /model
v2.1.246 (August 25, 2026)

View official release

  • /permissions gained an Auto mode tab for viewing and editing auto mode classifier rules from the dialog
  • /cd now applies the new directory's project settings, hooks, .mcp.json servers (behind the usual approval prompt), skills, and agents right after the move instead of on --resume
  • Added a startup warning for Bash allow rules with a wildcard before the subcommand (e.g. Bash(git * main)), since they also match options inserted before the subcommand
  • Added the turn's completion time to the end-of-turn duration line, e.g. ✻ Sautéed for 23s · done 6:05 PM
  • No commands, flags, or shortcuts were added or removed (verified against claude --help on v2.1.246; still 276 entries). v2.1.244 was never released, and v2.1.245 only fixed a startup crash on Linux with glibc 2.44
v2.1.243 (August 24, 2026)

View official release

  • /usage gained a Loops breakdown (run count, total tokens, tokens per run, and last run for each /loop), making runaway or chatty loop tasks easy to spot
  • Added the modelPicker setting to curate the /model picker with an ordered, labeled list of models, including Vertex and Bedrock model ids
  • Added the promptCacheTtl and subagentPromptCacheTtl settings so API-key and cloud-provider users can keep a 1-hour prompt cache on the main conversation
  • Added a keyless sign-in under /login via the Anthropic Console, so organizations that do not allow API keys can still sign in
  • No commands, flags, or shortcuts were added or removed (claude --help output is identical to v2.1.241). This update adds /rate-limit-options after checking against the official command reference: it is hidden from the command menu and, when typed in full, shows how to keep working after hitting a usage limit
v2.1.241 (August 23, 2026)

View official release

  • Both v2.1.240 and v2.1.241 are bug-fix and reliability releases — no new slash commands, keyboard shortcuts, or CLI flags
  • Reconciling with the official command reference in this version added /auto-mode-setup (available in v2.1.228 and later; it drafts autoMode.environment entries)
  • Reconciling with the official interactive mode page in this version added Alt+D (delete next word)
v2.1.239 (August 21, 2026)

View official release

  • Added /claude-api upgrade, which migrates Python projects from anthropic 0.x to 1.x
  • Cost estimates (/cost, the status line, and --max-budget-usd) now include the 1.1x US-only-inference premium for data-residency workspaces
  • In cloud sessions, plugins synced from claude.ai now show as name@synced and can be managed with claude plugin enable/disable <name>@synced
  • ListAgents now also reports a session's own name (the one peers use to address it) and lists live teammates
  • keybindingFlavor: "readline" now matches Bash for word-wise keys as well: Alt+F and Ctrl/Option+Right stop at the end of the word, and Alt+D deletes to it
  • /goal check-ins on long-running background work now back off (30 min, then 1 h, then every 2 h) instead of repeating every 30 minutes
  • No commands, flags, or shortcuts were added or removed (the claude --help output is identical to v2.1.238). This update adds /artifacts after cross-checking the official command reference (available in v2.1.208 and later)
v2.1.238 (August 20, 2026)

View official release

  • Added a keybindingFlavor setting: set it to "readline" to make Ctrl+W in the prompt delete back to the previous whitespace, as in Bash (the default "classic" is unchanged)
  • Ctrl+L and Cmd+K in fullscreen now always just repaint — the double-press /clear shortcut was removed
  • Plugin marketplaces gained headersHelper, a command that mints HTTP headers (such as a short-lived token) for catalog and same-origin archive fetches. A catalog entry's headersHelper runs only on install or update, and claude plugin install / claude plugin update ask [y/N] first (pass -y to skip)
  • Added --defer-shutdown-max-min, --proxy-authorization-command, and --proxy-authorization-file to claude self-hosted-runner
  • claude mcp list and claude mcp get now show disabled servers as ⊘ Disabled instead of connecting to them for a health check
  • Fixed unbounded memory growth in long interactive sessions: subagent tool results are now released once they leave the recent display window
  • No commands, flags, or shortcuts were added or removed (the claude --help output is identical to v2.1.237)
v2.1.237 (August 20, 2026)

View official release

  • Added a built-in "Concise" output style: Claude leads with results and skips preamble and narration (select it under Output style in /config)
  • Fixed prompt caching for sessions using an LLM gateway or a custom base URL
  • No commands, flags, or shortcuts were added or removed (claude --help output is identical to v2.1.236)
v2.1.236 (August 19, 2026)

View official release

  • Added the ANTHROPIC_DEFAULT_MODEL environment variable: it sets the model new sessions start on, while a /model pick still overrides it and persists across restarts (unlike ANTHROPIC_MODEL)
  • Pressing Enter on a slash-command typo, or on a command unavailable in this session, now reports it instead of running the closest fuzzy match; prefixes and aliases still run
  • Fixed the /model picker rendering taller than the terminal: it now shows only as many models as fit, with the rest reachable by scrolling
  • /usage now shows the usage-credits spend row for Team and Enterprise members
  • Session recaps (automatic and /recap) are now capped at 400 characters, cut at a word boundary
  • No commands, flags, or shortcuts were added or removed (claude --help output is identical to v2.1.235)
v2.1.235 (August 18, 2026)

View official release

  • Added an optional "spellcheck" setting that underlines misspelled words in the prompt input as you type, using your installed aspell, hunspell, or ispell
  • Fixed Shift+Tab inside the permission prompt's comment field approving the edit and granting session-wide edit permission instead of closing the field
  • Fixed the expanded task list (Ctrl+T) always starting collapsed when resuming a session with open tasks
  • No commands, flags, or shortcuts were added or removed (claude --help output is identical to v2.1.234)
v2.1.234 (August 17, 2026)

View official release

  • /permissions can now be opened while Claude is working, and rule changes apply to the rest of the current turn
  • /add-dir <path> can now be used mid-turn too; in the fullscreen TUI, /add-dir, /autocompact, /theme, /help, /config, and /advisor dialogs all open while Claude is working
  • /goal now clears itself with a notice when a turn dies on an unrecoverable error (revoked auth, an exhausted credit balance, or a context overflow), and Claude checks in on background tasks that keep a goal waiting for 30+ minutes (set CLAUDE_CODE_GOAL_CHECKIN_MINUTES=0 to opt out)
  • Removed the "Default teammate model" row from /config (agent-team teammates now use the leader's model unless the spawn names one) and added a "Continue automatically at usage limit" row
  • claude setup-token now rejects unexpected extra arguments instead of silently ignoring them
  • Added the selection:clear keybinding action for clearing an in-app text selection. It ships unbound, so the shortcut list here is unchanged
  • No commands, flags, or shortcuts were added or removed — the claude --help output is byte-identical to v2.1.233
v2.1.233 (August 14, 2026)

View official release

  • The --worktree flag and the claude agents view now accept GitLab merge request URLs (shown as !N in the view). Creating a branch from a GitLab merge request requires v2.1.233 or later
  • Added CLAUDE_CODE_TOOL_MEMORY_LIMIT to cap Bash tool memory through Linux cgroups (opt-in)
  • Added CLAUDE_CODE_WEBFETCH_CACHE_TTL_MS to configure the in-session WebFetch URL cache TTL (the default is still 15 minutes)
  • Todo and task management tools are now off by default on Opus 4.8, Sonnet 5, Fable 5, Mythos 5, and later models. Set CLAUDE_CODE_ENABLE_TODO_TOOLS=1 to bring them back
  • The /effort selector in screen reader mode now renders as a numbered list with a number entry prompt
  • Added claude upgrade, the alias for claude update, after re-checking claude --help (271 to 272 entries listed)
v2.1.232 (August 13, 2026)

View official release

  • Extended @ mentions: type at least one letter after @ and Claude Code also suggests your other live sessions on this machine, so a mention like @api-worker names the message target directly
  • Subagent forking is now on by default: a subagent_type: "fork" subagent inherits the parent's full conversation and prompt cache (interactive sessions only — still off with -p and in the Agent SDK)
  • Added /config rows for "Dialog expiry" and "Messages from your other sessions"
  • /plugin install plugin@marketplace now refreshes the marketplace first, so newly published plugins install without a manual update
  • /code-review at high, xhigh, and max effort now runs in a background agent like the other levels, and /feedback and /bug open immediately even while Claude is responding
  • No commands, flags, or shortcuts were added or removed — only the @ behavior was extended
v2.1.231 (August 13, 2026)

View official release

  • Fixed MCP OAuth sign-in failing with a redirect URI mismatch for servers that use a pre-registered OAuth client, such as Slack
  • v2.1.231 contains only this fix — no commands, flags, or shortcuts were added or removed
v2.1.229 (August 12, 2026)

View official release

  • Added --exec after re-checking the official CLI reference: combined with --bg, it runs a shell command as a PTY-backed background job instead of starting a Claude session (claude --exec alone is not recognized)
  • claude remote-control --continue is now documented in the official docs
  • Everything else is bug fixes and internal improvements — no commands or shortcuts were added or removed
v2.1.228 (August 11, 2026)

View official release

  • Hardened skills security: a skill synced from claude.ai can no longer override a local command or run shell commands
  • Fixed interactive sessions freezing mid-render, and fixed Git Bash detection on Windows
  • Fixed /tui not restoring the model after switching with /model, and fixed cross-session messages missing from the inbox
  • Fixed a conversation title leak in Remote Control, and improved handling of checkout failures on self-hosted runners
  • v2.1.228 is bug fixes and security hardening only — no commands, flags, or shortcuts were added or removed, so this reference's command set is unchanged
v2.1.227 (August 10, 2026)

View official release

  • Fixed feature flags being evaluated before the subscription tier was known when a session started with an expired login token, which wrongly prompted Max plan users to enable usage credits for Fable
  • Fixed Bash commands failing on GitHub-hosted runners when allowed_non_write_users is used with claude-code-action
  • Fixed /tui restoring a conversation that had been rewound past its first message
  • Improved the slash command menu: only the selected row is highlighted, matched characters are bold, and emoji or accented names keep their glyphs intact
  • Improved performance by reducing event loop stalls in file-not-found suggestions and in the @-mention size check
v2.1.225-v2.1.226 (August 8, 2026)

View official release

  • Added a workspace trust prompt to claude agents for untrusted directories, matching the behavior of claude (v2.1.225)
  • Added gateway spend-limit support to the usage warning: the limit-reached message now names the cap, its reset time, and the operator's message (requires the gateway on v2.1.225 or later)
  • Fixed claude self-hosted-runner registering and then failing every session when --base-dir cannot be created or written; it now exits at startup with a clear error (v2.1.225)
  • SendMessage can now start a conversation with your Remote Control sessions on other machines by name (ListAgents shows them as name [ref]), instead of only replying after they message you first (v2.1.225)
  • v2.1.226 is bug fixes and reliability improvements only — no commands, flags, or shortcuts were added or removed, so this reference's command set is unchanged
v2.1.224 (August 7, 2026)

View official release

  • Added self-hosted environments: claude self-hosted-runner turns your own machines or containers into a place Claude Code web, mobile, and desktop sessions can run (Team and Enterprise plans)
  • Added an archive plugin source: install plugins from a zip over HTTPS without git or npm, with optional SHA-256 pinning
  • Added cross-session SendMessage: Claude Code sessions can now message each other on any of your machines, with ListAgents to discover them (macOS and Linux)
  • Security fixes: long (>200 char) project paths could resolve to another project's session directory under a shared sanitized prefix, and sandbox filesystem deny entries written with a trailing slash (such as denyRead: "~/.aws/") were silently bypassable
  • Added claude --environment, claude --ref, and claude self-hosted-runner to this reference, reflected now after cross-checking the official CLI reference and the actual --help output (--ref is hidden from --help, but was confirmed by measurement: unknown option on v2.1.223, recognized on v2.1.224)
v2.1.223 (August 6, 2026)

View official release

  • Changed /review into an alias for /code-review; it reviews the current diff or a PR, and /code-review ultra runs a deeper cloud-backed review
  • Changed /code-review to reuse the effort level you last typed when none is given (type a level such as /code-review high to change it)
  • Security fixes: crafted commands could hide part of the Bash permission check, tabs and invisible Unicode could hide part of a command in the permission prompt, and workflow scripts could run code outside the sandbox via dynamic import()
  • Added q (exit the transcript view) to this reference, reflected now after cross-checking the official interactive mode shortcut table
v2.1.222 (August 4, 2026)

View official release

  • Removed /ultraplan (use plan mode instead). Primarily a bug-fix and reliability release
  • Added /autocompact and --autocompact to this reference (confirmed via official docs to be available since v2.1.221; reflected here now)
  • Fixed worktree-isolated sessions and their subagents being able to run destructive git commands against the main checkout; isolation now applies to file edits and Bash in every session type
  • Fixed PreToolUse auto-allow hooks bypassing tool restrictions in background agent tasks (summaries, compaction, renames)
v2.1.221 (August 4, 2026)

View official release

  • A bug-fix and reliability release — no new slash commands, keyboard shortcuts, or CLI flags
  • Added mode: "mask" for sandbox credential files (Linux/WSL): sandboxed commands read a masked placeholder value, substituted with the real value only on egress
  • Added a prompt-audit subcommand to the claude-api skill for auditing prompts and tool descriptions for patterns written for older models
v2.1.220 (July 25, 2026)

View official release

  • A bug-fix and reliability release — no new slash commands, keyboard shortcuts, or CLI flags
  • Verified in this version that claude --mcp-debug is no longer accepted (not mentioned in the official release notes; use --debug instead)
v2.1.219 (July 24, 2026)

View official release

  • Added Claude Opus 5 (claude-opus-5), now the default Opus model — 1M context, fast mode at $10/$50 per Mtok
  • Subagents can now spawn nested subagents up to depth 3 by default (was 1); set CLAUDE_CODE_MAX_SUBAGENT_SPAWN_DEPTH=1 to disable nesting
  • Changed dynamic workflows to default to a medium size guideline (aim for fewer than 15 agents); pick another size or unrestricted with Dynamic workflow size in /config
  • Added nested subagent forwarding in stream-json: subagents spawned at depth-2+ now appear when --forward-subagent-text is set, keyed by their spawning Agent tool_use id
  • Improved claude --teleport to show which repo your current checkout points at when it doesn't match the session's repo
  • Added the sandbox.network.strictAllowlist setting to deny non-allowlisted hosts for sandboxed commands without prompting
v2.1.218 (July 22, 2026)

View official release

  • Changed /code-review to run as a background subagent, so review work no longer fills your conversation and keeps stacked slash commands as its review target
  • Added screen-reader announcements of deleted text for word and line deletions (Option+Delete, Ctrl+W, Cmd+Backspace, Ctrl+U, Ctrl+K) in --ax-screen-reader mode
  • Fixed Windows paths with \u-prefixed segments (like C:\Users\unicorn) being corrupted into CJK characters in tool inputs, which made those files inaccessible
  • Fixed the left arrow key discarding the conversation with no undo: presses right after editing now ask to confirm, and Esc in the agent view returns to the conversation it backgrounded
  • Added HTTP status and error text to claude mcp list and /mcp when a server fails to connect
  • Changed skills with context: fork to run in the background by default; opt out per skill with background: false
v2.1.217 (July 21, 2026)

View official release

  • Added emoji shortcode autocomplete in the prompt input: type :heart: to insert ❤️, or :hea for suggestions (disable with the emojiCompletionEnabled setting)
  • Added a cap on concurrently-running subagents (default 20, override with CLAUDE_CODE_MAX_CONCURRENT_SUBAGENTS) so one message can't fan out unbounded background agents
  • Changed subagents to no longer spawn nested subagents by default; set CLAUDE_CODE_MAX_SUBAGENT_SPAWN_DEPTH to allow deeper nesting
  • Fixed --max-budget-usd not stopping background subagents: once the cap is reached, new spawns are denied and running background agents are halted
  • Changed the login-expiry warning to appear 3 days before expiry instead of 5
v2.1.216 (July 20, 2026)

View official release

  • Added the sandbox.filesystem.disabled setting to skip filesystem isolation while keeping network egress control
  • Fixed a slowdown in long sessions where message normalization cost grew quadratically with turns
  • Fixed auto mode denying commands with HTTP 401 classifier errors after OAuth token rotation
  • Fixed worktree-isolated subagents redirecting git into the shared checkout
  • Fixed /rewind restoring or deleting files through symlinks or hard links
  • Improved /fork confirmation and /code-review ultra error messages
v2.1.214-v2.1.215 (July 18, 2026)

View official release

  • Claude no longer runs /verify and /code-review on its own — invoke them explicitly with /verify or /code-review when you want them (v2.1.215)
  • Added permission prompts for docker commands carrying daemon-redirect flags (--url, --connection, --identity, and Podman's remote mode) that previously ran without one (v2.1.214)
  • Hardened Bash permission checks in many cases — commands over 10,000 characters, file-descriptor redirect forms, Windows PowerShell 5.1 sessions, and zsh subscripts in [[ ]] now prompt instead of auto-approving (v2.1.214)
  • Added the EndConversation tool so Claude can end sessions with highly abusive users or jailbreak attempts (v2.1.214)
  • Added a periodic progress heartbeat for long-running tool calls that previously went silent (v2.1.214)
v2.1.211-v2.1.212 (July 17, 2026)

View official release

  • Added /subtask to send an in-session subagent off to work on a task while you keep going, taking over the in-session role /fork used to have (v2.1.212)
  • Changed /fork to copy the conversation into a new background session — its own row in claude agents — instead of launching an in-session subagent (v2.1.212)
  • Added claude auto-mode reset to restore the default auto-mode configuration, with a confirmation prompt (v2.1.212)
  • Added --forward-subagent-text flag to include subagent text and thinking blocks in stream-json output (v2.1.211)
  • MCP tool calls running longer than 2 minutes now move to the background automatically so the session stays usable (v2.1.212)
  • Fixed plan mode auto-running file-modifying Bash commands (e.g. touch, rm) without a permission prompt (v2.1.212)
v2.1.209-v2.1.210 (July 14, 2026)

View official release

  • Added a live elapsed-time counter to the collapsed tool summary line so long-running tool calls visibly progress (v2.1.210)
  • Added a startup warning for Write(path), NotebookEdit(path), and Glob(path) permission rules — use Edit(path) or Read(path) instead (v2.1.210)
  • Hardened the Agent tool against indirect prompt injection via content a subagent reads (v2.1.210)
v2.1.208 (July 14, 2026)

View official release

  • Added screen reader mode: opt-in plain-text rendering for screen reader users (v2.1.208)
  • Fixed several memory leaks in long sessions, including MCP stdio server stderr accumulation and unbounded LSP document retention (v2.1.208)
  • Reduced per-tool-call CPU overhead in print/SDK sessions with many MCP tools (up to 7x faster tool rounds) (v2.1.208)
v2.1.207 (July 11, 2026)

View official release

  • Auto mode is now available without CLAUDE_CODE_ENABLE_AUTO_MODE opt-in on Bedrock, Vertex AI, and Foundry (v2.1.207)
  • Changed Bedrock, Vertex, and Claude Platform on AWS to default to Claude Opus 4.8 (v2.1.207)
  • Plugin hooks/monitors/MCP headersHelper: ${user_config.*} in shell-form commands is now rejected as a shell-injection fix (v2.1.207)
v2.1.206 (July 10, 2026)

View official release

  • Added directory path suggestions to /cd and /add-dir (v2.1.206)
  • Added a /doctor check that proposes trimming checked-in CLAUDE.md files by cutting content Claude could derive from the codebase (v2.1.206)
  • Background agents now upgrade to a new version in the background right after a Claude Code update (v2.1.206)
v2.1.205 (July 8, 2026)

View official release

  • /doctor is now a comprehensive setup checkup for your installation and settings, with /checkup available as an alias (v2.1.205)
  • Improved auto mode to ask before running rm -rf on unresolved variables (v2.1.205)
v2.1.204 (July 8, 2026)

View official release

  • Fixed hook events not streaming during SessionStart hooks in headless sessions, which could cause remote workers to be idle-reaped mid-hook (v2.1.204)
v2.1.203 (July 7, 2026)

View official release

  • Added a warning when your login is about to expire, so you can re-authenticate before background sessions are interrupted (v2.1.203)
  • Added a grey ⏸ badge to the footer when in manual permission mode, making the active mode always visible (v2.1.203)
  • Added the session's additional working directories to MCP roots/list, with notifications/roots/list_changed sent when the set changes (v2.1.203)
v2.1.200 (July 3, 2026)

View official release

  • Renamed the "default" permission mode to "Manual" across the CLI, --help, VS Code, and JetBrains; --permission-mode manual and "defaultMode": "manual" are now accepted as aliases for default (v2.1.200)
  • AskUserQuestion dialogs no longer auto-continue by default; opt into an idle timeout via /config (v2.1.200)
v2.1.199 (July 2, 2026)

View official release

  • Stacked skill invocations like /skill-a /skill-b task now load all leading skills (up to 5), not just the first (v2.1.199)
  • Transient server-side rate-limit errors (429s) are now retried automatically with backoff for subscribers (v2.1.199)
  • Subagents cut off by a rate limit or server error now return their partial work to the parent agent (v2.1.199)
  • SSL certificate errors (TLS-inspecting proxies, expired certs) now fail immediately with a fix hint instead of burning retries (v2.1.199)
v2.1.198 (July 1, 2026)

View official release

  • Claude in Chrome browser automation reached general availability (v2.1.198)
  • Added the /dataviz skill for chart and dashboard design guidance with a runnable color-palette validator (v2.1.198)
  • Background agents launched from claude agents now commit, push, and open a draft PR when they finish code work in a worktree, instead of stopping to ask (v2.1.198)
  • Added background agent notifications in claude agents — sessions that need input or finish now fire the Notification hook (v2.1.198)
v2.1.197 (June 30, 2026)

View official release

  • Introduced Claude Sonnet 5 as the new default model in Claude Code, with a native 1M-token context window and promotional pricing of $2/$10 per Mtok through August 31 (v2.1.197)
v2.1.196 (June 29, 2026)

View official release

  • Added support for organization default models — admins set it in the org console, and it shows as "Org default" (or "Role default") in /model when you haven't picked one yourself (v2.1.196)
  • Made chat file attachments clickable — Cmd/Ctrl-click reveals the file in Finder/Explorer (v2.1.196)
  • Enabled the streaming idle watchdog by default for all providers — it aborts and retries when a response stream produces no events for 5 minutes (set CLAUDE_ENABLE_STREAM_WATCHDOG=0 to disable) (v2.1.196)
v2.1.195 (June 26, 2026)

View official release

  • Added CLAUDE_CODE_DISABLE_MOUSE_CLICKS to disable mouse click/drag/hover in fullscreen mode while keeping wheel scroll (v2.1.195)
  • Fixed hook matchers with hyphenated identifiers (e.g. code-reviewer, mcp__brave-search) accidentally substring-matching — they now exact-match; use mcp__brave-search__.* to match all tools from a hyphenated MCP server (v2.1.195)
  • Improved the claude agents completed list to fill available vertical space and added a provisioning checklist to Remote session startup (v2.1.195)
v2.1.193 (June 25, 2026)

View official release

  • Added autoMode.classifyAllShell setting to route all Bash/PowerShell commands through the auto-mode classifier instead of only arbitrary-code-execution patterns (v2.1.193)
  • Added live file path autocomplete to bash mode (!) (v2.1.193)
  • Added auto-mode denial reasons to the transcript, the denial toast, and /permissions recent denials (v2.1.193)
v2.1.191 (June 24, 2026)

View official release

  • Added /rewind support for resuming a conversation from before /clear was run (v2.1.191)
  • Reduced CPU usage during streaming responses by ~37% by coalescing text updates to 100ms (v2.1.191)
  • Improved MCP server reliability: capability discovery (tools/list, prompts/list, resources/list) now retries transient network errors with short backoff (v2.1.191)
v2.1.187 (June 23, 2026)

View official release

  • Added the sandbox.credentials setting to block sandboxed commands from reading credential files and secret environment variables (v2.1.187)
  • Added org-configured model restrictions to the model picker, --model, /model, and ANTHROPIC_MODEL, with a "restricted by your organization's settings" message when a restricted model is selected (v2.1.187)
  • Added mouse click support to select menus (permission prompts, /model, /config, etc.) in fullscreen mode (v2.1.187)
v2.1.186 (June 22, 2026)

View official release

  • Added claude mcp login <name> and claude mcp logout <name> to authenticate and log out of MCP servers from the CLI without opening the /mcp menu (with --no-browser for SSH/headless sessions) (v2.1.186)
  • Changed ! bash commands to trigger Claude to respond to the output automatically; set "respondToBashCommands": false in settings.json to keep the previous context-only behavior (v2.1.186)
  • Changed background subagents to surface permission prompts in the main session instead of auto-denying; the dialog shows which agent is asking, and Esc denies just that tool (v2.1.186)
  • Changed /review <pr> to use the same review engine as /code-review medium (v2.1.186)
v2.1.183 (June 19, 2026)

View official release

  • Improved auto mode safety: destructive git commands (git reset --hard, git checkout -- ., git clean -fd, git stash drop) are now blocked when you didn't ask to discard local work, git commit --amend is blocked when the commit wasn't made by the agent this session, and terraform destroy/pulumi destroy/cdk destroy are blocked unless you asked for the specific stack (v2.1.183)
  • Added a warning when the requested model is deprecated or automatically updated to a newer model, shown on stderr in print mode (-p) and also covering models set in agent frontmatter (v2.1.183)
  • Added the attribution.sessionUrl setting to omit the claude.ai session link from commits and PRs in web and Remote Control sessions (v2.1.183)
  • Added /config --help to list all available shorthand keys for /config key=value, and changed /config toggle behavior so Enter and Space change the setting while Esc saves and closes (v2.1.183)
v2.1.181 (June 17, 2026)

View official release

  • Added /config key=value syntax to set any setting directly from the prompt (e.g. /config thinking=false; works in interactive, -p, and Remote Control) (v2.1.181)
  • Added the sandbox.allowAppleEvents opt-in setting that lets sandboxed commands send Apple Events on macOS (v2.1.181)
  • Added the CLAUDE_CLIENT_PRESENCE_FILE environment variable to suppress mobile push notifications while you're at the machine (v2.1.181)
  • Improved the subagent panel: idle subagents auto-hide after 30s and the list caps at 5 rows with scroll hints (v2.1.181)
v2.1.178 (June 13, 2026)

View official release

  • Added Tool(param:value) syntax for permission rules to match a tool's input parameters (with * wildcard), e.g. Agent(model:opus) to block Opus subagents (v2.1.178)
  • Skills in nested .claude/skills directories now load when working on files there; on a name clash the nested skill appears as <dir>:<name> so both stay available (v2.1.178)
  • Improved auto mode: subagent spawns are now evaluated by the classifier before launch, closing a gap where a subagent could request a blocked action without review (v2.1.178)
  • /bug now requires a description before submitting and no longer uses model-refusal text as the GitHub issue title (v2.1.178)
v2.1.176 (June 12, 2026)

View official release

  • Session titles are now generated in the language of your conversation (pin a specific language with the language setting) (v2.1.176)
  • Added the footerLinksRegexes setting for regex-matched link badges in the footer row (v2.1.176)
  • Fixed /copy and mouse-selection copy not reaching the system clipboard inside tmux over SSH (v2.1.176)
  • Fixed /cd and worktree moves leaving the session reporting the previous directory's git branch (v2.1.176)
v2.1.175 (June 12, 2026)

View official release

  • Added the enforceAvailableModels managed setting — when enabled, the availableModels allowlist also constrains the Default model and user/project settings can no longer widen a managed list (v2.1.175)
v2.1.174 (June 12, 2026)

View official release

  • Added the wheelScrollAccelerationEnabled setting to disable mouse-wheel scroll acceleration in fullscreen mode (v2.1.174)
  • Fixed the /model picker hiding the model family that Default resolves to (Opus/Sonnet now appear as their own rows) (v2.1.174)
v2.1.173 (June 11, 2026)

View official release

  • Fixed Fable 5 model names with a [1m] suffix not being normalized — Fable 5 includes 1M context by default, so the suffix is now stripped automatically (v2.1.173)
v2.1.172 (June 10, 2026)

View official release

  • Sub-agents can now spawn their own sub-agents, nested up to 5 levels deep (v2.1.172)
  • Added a search bar when browsing a marketplace's plugins in /plugin (v2.1.172)
  • /code-review now keeps the ultra option visible when you're not signed in to claude.ai, noting the cloud review requires a claude.ai account (v2.1.172)
v2.1.170 (June 9, 2026)

View official release

  • Introduced Claude Fable 5, a Mythos-class model available via claude --model fable and --advisor fable, with capabilities exceeding any previously general-release model (v2.1.170)
  • Fixed sessions not saving transcripts (and missing from --resume) when launched from the VS Code integrated terminal or any shell that inherited Claude Code environment variables (v2.1.170)
v2.1.168-v2.1.169 (June 8, 2026)

View official release

  • Added the --safe-mode flag (and CLAUDE_CODE_SAFE_MODE) to start with all customizations (CLAUDE.md, plugins, skills, hooks, MCP servers) disabled, so you can isolate a broken configuration (v2.1.169)
  • Added the /cd command to move a session to a new working directory without breaking the prompt cache mid-session (v2.1.169)
  • Added a disableBundledSkills setting and CLAUDE_CODE_DISABLE_BUNDLED_SKILLS environment variable to hide bundled skills, workflows, and built-in slash commands from the model (v2.1.169)
v2.1.165-v2.1.167 (June 6, 2026)

View official release

  • --fallback-model now also applies to interactive sessions; pass a comma-separated list to try up to three models in order (added the fallbackModel setting too) (v2.1.166)
  • Added glob pattern support in the deny rule tool-name position ("*" denies all tools); allow rules reject non-MCP globs, and unknown tool names in deny rules warn at startup (v2.1.166)
  • claude update now announces the target version before downloading instead of going silent (v2.1.166)
v2.1.163 (June 4, 2026)

View official release

  • /plugin list lists installed plugins, with --enabled/--disabled filters
  • Added a "c to copy" shortcut to /btw that copies the raw markdown answer to the clipboard, preserving formatting when pasted elsewhere
  • stdio MCP servers now receive the same CLAUDE_CODE_SESSION_ID as hooks/Bash on --resume
v2.1.162 (June 3, 2026)

View official release

  • Clicking a slash command in the autocomplete menu now fills it into your prompt instead of running it immediately; press Enter to run
  • /effort now confirms when your chosen level will persist as the default for new sessions
  • Renamed Windsurf to Devin Desktop in the /ide menu, /terminal-setup, and /scroll-speed
  • claude agents --json now includes waitingFor, showing what a waiting session is blocked on (e.g. a permission prompt)
v2.1.161 (June 2, 2026)

View official release

  • claude agents rows now show done/total when work is fanned out
  • /mcp now collapses claude.ai connectors you've never signed in to behind a "Show unused connectors" row
  • Parallel tool calls: a failed Bash command no longer cancels other calls in the same batch — each tool returns its own result independently
  • OTEL_RESOURCE_ATTRIBUTES values are now included as labels on metric datapoints, so you can slice usage metrics by team or repo
v2.1.160 (June 2, 2026)

View official release

  • Renamed the dynamic-workflow trigger keyword from workflow to ultracode — the word "workflow" no longer triggers a run
  • Added a prompt before writing to shell startup files (.zshenv, .zlogin, .bash_login) and ~/.config/git/
  • acceptEdits mode now prompts before writing build-tool config files that grant code execution (.npmrc, bunfig.toml, etc.)
  • Single-file grep commands now satisfy the read-before-edit check, so Edit no longer requires a separate Read
  • Removed the CLAUDE_CODE_OPUS_4_6_FAST_MODE_OVERRIDE environment variable (now a no-op)
v2.1.158 (May 30, 2026)

View official release

  • Auto mode is now available on Bedrock, Vertex, and Foundry for Opus 4.7 and 4.8 — opt in by setting CLAUDE_CODE_ENABLE_AUTO_MODE=1
v2.1.157 (May 29, 2026)

View official release

  • Plugins in .claude/skills directories now load automatically, no marketplace required
  • Added claude plugin init <name> (alias new) — scaffolds a new plugin at ~/.claude/skills/<name>/ that auto-loads next session as <name>@skills-dir
  • Added autocomplete for /plugin arguments — subcommands, installed plugin names, and plugins from known marketplaces
  • claude agents: the agent field in settings.json is now honored for dispatched sessions, with --agent <name> to override it
  • EnterWorktree can now switch between Claude-managed worktrees mid-session
  • Added a "Workflow keyword trigger" setting in /config to stop the word "workflow" in a prompt from triggering a dynamic workflow
v2.1.156 (May 29, 2026)

View official release

  • Introduced dynamic workflows — ask Claude to create a workflow and it orchestrates tens to hundreds of agents in the background for larger tasks. Run /workflows to watch, pause, resume, or save runs
  • Added claude --exec (with --bg) — run a shell command as a PTY-backed background job instead of a Claude session, with attach/detach support
  • /simplify is now a cleanup-only review — reviews reuse, simplification, efficiency, and altitude in parallel and applies fixes, without hunting for bugs (use /code-review for bugs)
  • Added the ultracode level to /effort — combines xhigh reasoning with automatic workflow orchestration (session-only)
  • Added Opus 4.8 — defaults to high effort, with /effort xhigh for the hardest tasks. Fast mode is now far cheaper
  • /model now saves your selection as the default (matching the IDE). Press s in the picker to switch for the current session only
v2.1.152 (May 27, 2026)

View official release

  • Added /code-review --fix — applies reuse, simplification, and efficiency suggestions to the working tree after the review. /simplify now invokes /code-review --fix
  • Added /reload-skills — re-scan skill directories without restarting the session
  • Skills and slash commands can now set disallowed-tools in frontmatter to remove tools from the model while active
  • SessionStart hooks can return reloadSkills: true to re-scan skill directories, and set the session title via hookSpecificOutput.sessionTitle
  • Added MessageDisplay hook event — lets hooks transform or hide assistant message text as it is displayed
  • Added pluginSuggestionMarketplaces managed setting — admins can allowlist org marketplaces whose plugins may be suggested
  • claude plugin marketplace remove now accepts --scope user|project|local
  • Claude Code now switches to --fallback-model for the rest of the session when the primary model is not found, instead of failing every request
  • Auto mode no longer requires opt-in consent
  • Vim mode: / in NORMAL mode now opens reverse history search (like Ctrl+R)
v2.1.150 (May 23, 2026)

View official release

  • Internal infrastructure improvements (no user-facing changes)
v2.1.149 (May 22, 2026)

View official release

  • /usage now shows a per-category breakdown — skills, subagents, plugins, and per-MCP-server cost driving your limits
  • /diff detail view can be scrolled with the keyboard (arrows, j/k, PgUp/PgDn, Space, Home/End)
  • Markdown output renders GFM task list checkboxes (- [ ] / - [x]) instead of plain bullets
  • Enterprise: added allowAllClaudeAiMcps managed setting to load claude.ai cloud MCP connectors alongside managed-mcp.json
  • Fixed a PowerShell permission bypass: built-in cd functions (cd.., cd\, cd~, X:) changed the working directory undetected
  • Fixed the sandbox write allowlist in git worktrees covering the entire main repository root instead of only the shared .git directory
v2.1.148 (May 22, 2026)

View official release

  • Fixed the Bash tool returning exit code 127 on every command (regression introduced in v2.1.147)
v2.1.147 (May 21, 2026)

View official release

  • Renamed /simplify to /code-review — reports correctness bugs at a chosen effort level (e.g. /code-review high); pass --comment to post findings as inline GitHub PR comments. Old cleanup-and-fix behavior removed
  • Pinned background sessions (Ctrl+T in claude agents) now stay alive when idle, restart in place to apply Claude Code updates
  • Improved auto-updater: retries transient network failures, reports specific error categories and OS error codes on failure
  • Improved diff rendering performance for large file edits
  • Prompt history no longer records consecutive duplicate entries
  • Fixed unknown slash commands silently doing nothing in headless/SDK mode — they now show an error message
v2.1.146 (May 21, 2026)

View official release

  • Renamed /simplify to /code-review with an optional effort level (e.g. /code-review high)
  • Auto-updater status line now shows your current version when an update fails
  • Fixed paginating MCP servers dropping resources/list, resources/templates/list, and prompts/list items past page 1
  • Fixed Windows PowerShell tool failing with command line is invalid when pwsh is installed via winget or the Microsoft Store (regression in v2.1.124)
  • Fixed /background refusing sessions whose only typed input was a skill or custom slash command
v2.1.145 (May 19, 2026)

View official release

  • Added bundled skills to run and verify your app — /run (launch and drive the app to see a change working), /verify (build and run to confirm a change works), and /run-skill-generator (write a per-project skill for /run and /verify). All require v2.1.145 or later
  • Added claude agents --json to list live Claude sessions as a JSON array for scripting (tmux-resurrect, status bars, session pickers)
  • /plugin Discover and Browse screens now show a plugin's commands, agents, skills, hooks, and MCP/LSP servers before installation
  • Stop and SubagentStop hook input now includes background_tasks and session_crons fields
  • Fixed a permission-prompt bypass where bare variable assignments to non-allowlisted environment variables in Bash commands were auto-approved
v2.1.144 (May 19, 2026)

View official release

  • Renamed /extra-usage to /usage-credits (the old name still works); "extra usage" is now "usage credits" across CLI copy
  • /resume now supports background sessions — sessions started via claude --bg or agent view appear in the picker marked with bg
  • /model now changes the model for the current session only; press d in the picker to set a default for new sessions
  • Added elapsed duration to background subagent completion notifications (e.g. "Agent completed · 3h 2m 5s")
  • Fixed startup hanging up to 75s when api.anthropic.com is unreachable (captive portal, firewall, VPN)
v2.1.143 (May 15, 2026)

View official release

  • Added plugin dependency enforcement — claude plugin disable refuses when an enabled plugin depends on the target, and claude plugin enable force-enables transitive dependencies
  • Added worktree.bgIsolation: "none" setting to let background sessions edit the working copy directly, for repos where worktrees are impractical
  • Shift+Tab in attached agent sessions now includes auto mode in the cycle
  • Fixed stop hooks that block repeatedly looping forever — the turn now ends with a warning after 8 consecutive blocks (override via CLAUDE_CODE_STOP_HOOK_BLOCK_CAP)
  • Fixed Esc/Ctrl+C not cancelling a pending /loop wakeup while Claude is idle between iterations
v2.1.142 (May 14, 2026)

View official release

  • Added new claude agents flags (--add-dir, --settings, --mcp-config, --plugin-dir, --permission-mode, --model, --effort, --dangerously-skip-permissions) to configure dispatched background sessions
  • Fast mode now uses Opus 4.7 by default (previously Opus 4.6); set CLAUDE_CODE_OPUS_4_6_FAST_MODE_OVERRIDE=1 to pin it to Opus 4.6
  • Plugins with a root-level SKILL.md and no skills/ subdirectory are now surfaced as a skill
  • The /plugin details pane and claude plugin details now show the LSP servers a plugin provides
  • /web-setup warns before replacing an existing GitHub App connection
  • Improved reactive compaction — the first summarize attempt seeds from the original request's overflow size, avoiding a wasted near-full-context retry
  • Improved hook configuration error — configuring a prompt- or agent-type hook for SessionStart/Setup/SubagentStart now says to use a command-type hook instead
  • Removed the stale /model claude-sonnet-4-20250514 suggestion from Usage Policy refusal messages
  • Fixed MCP_TOOL_TIMEOUT not raising the per-request timeout for remote HTTP/SSE MCP servers (capped at 60s), and background sessions not recognizing pre-existing git worktrees
  • Fixed background sessions disappearing after macOS sleep/wake, the daemon not exiting cleanly after a binary upgrade, background agents crash-looping with the Chrome extension, and claude agents deadlocking on Windows network drives
v2.1.141 (May 13, 2026)

View official release

  • Added terminalSequence field to hook JSON output so hooks can emit desktop notifications, window titles, and bells without a controlling terminal
  • Added CLAUDE_CODE_PLUGIN_PREFER_HTTPS environment variable to clone GitHub plugin sources over HTTPS for environments without an SSH key
  • Added ANTHROPIC_WORKSPACE_ID environment variable for workload identity federation — scopes the minted token to a specific workspace
  • Added claude agents --cwd <path> to scope the session list to a directory
  • /feedback can now include recent sessions (last 24 hours or 7 days) for issues spanning more than the current session
  • Rewind menu: added "Summarize up to here" to compress earlier context while keeping recent turns intact
  • Auto mode permission dialog now explains when a permissions.ask rule caused the prompt
  • Restored the "view diff in your IDE" option on file-edit permission prompts when an IDE is connected
  • Background agents launched via /bg or ←← now preserve the current permission mode instead of reverting to default
  • Improved spinner feedback during long thinking periods — the spinner warms to amber after 10 seconds to signal Claude is still working
  • Improved plugin menu navigation: /Tab switch tabs, moves to the tab strip, and tab headers and search box are clickable in fullscreen mode
  • Fixed /tui silently dropping running background shells and subagents — now refuses and asks to wait for them to finish
  • Fixed /model in one session silently changing the autocompact threshold in other concurrent sessions
  • Fixed markdown tables with cell wrapping falling back to the vertical key-value layout instead of rendering as a bordered grid (regression in 2.1.136)
  • Fixed Ctrl+C not interrupting a running turn while in vim INSERT/VISUAL mode
  • Fixed /mcp server list not keeping the focused server visible in short terminals in fullscreen mode
  • Fixed MCP HTTP/SSE servers returning 403 on connect showing as "failed" instead of "needs auth"
  • Fixed Windows Alt+V image paste reporting "no image found" when the clipboard contains a screenshot
v2.1.140 (May 12, 2026)

View official release

  • Improved Agent tool subagent_type matching to be case- and separator-insensitive ("Code Reviewer"code-reviewer)
  • Updated agent color palette
  • Fixed /goal silently hanging when disableAllHooks or allowManagedHooksOnly is set — now shows a clear message instead of an indicator that never resolves
  • Fixed /loop scheduling redundant wakeups to poll background tasks that already notify on completion
  • Plugins now warn when a default component folder (e.g. commands/) is silently ignored because plugin.json sets the matching key — shown in /doctor, claude plugin list, and /plugin
  • Fixed claude --bg failing with "connection dropped mid-request" when the background service was about to idle-exit
  • Fixed background service startup failing on machines with enterprise endpoint security by allowing more time
  • Fixed remote managed settings not retrying on 401 — now retries once with a force-refreshed token
  • Fixed managed extraKnownMarketplaces auto-update policy not being persisted to known_marketplaces.json
  • Fixed a regression in settings hot-reload where symlinked settings files caused misattributed change events and spurious ConfigChange hooks
  • Fixed a recurring event-loop stall on Windows when a missing executable (e.g. gh) triggered synchronous where.exe re-spawns on every check
  • Fixed Read tool calls failing validation when offset is passed as a whitespace-padded or +-prefixed string
  • Fixed native terminal cursor not staying at the input caret when the terminal loses focus
v2.1.139 (May 11, 2026)

View official release

  • Added /goal [condition|clear] — set a completion condition and Claude keeps working across turns until it's met. Works in interactive, -p, and Remote Control with a live overlay showing elapsed time, turns, and tokens
  • Added /scroll-speed — tune mouse wheel scroll speed with a live preview ruler. Available in fullscreen rendering only (not in JetBrains IDE terminal)
  • Added transcript view navigation: ? toggles the keyboard shortcut help panel, { / } jump to the previous / next user prompt (vim paragraph motion), and v opens the conversation in $VISUAL or $EDITOR — all require fullscreen rendering
  • Added agent view (Research Preview): claude agents shows every Claude Code session — running, blocked on you, or done — in a single list
  • Added claude plugin details <name> to show a plugin's component inventory and projected per-session token cost
  • Added hook args: string[] field (exec form, spawns the command directly without a shell so path placeholders never need quoting) and continueOnBlock config for PostToolUse (set true to feed the hook's rejection reason back to Claude and continue the turn)
  • MCP stdio servers now receive CLAUDE_PROJECT_DIR in their environment, matching hooks. Plugin configs can reference ${CLAUDE_PROJECT_DIR} in commands
  • Compaction prompt now asks the model to preserve sensitive user instructions
  • /mcp Reconnect now picks up .mcp.json edits without a restart, and shows the HTTP status and URL when reconnecting fails
  • /context all per-skill token estimates now account for the model's tokenizer and show rounded values
  • claude plugin install <name>@<marketplace> auto-refreshes the marketplace and retries before reporting a plugin as not found
  • Remote MCP server reconnect retry on transient failures is now enabled for all users
  • Remote Control, /schedule, claude.ai MCP connectors, and notification preferences are now disabled when ANTHROPIC_API_KEY / apiKeyHelper / ANTHROPIC_AUTH_TOKEN is set, even if a Claude.ai login also exists
  • Fixed autoAllowBashIfSandboxed not auto-approving commands with shell expansions like $VAR and $(cmd), and a hook writing to the terminal corrupting an on-screen interactive prompt (hooks now run without terminal access)
  • Fixed unbounded memory growth when an HTTP/SSE MCP server streams non-protocol data — response bodies now capped at 16 MB per SSE frame
  • Fixed Skill(name *) permission wildcard rules to work as a prefix match (matching Bash(ls *) behavior)
  • Fixed settings hot-reload not detecting edits to symlinked ~/.claude/settings.json, and plugin details failing to load when the marketplace key differs from the manifest name
  • Fixed /model picker "Default" row not reflecting ANTHROPIC_DEFAULT_OPUS_MODEL/ANTHROPIC_DEFAULT_SONNET_MODEL overrides, and a spurious "stream idle timeout" 5 minutes after a response completed
  • Fixed silent exit 1 when 10+ MCP servers are configured and the cache directory is unwritable (error now includes underlying cause), Bash-mode up-arrow history repeating the first entry and clobbering the draft, and pasting/dropping multiple images only inserting the last one
  • Fixed hyperlink readability on dark themes, redundant "Current model" row in model picker, legacy Opus picker resolution, mouse wheel scrolling speed in Cursor and VS Code 1.92–1.104, and scroll behavior in Windows Terminal/VS Code with background sessions
  • Fixed lingering MCP resources from disconnected servers in @server: autocomplete, two-file diff snippet truncation count off-by-one, Grep results not relativizing Windows drive-letter paths and count totals for single-file paths, border-embedded text overflow on CJK/emoji due to visual cell width miscalculation, and fuzzy-match highlighting splitting emoji/astral-plane characters mid-pair
  • Fixed skill argument names with regex metacharacters breaking argument substitution, ProgressBar rendering a full block for an almost-full fractional cell, task polling and fs.watch being resurrected when the last subscriber leaves while a fetch is in flight, and plugin dependency resolution leaving a stale count when the manifest name differs from the source identifier
  • Fixed Insights Time-of-Day chart skewing on unparseable timestamps, keybindings using only the cmd/super/win modifier being flagged as unparseable, claude_code.active_time.total OpenTelemetry metric not being emitted in --print mode, and claude plugin update not preserving cross-plugin symlinks inside a marketplace
  • [VSCode] Cmd/Ctrl+Shift+T reopens the most recently closed session tab (configurable via claudeCode.enableReopenClosedSessionShortcut)
v2.1.138 (May 9, 2026)

View official release

  • Added CLAUDE_CODE_ENABLE_FEEDBACK_SURVEY_FOR_OTEL to re-enable the session quality survey for enterprises capturing responses through OpenTelemetry
  • Added settings.autoMode.hard_deny for auto mode classifier rules that block unconditionally regardless of user intent or allow exceptions
  • Fixed MCP servers configured in .mcp.json, plugins, and claude.ai connectors silently disappearing after /clear in the VS Code extension, JetBrains plugin, and Agent SDK
  • Fixed a rare login loop where a concurrent credential write could overwrite a freshly-rotated OAuth token and force re-login
  • Fixed MCP OAuth refresh tokens being lost when multiple servers refresh concurrently — users with several remote MCP servers should no longer need daily re-authentication
  • Fixed an API error (400) when extended thinking emitted a redacted thinking block after a tool call
  • Fixed --resume / --continue not finding sessions when the project path contains underscores
  • Fixed plan mode not blocking file writes when a matching Edit(...) allow rule exists
  • WSL2: image paste from Windows clipboard now works via a PowerShell fallback when xclip/wl-paste cannot read image data
  • Fixed plugin Stop/UserPromptSubmit hooks failing when cache cleanup deletes a version still in use by a running session
  • Improved visual consistency across slash command dialogs: standardized footer hints, dialog spacing, and arrow-key styling, and the dialog frame now appears immediately during loading
  • Fixed colors appearing at wrong positions in bash command output and markdown code blocks
  • Fixed ReasonML diffs rendering corrupted "undefined" text artifacts at word-diff boundaries
  • Fixed worktree exit dialog warning about uncommitted files in the wrong directory after worktree removal
  • Fixed @ file picker not matching files created mid-session in small non-git directories or in directories with more than 100 entries
  • Fixed failed tool calls not being click-to-expand in fullscreen mode when their output was truncated
  • Fixed Backspace and Ctrl+Backspace getting swapped after using Ctrl+G to open an external editor on terminals with persistent extended-key modes
  • Fixed /usage weekly reset showing time of day instead of the calendar date and welcome banner ellipsis causing column overflow on CJK terminals
  • Fixed /insights crash when session history contains tool calls with malformed input fields, and a renderer crash when a tool's collapsibility classification changes mid-session
  • Fixed a skills entry in plugin.json hiding the plugin's default skills/ directory; listing a file path now shows an error instead of failing silently
  • Fixed IDE shell-integration lock files not respecting CLAUDE_CONFIG_DIR and trailing whitespace in copied terminal output during streaming
  • Fixed plugin uninstall and enable/disable not matching slugs case-insensitively, and tool error truncation marker showing a negative count for surrogate-pair strings
  • Fixed env vars from CLAUDE_ENV_FILE SessionStart hooks going stale after /resume or /clear, and /branch saving a multi-line session title when given a pasted multi-line name
  • Fixed Esc not dismissing dialogs in /install-github-app, /desktop, /resume, and /web-setup, and /doctor MCP schema errors not naming the missing field or showing the source file path
  • Fixed Bash permission prompts showing an internal parser diagnostic instead of a user-readable explanation, and plugin slash commands with spaces (e.g. /myplugin review) not resolving to their namespaced form
  • Fixed AskUserQuestion discarding multi-select answers when supplied as an array, and /clear <name> not labeling the cleared session for /resume
  • Fixed CronList output missing qualifiers and the scheduled prompt, and "Jump to bottom" overlay leaving color artifacts on CJK characters in fullscreen mode
  • Fixed wide markdown tables leaving a stale bordered render in terminal scrollback while streaming, and pasted text being silently dropped when a long prompt with a pasted-text placeholder was auto-truncated
  • Fixed /release-notes getting stuck on an old version after a failed changelog refresh, and /mcp server list not scrolling when there are more servers than fit in the terminal
  • Fixed mid-input slash command autocomplete not working after an initial slash command, and scrolling to bottom re-engaging auto-follow with autoScrollEnabled: false
  • Fixed prompt suggestions being auto-submitted by Enter on an empty input instead of requiring Tab or arrow to accept, and keyboard shortcut hints not reflecting rebound keys from keybindings.json
  • Fixed /settings language change being reverted on Escape after confirming, and /terminal-setup only appearing in autocomplete on exact name match
  • Fixed "Chat about this" on an AskUserQuestion dialog erasing the question text, and MCP tool results being invisible when the server returns content blocks
  • Improved error message when --worktree collides with an existing or stale worktree; changed plugin marketplace removal key to d (matching delete elsewhere) instead of r which collided with retry
  • VSCode extension Windows activation fix (v2.1.137) and internal fixes (v2.1.138)
v2.1.133 (May 8, 2026)

View official release

  • Added worktree.baseRef setting (fresh | head) to choose whether --worktree, EnterWorktree, and agent-isolation worktrees branch from origin/<default> or local HEAD
  • The default fresh changes EnterWorktree's base back to origin/<default> (it has been local HEAD since 2.1.128) — set worktree.baseRef: "head" to keep unpushed commits in new worktrees
  • Added sandbox.bwrapPath and sandbox.socatPath managed settings (Linux/WSL) to specify custom bubblewrap and socat binary locations
  • Added parentSettingsBehavior admin-tier key ('first-wins' | 'merge') to let admins opt SDK managedSettings (parent tier) into the policy merge
  • Hooks now receive the active effort level via the effort.level JSON input field and the $CLAUDE_EFFORT environment variable, and Bash tool commands can read $CLAUDE_EFFORT
  • Improved focus mode behavior
  • Improved memory usage by releasing warm-spare background workers under memory pressure
  • Fixed parallel sessions all dead-ending at 401 after a refresh-token race wiped shared credentials
  • Fixed Edit/Write allow rules scoped to a drive root (C:\) or POSIX / matching incorrectly and always prompting
  • Fixed an unhandled rejection (ECOMPROMISED) when a history or session-log file lock is compromised by clock skew or slow disk
  • Fixed pressing Esc during conversation compaction showing a spurious "Error compacting conversation" notification
  • Fixed HTTP(S)_PROXY / NO_PROXY / mTLS not being respected for the full MCP OAuth flow including discovery, dynamic client registration, token exchange, and token refresh
  • Fixed Read/Write/Edit being denied on mapped network drives passed via --add-dir / SDK additionalDirectories
  • Fixed Remote Control stop/interrupt from claude.ai not fully canceling the CLI session the same way local Esc does, causing queued messages to never advance after interrupting a stuck tool or prompt
  • Fixed /effort in one session unexpectedly changing the effort level of other concurrent sessions, and a related issue where an IDE effort change could be silently dropped
  • Fixed subagents not discovering project, user, or plugin skills via the Skill tool
  • claude --help now lists --remote-control alongside --remote-control-session-name-prefix
  • [VSCode] Fixed claudeCode.claudeProcessWrapper failing with "Unsupported platform" when the extension build doesn't bundle a Claude binary
v2.1.132 (May 6, 2026)

View official release

  • Added CLAUDE_CODE_SESSION_ID env var to the Bash tool subprocess environment, matching the session_id passed to hooks
  • Added CLAUDE_CODE_DISABLE_ALTERNATE_SCREEN=1 env var to opt out of the fullscreen alternate-screen renderer and keep the conversation in the terminal's native scrollback
  • Added a "Pasting…" footer hint while a Ctrl+V image paste is being read from the clipboard
  • Fixed external SIGINT (e.g. IDE stop button, kill -INT) not running graceful shutdown — terminal modes are now restored and the --resume hint is printed instead of an abrupt exit
  • Fixed an uncaught exception when the terminal is closed or SSH disconnects mid-session under the native build
  • Fixed --resume failing with no low surrogate in string when a tool error truncation split an emoji; pre-corrupted sessions are sanitized on load
  • Fixed --permission-mode flag being ignored when resuming a plan-mode session with -p --continue/--resume, and plan mode not being re-applied after ExitPlanMode within the same session
  • Fixed fullscreen mode showing a blank screen after laptop sleep/wake or Ctrl+Z/fg until the next keystroke or stream output
  • Fixed cursor landing mid-grapheme on Ctrl+E/A/K/U/arrow keys when an Indic conjunct or ZWJ emoji wraps across lines
  • Fixed vim operators corrupting text containing decomposed (NFD) accented characters
  • Fixed pasting text starting with / silently swallowing the input or triggering an unknown-command reply
  • Fixed pasting dumping stray escape sequences into the prompt when focus events or mouse-tracking reports interleave with the bracketed paste
  • Fixed mouse wheel scrolling being too fast in Cursor and VS Code 1.92–1.104 due to an upstream xterm.js bug
  • Fixed scroll-wheel handling in JetBrains IDE 2025.2 terminals (spurious arrow keys, wrong-direction events, runaway acceleration)
  • Fixed /usage Ctrl+S hanging when copying the stats screenshot to the clipboard on Linux/X11
  • Fixed /terminal-setup showing a contradictory error in Windows Terminal — Shift+Enter is natively supported there
  • Fixed /effort picker not reflecting the CLAUDE_CODE_EFFORT_LEVEL env var override
  • Fixed /status showing the wrong default model for some users
  • Fixed slash command autocomplete popup being capped at ~3–5 visible commands instead of scaling with terminal height
  • Fixed statusline context_window token counts reflecting cumulative session totals instead of current context usage
  • Fixed Alt+T (thinking toggle) not working on macOS terminals without "Option as Meta" enabled (iTerm2, Terminal.app defaults)
  • Fixed dead keyboard input on Windows after re-opening a background session from claude agents
  • Fixed unbounded memory growth (10GB+ RSS) when a stdio MCP server writes non-protocol data to stdout
  • Fixed MCP servers that connect but fail tools/list silently showing 0 tools — they now retry once and show "connected · tools fetch failed" in /mcp
  • Fixed unauthorized claude.ai MCP connectors showing as "failed" instead of "needs auth", and headless -p mode retrying non-transient 4xx connection failures
  • Fixed Bedrock and Vertex 400 errors when ENABLE_PROMPT_CACHING_1H is set
  • v2.1.131: Fixed VS Code extension failing to activate on Windows due to a hardcoded build path in the bundled SDK (createRequire polyfill bug); fixed Mantle endpoint authentication failing with missing x-api-key header
v2.1.129 (May 6, 2026)

View official release

  • Added --plugin-url <url> flag to fetch a .zip plugin archive from a URL for the current session only — repeatable (--plugin-url A --plugin-url B)
  • Added CLAUDE_CODE_FORCE_SYNC_OUTPUT=1 env var to force-enable synchronized output on terminals where auto-detection misses (e.g. Emacs eat)
  • Added CLAUDE_CODE_PACKAGE_MANAGER_AUTO_UPDATE env var for Homebrew/WinGet installs — Claude Code runs the upgrade command in the background and prompts to restart
  • Plugin manifests: themes and monitors should now be declared under "experimental": { ... } — top-level declarations still work but claude plugin validate will warn
  • Gateway /v1/models discovery for the /model picker is now opt-in via CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY=1 (was automatic in 2.1.126–2.1.128)
  • Ctrl+R history picker now defaults to searching all prompts across all projects, matching pre-2.1.124 behavior — press Ctrl+S to narrow to the current project or session
  • Third-party deployments (Bedrock, Vertex, Foundry, or ANTHROPIC_BASE_URL gateway) no longer see spinner tips pointing at first-party Anthropic surfaces
  • skillOverrides setting now works: off hides from model and /, user-invocable-only hides from model only, name-only collapses description
  • The claude_code.pull_request.count OTel metric now counts PRs/MRs created via MCP tools, not just shell commands
  • Policy refusal error messages now include the API Request ID for easier support debugging
  • Fixed API errors with unrecognized 400 status codes showing raw JSON instead of the underlying error message
  • Fixed /clear not resetting the terminal tab title after a conversation
  • Fixed session title chip from /rename disappearing while a permission or other dialog is active
  • Fixed agent panel below the prompt being hidden when subagents are running (regression in 2.1.122)
  • Fixed external-editor handoff (Ctrl+G) blanking the conversation history above the prompt
  • Fixed /context dumping its rendered ASCII visualization grid into the conversation, wasting ~1.6k tokens per call
  • Fixed /agents Library list arrow-key navigation: highlighted agent stays visible when the list exceeds the viewport
  • Fixed /branch success message not including the new branch's session id for /resume
  • Fixed bold headers with keycap/ZWJ/skin-tone emoji losing trailing characters in fullscreen mode
  • Fixed server-managed settings policy not applying for enterprise/team users whose stored OAuth credentials lacked the user:inference scope
  • Fixed OAuth refresh race after wake-from-sleep that could log out all running sessions
  • Fixed 1-hour prompt cache TTL being silently downgraded to 5 minutes
  • Fixed cache-miss warning appearing spuriously after /clear or compaction when changing /effort or /model
  • Fixed Bash(mkdir *), Bash(touch *) and similar allow rules not being honored for in-project paths
  • Fixed deniedMcpServers patterns with a *:// scheme wildcard not matching mixed-case hostnames
  • Fixed harmless WebSocket warning being logged as an error in --debug during voice mode
  • [VSCode] Fixed /clear not clearing the conversation context and displayed transcript
v2.1.128 (May 4, 2026)

View official release

  • Bare /color (no args) now picks a random session color
  • /mcp now shows the tool count for connected servers and flags servers that connected with 0 tools
  • --plugin-dir now accepts .zip plugin archives in addition to directories
  • --channels now works with console (API key) authentication — console orgs with managed settings must set channelsEnabled: true to enable
  • Updated /model picker: collapsed duplicate Opus 4.7 entries, and current Opus now shows as "Opus" instead of "Opus 4.7"
  • Subprocesses (Bash, hooks, MCP, LSP) no longer inherit OTEL_* environment variables, so OTEL-instrumented apps run via the Bash tool no longer pick up the CLI's own OTLP endpoint
  • MCP: workspace is now a reserved server name — existing servers with that name will be skipped with a warning
  • Reconnecting MCP servers no longer flood the conversation with full tool-name lists on every reconnect — re-announced tools are summarized by server prefix
  • SDK hosts now receive a persistent localSettings suggestion for Bash permission prompts, so "Always allow" writes to .claude/settings.local.json
  • EnterWorktree now creates the new branch from local HEAD as documented, instead of origin/<default-branch> — unpushed commits are no longer dropped
  • Auto mode: when the classifier can't evaluate an action, the error now includes a hint (retry, /compact, or run with --debug)
  • Fixed focus mode briefly dimming the previous response when submitting a new prompt
  • Fixed stray "4;0;" desktop notification on every /exit in Kitty and other terminals that interpret OSC 9 as a notification
  • Fixed Remote Control showing an empty "Opening your options…" message on rate limit instead of actionable upsell options
  • Fixed drag-and-drop image upload hanging on "Pasting text…" when the image read fails
  • Fixed crash loop when piping very large input (>10 MB) to claude -p via stdin
  • Fixed long URLs not being individually clickable on every wrapped row in fullscreen mode
  • Fixed /plugin Components panel showing "Marketplace 'inline' not found" for plugins loaded via --plugin-dir
  • Fixed MCP tool results dropping images when the server returns both structured content and content blocks
  • Fixed fenced code blocks inside list items carrying leading whitespace into the clipboard on copy-paste
  • Fixed tab navigation in /config stranding focus — the tab header now stays focused so arrows and Esc keep working
  • Fixed markdown link labels being lost on terminals without OSC 8 hyperlink support — links now render as label (url) instead of just the URL
  • Fixed sessions on 1M-context models with a smaller autocompact window being falsely blocked with "Prompt is too long" before reaching the actual API limit
  • Fixed parallel shell tool calls: a failing read-only command (grep, git diff, ls) no longer cancels sibling calls
  • Fixed banner showing "with X effort" on models that don't support effort
  • Fixed /fast on 3P providers fuzzy-matching to an unrelated skill instead of showing "not available"
  • Fixed Bedrock default model resolving to global.* instead of the region-appropriate prefix
  • Fixed vim mode: Space in NORMAL mode now moves the cursor right, matching standard vi/vim behavior
  • Fixed terminal progress indicator (OSC 9;4) flickering off between tool calls — stays visible across the full turn
  • Fixed /rename without args failing on resumed sessions whose last entry is a compact boundary
  • Fixed stale "remote-control is active" status lines from prior sessions appearing after --resume/--continue
  • Fixed stale installed_plugins.json entries pointing at deleted cache directories polluting PATH
  • Fixed MCP stdio servers receiving corrupted arguments when CLAUDE_CODE_SHELL_PREFIX is set and an argument contains spaces or shell metacharacters
  • Fixed sub-agent progress summaries missing the prompt cache (~3× cache_creation reduction)
  • Fixed /plugin update never detecting new versions of npm-sourced plugins
  • Fixed sub-agent summaries firing repeatedly while a sub-agent's transcript is static, capping worst-case token cost on idle sub-agents
  • Headless --output-format stream-json: init.plugin_errors now includes --plugin-dir load failures in addition to dependency demotions
v2.1.126 (May 1, 2026)

View official release

  • Added claude project purge [path] subcommand to delete all Claude Code state for a project (transcripts, tasks, file history, config entry) with --dry-run, -y/--yes, -i/--interactive, and --all
  • /model picker now lists models from your gateway's /v1/models endpoint when ANTHROPIC_BASE_URL points at an Anthropic-compatible gateway
  • --dangerously-skip-permissions now bypasses prompts for writes to .claude/, .git/, .vscode/, shell config files, and other previously-protected paths (catastrophic removal commands still prompt as a safety net)
  • claude auth login now accepts an OAuth code pasted into the terminal when the browser callback can't reach localhost (WSL2, SSH, containers)
  • OpenTelemetry: claude_code.skill_activated now fires for user-typed slash commands and carries a new invocation_trigger attribute (user-slash, claude-proactive, or nested-skill)
  • Auto mode: the spinner now turns red when a permission check stalls, instead of looking like the tool is running
  • Host-managed deployments (CLAUDE_CODE_PROVIDER_MANAGED_BY_HOST) no longer auto-disable analytics on Bedrock/Vertex/Foundry
  • Windows: PowerShell 7 installed via the Microsoft Store, MSI without PATH, or .NET global tool is now detected
  • Windows: when the PowerShell tool is enabled, Claude now treats PowerShell as the primary shell instead of defaulting to Bash
  • Read tool: removed the per-file malware-assessment reminder that could cause spurious refusals and "this is not malware" commentary on legacy models
  • **Security:** Fixed allowManagedDomainsOnly / allowManagedReadPathsOnly being ignored when a higher-priority managed-settings source lacked a sandbox block
  • Fixed pasting an image larger than 2000px breaking the session — images are now downscaled on paste, and oversized images in history are automatically removed and the request retried
  • Fixed showing the login screen for "OAuth not allowed for organization" errors — now shows guidance to contact your admin
  • Fixed OAuth login failing with timeout on slow or proxied connections, in IPv6-only devcontainers, and when the browser callback can't reach localhost
  • Fixed a rare race where a concurrent credential write could clear a valid OAuth refresh token
  • Fixed API retry countdown sticking at "0s" instead of counting down between attempts
  • Fixed "Stream idle timeout" errors after waking Mac from sleep mid-request and during long model thinking pauses on background/remote sessions
  • Fixed a hang where the assistant could finish thinking but show no output after a run of empty turns
  • Fixed overly fast trackpad scrolling in Cursor and VS Code 1.92–1.104 integrated terminals
  • Fixed Japanese/Korean/Chinese text rendering as garbled characters on Windows in no-flicker mode
  • Fixed Ctrl+L clearing the prompt input — it now only forces a screen redraw, matching readline behavior
  • Fixed deferred tools (WebSearch, WebFetch, etc.) not being available to skills with context: fork and other subagents on their first turn
  • Fixed plan-mode tools being unavailable in interactive sessions launched with --channels
  • Fixed /plugin Uninstall reporting "Enabled" instead of "Uninstalled"
  • Bounded total size of file-modified reminders when a linter touches many files at once
  • Fixed /remote-control retries appearing stuck on "connecting…" — each retry now shows its result
  • Fixed Remote Control failure notification not showing the error reason for initial connection failures
  • Windows: clipboard writes no longer expose copied content in process command-line arguments visible to EDR/SIEM telemetry; also fixes >22KB selections not reaching the clipboard
  • PowerShell tool: bare -- (e.g. git diff -- file) is no longer mis-flagged as the --% stop-parsing token
  • Fixed Agent SDK hang when the model emits a malformed tool name in a parallel tool call batch
v2.1.123 (April 29, 2026)

View official release

  • Fixed OAuth authentication failing with a 401 retry loop when CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1 is set
v2.1.122 (April 29, 2026)

View official release

  • Added ANTHROPIC_BEDROCK_SERVICE_TIER environment variable to select a Bedrock service tier (default, flex, or priority), sent as the X-Amzn-Bedrock-Service-Tier header
  • Pasting a PR URL into the /resume search box now finds the session that created that PR (GitHub, GitHub Enterprise, GitLab, and Bitbucket)
  • /mcp now shows claude.ai connectors hidden by a manually-added server with the same URL, with a hint to remove the duplicate
  • Clarified the /mcp message shown when an MCP server is still unauthorized after the browser sign-in flow
  • OpenTelemetry: numeric attributes on api_request/api_error log events are now emitted as numbers, not strings
  • OpenTelemetry: added claude_code.at_mention log event for @-mention resolution
  • Fixed /branch producing forks that fail with "tool_use ids were found without tool_result blocks" when the source session contained entries from rewound timelines
  • Fixed /model not showing the Effort option for Bedrock application inference profile ARNs, and those ARNs not receiving output_config.effort
  • Fixed Vertex AI / Bedrock returning invalid_request_error: output_config: Extra inputs are not permitted on session-title generation and other structured-output queries
  • Fixed Vertex AI count_tokens endpoint returning 400 errors for users behind proxy gateways
  • Fixed spinnerTipsOverride.excludeDefault not suppressing the time-based spinner tips
  • Fixed ToolSearch missing MCP tools that connected after session start in nonblocking mode
  • Fixed !exit / !quit in bash mode terminating the CLI instead of running as a shell command
  • Fixed images sent to newer models being resized to 2576px per side instead of the correct 2000px maximum
  • Fixed remote control session idle status redrawing twice per second, which could flood tmux -CC control pipes and pause the terminal
  • Fixed assistant messages appearing blank in some sessions due to a stale view preference
  • Fixed a malformed hooks entry in settings.json no longer invalidating the entire file
  • Voice mode: keybindings bound to Caps Lock now show an error since terminals don't deliver Caps Lock as a key event
v2.1.121 (April 28, 2026)

View official release

  • Added claude plugin prune to remove orphaned auto-installed plugin dependencies; plugin uninstall --prune cascades
  • Added alwaysLoad option to MCP server config — when true, all tools from that server skip tool-search deferral and are always available
  • Added a type-to-filter search box to /skills so you can find a skill in long lists without scrolling
  • PostToolUse hooks can now replace tool output for all tools via hookSpecificOutput.updatedToolOutput (previously MCP-only)
  • --dangerously-skip-permissions no longer prompts for writes to .claude/skills/, .claude/agents/, and .claude/commands/
  • /terminal-setup now enables iTerm2's "Applications in terminal may access clipboard" setting so /copy works, including from tmux
  • SDK and claude -p: CLAUDE_CODE_FORK_SUBAGENT=1 now works in non-interactive sessions
  • MCP servers that hit a transient error during startup now auto-retry up to 3 times instead of staying disconnected
  • Fullscreen mode: typing into the prompt no longer jumps scroll back to the bottom after you've scrolled up to read earlier output
  • Dialogs that overflow the terminal are now scrollable with arrow keys, PgUp/PgDn, home/end, and mouse wheel in both fullscreen and non-fullscreen modes
  • Clicking any line of a long URL that wraps across rows in fullscreen mode now opens the full URL
  • The terminal tab session title is now generated in your configured language setting
  • Vertex AI: support X.509 certificate-based Workload Identity Federation (mTLS ADC)
  • Fixed unbounded memory growth (multi-GB RSS) when processing many images in a session
  • Fixed /usage leaking up to ~2GB of memory on machines with large transcript histories
  • Fixed --resume crashing on startup in external builds, and failing on large sessions when a transcript line was corrupted by an unclean shutdown
  • Fixed Bash tool becoming permanently unusable when the directory Claude was started in is deleted or moved mid-session
  • Fixed scrollback duplication when pressing Ctrl+L or triggering a redraw in non-fullscreen mode on tmux, GNOME Terminal, Windows Terminal, and Konsole
  • Fixed /usage returning "rate limited" after a stale OAuth token — now refreshes automatically
  • Fixed /focus showing "Unknown command" when the fullscreen renderer is off — now explains how to enable it
v2.1.120 (April 25, 2026)

View official release

  • Added claude ultrareview [target] subcommand to run /ultrareview non-interactively from CI or scripts — prints findings to stdout (--json for raw output) and exits 0 on completion or 1 on failure
  • Windows: Git for Windows (Git Bash) is no longer required — when absent, Claude Code uses PowerShell as the shell tool
  • Skills can now reference the current effort level with ${CLAUDE_EFFORT} in their content
  • Set AI_AGENT environment variable for subprocesses so gh can attribute traffic to Claude Code
  • claude plugin validate now accepts $schema, version, and description at the top level of marketplace.json and $schema in plugin.json
  • Auto-compact in auto mode now displays auto (lowercase, no token count) instead of a misleading token value
  • Show a "use PgUp/PgDn to scroll" hint when the terminal sends arrow keys instead of scroll events
  • Faster session start when you have many claude.ai connectors configured but not authorized
  • Fixed pressing Esc during a stdio MCP tool call closing the entire server connection (regression in 2.1.105)
  • Fixed /rewind and other interactive overlays not responding to keyboard input after launching with claude --resume
  • Fixed terminal scrollback duplication in non-fullscreen mode (resize, dialog dismiss, long sessions)
  • Fixed DISABLE_TELEMETRY / CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC not suppressing usage metrics telemetry for API and enterprise users
  • Fixed false-positive "Dangerous rm operation" permission prompts in auto mode for multi-line bash commands containing both a pipe and a redirect
  • Fixed long selection menus clipping below the terminal in fullscreen mode — the focused option now stays on screen as you scroll
  • Fixed slash command picker jumping while typing, and improved highlight to only match contiguous substrings in blue
  • Fixed find in the Bash tool exhausting open file descriptors on large directory trees, causing host-wide crashes (macOS/Linux native builds)
v2.1.119 (April 23, 2026)

View official release

  • /config settings (theme, editor mode, verbose, etc.) now persist to ~/.claude/settings.json and participate in project/local/policy override precedence
  • Added prUrlTemplate setting to point the footer PR badge at a custom code-review URL instead of github.com
  • Added CLAUDE_CODE_HIDE_CWD environment variable to hide the working directory in the startup logo
  • --from-pr now accepts GitLab merge-request, Bitbucket pull-request, and GitHub Enterprise PR URLs
  • --print mode now honors the agent's tools: and disallowedTools: frontmatter, matching interactive-mode behavior
  • --agent <name> now honors the agent definition's permissionMode for built-in agents
  • PowerShell tool commands can now be auto-approved in permission mode, matching Bash behavior
  • Slash command suggestions now highlight the characters that matched your query
  • Slash command picker now wraps long descriptions onto a second line instead of truncating
  • owner/repo#N shorthand links in output now use your git remote's host instead of always pointing at github.com
  • Vim mode: Esc in INSERT no longer pulls a queued message back into the input; press Esc again to interrupt
  • Fixed /skills Enter key closing the dialog instead of pre-filling /<skill-name> in the prompt
  • Fixed /agents detail view mislabeling built-in tools unavailable to subagents as "Unrecognized"
  • Fixed /export showing the current default model instead of the model the conversation actually used
  • Fixed /plan and /plan open not acting on the existing plan when entering plan mode
  • Fixed /usage progress bars overlapping with their "Resets …" labels
  • Fixed Rewind overlay showing "(no prompt)" for messages with image attachments
v2.1.118 (April 23, 2026)

View official release

  • Added vim visual mode (v) and visual-line mode (V) with selection, operators, and visual feedback
  • Merged /cost and /stats into /usage — both remain as typing shortcuts that open the relevant tab
  • Create and switch between named custom themes from /theme, hand-edit JSON files in ~/.claude/themes/; plugins can also ship themes via a themes/ directory
  • Hooks can now invoke MCP tools directly via type: "mcp_tool"
  • Added DISABLE_UPDATES env var to completely block all update paths including manual claude update — stricter than DISABLE_AUTOUPDATER
  • WSL on Windows can now inherit Windows-side managed settings via the wslInheritsWindowsSettings policy key
  • Auto mode: include "$defaults" in autoMode.allow, autoMode.soft_deny, or autoMode.environment to add custom rules alongside the built-in list instead of replacing it
  • Added a "Don't ask again" option to the auto mode opt-in prompt
  • Added claude plugin tag to create release git tags for plugins with version validation
  • --continue/--resume now find sessions that added the current directory via /add-dir
  • /color now syncs the session accent color to claude.ai/code when Remote Control is connected
  • The /model picker now honors ANTHROPIC_DEFAULT_*_MODEL_NAME/_DESCRIPTION overrides when using a custom ANTHROPIC_BASE_URL gateway
  • Fixed macOS keychain race where a concurrent MCP token refresh could overwrite a freshly-refreshed OAuth token, causing unexpected "Please run /login" prompts
  • Fixed /fork writing the full parent conversation to disk per fork — now writes a pointer and hydrates on read
  • Fixed Alt+K / Alt+X / Alt+^ / Alt+_ freezing keyboard input
v2.1.117 (April 22, 2026)

View official release

  • /model selections persist across restarts even when the project pins a different model; the startup header shows when the active model comes from a project or managed-settings pin
  • /resume now offers to summarize stale, large sessions before re-reading them, matching the existing --resume behavior
  • Native builds on macOS and Linux replace Glob and Grep with embedded bfs and ugrep available through the Bash tool — faster searches without a separate tool round-trip (Windows and npm-installed builds unchanged)
  • Default effort for Pro/Max subscribers on Opus 4.6 and Sonnet 4.6 is now high (was medium)
  • Forked subagents can now be enabled on external builds by setting CLAUDE_CODE_FORK_SUBAGENT=1
  • Agent frontmatter mcpServers are now loaded for main-thread agent sessions via --agent
  • Faster startup when both local and claude.ai MCP servers are configured (concurrent connect now default)
  • plugin install on an already-installed plugin now installs any missing dependencies instead of stopping at "already installed"
  • Plain-CLI OAuth sessions no longer die with "Please run /login" when the access token expires mid-session — the token is now refreshed reactively on 401
  • Fixed WebFetch hanging on very large HTML pages by truncating input before HTML-to-markdown conversion
  • Fixed Opus 4.7 sessions showing inflated /context percentages and autocompacting too early — now computes against Opus 4.7's native 1M context window
v2.1.116 (April 20, 2026)

View official release

  • /resume is significantly faster on large sessions (up to 67% on 40MB+ sessions) and handles sessions with many dead-fork entries more efficiently
  • Faster MCP startup when multiple stdio servers are configured; resources/templates/list is now deferred to first @-mention
  • Smoother fullscreen scrolling in VS Code, Cursor, and Windsurf terminals — /terminal-setup now configures the editor's scroll sensitivity
  • Thinking spinner now shows progress inline ("still thinking", "thinking more", "almost done thinking"), replacing the separate hint row
  • /config search now matches option values (e.g. searching "vim" finds the Editor mode setting)
  • /doctor can now be opened while Claude is responding, without waiting for the current turn to finish
  • /reload-plugins and background plugin auto-update now auto-install missing plugin dependencies from marketplaces you've already added
  • Bash tool now surfaces a hint when gh commands hit GitHub's API rate limit, so agents can back off instead of retrying
  • Security: sandbox auto-allow no longer bypasses the dangerous-path safety check for rm/rmdir targeting /, $HOME, or other critical system directories
  • Fixed Devanagari and other Indic scripts rendering with broken column alignment in the terminal UI
  • Fixed Ctrl+- undo and Cmd+Left/Right line navigation in terminals using the Kitty keyboard protocol (iTerm2, Ghostty, kitty, WezTerm, Windows Terminal)
  • Fixed Ctrl+Z hanging the terminal when Claude Code is launched via a wrapper process (e.g. npx, bun run)
  • Fixed scrollback duplication in inline mode and modal search dialogs overflowing at short terminal heights
v2.1.114 (April 18, 2026)

View official release

  • Fixed a crash in the permission dialog when an agent teams teammate requested tool permission
v2.1.113 (April 17, 2026)

View official release

  • CLI now spawns a native Claude Code binary (via a per-platform optional dependency) instead of bundled JavaScript
  • Added sandbox.network.deniedDomains setting to block specific domains even when a broader allowedDomains wildcard would otherwise permit them
  • Fullscreen mode: Shift+↑/↓ now scrolls the viewport when extending a selection past the visible edge
  • Ctrl+A and Ctrl+E now move to the start/end of the current logical line in multiline input, matching readline behavior
  • Windows: Ctrl+Backspace now deletes the previous word
  • Improved /loop: pressing Esc cancels pending wakeups, and wakeups display as "Claude resuming /loop wakeup" for clarity
  • /extra-usage and @-file autocomplete suggestions now work from Remote Control (mobile/web) clients
  • Improved /ultrareview: faster launch with parallelized checks, diffstat in the launch dialog, and animated launching state
  • Security: on macOS, /private/{etc,var,tmp,home} paths are now treated as dangerous removal targets under Bash(rm:*) allow rules
  • Security: Bash deny rules now match commands wrapped in env/sudo/watch/ionice/setsid and similar exec wrappers
  • Security: Bash(find:*) allow rules no longer auto-approve find -exec/-delete
  • Bash tool: multi-line commands whose first line is a comment now show the full command in the transcript (UI-spoofing mitigation)
  • Fixed Bash dangerouslyDisableSandbox running commands outside the sandbox without a permission prompt
  • Long URLs in responses and bash output stay clickable when they wrap across lines (in terminals with OSC 8 hyperlinks)
  • Fixed MCP concurrent-call timeout handling; SDK image content blocks that fail to process now degrade to a text placeholder instead of crashing the session
v2.1.112 (April 16, 2026)

View official release

  • Claude Opus 4.7 xhigh is available — use /effort xhigh or --effort xhigh (other models fall back to high)
  • Auto mode is now available for Max subscribers on Opus 4.7; --enable-auto-mode removed, use --permission-mode auto instead
  • /effort without arguments opens an interactive slider (left/right to pick, Enter to apply)
  • New /less-permission-prompts skill scans transcripts and proposes a prioritized Bash/MCP allowlist
  • New /ultrareview [PR] runs a deep cloud-based multi-agent code review
  • /tui fullscreen switches to flicker-free alt-screen rendering; /focus toggles the minimal focus view
  • /recap generates a session summary on demand; /undo is now an alias for /rewind
  • Push notification tool — Claude can send mobile push notifications when Remote Control is enabled
  • Ctrl+U now clears the entire input buffer (Ctrl+Y restores); Ctrl+L forces a full screen redraw
  • Read-only bash commands with glob patterns (e.g. ls *.ts) and cd <project-dir> && prefixes no longer trigger a permission prompt
  • "Auto (match terminal)" theme follows your terminal's dark/light mode — select from /theme
v2.1.105 (April 13, 2026)

View official release

  • /proactive is now an alias for /loop (same behavior as the existing /loop)
  • PreCompact hooks can now block compaction by exiting with code 2 or returning {"decision":"block"}
  • Plugin manifests support a top-level monitors key that auto-arms background monitors at session start or on skill invoke
  • Stalled API streams now abort after 5 minutes of no data and retry non-streaming instead of hanging indefinitely
  • /doctor layout overhaul with status icons; press f to have Claude fix reported issues
  • WebFetch now strips <style> and <script> contents so CSS-heavy pages no longer exhaust the content budget
v2.1.101 (April 10, 2026)

View official release

  • /team-onboarding command to generate teammate ramp-up documentation from local usage patterns
  • OS CA certificate store now trusted by default for enterprise TLS proxy compatibility
  • Remote session features like /ultraplan auto-create cloud environments without web setup
  • Fixed memory leak where long sessions retained historical message copies in virtual scroller
  • Fixed command injection vulnerability in POSIX which fallback for LSP binary detection
v2.1.98 (April 9, 2026)

View official release

  • /setup-vertex command to interactively configure Google Vertex AI authentication, project, region, and model pins
  • --exclude-dynamic-system-prompt-sections flag to move dynamic sections to user message for improved cross-user prompt cache reuse
  • Monitor tool for streaming events from background scripts
  • Fixed Bash tool permission bypass vulnerabilities (backslash-escaped flags, compound commands)
  • Improved /resume picker with filter hints, project/worktree/branch names
v2.1.97 (April 8, 2026)

View official release

  • /autofix-pr command to spawn a web session that auto-fixes PR CI failures and review comments
  • /web-setup command to connect your GitHub account to Claude Code on the web
  • Focus view toggle (Ctrl+O) in NO_FLICKER mode showing prompt, tool summary, and response
  • refreshInterval status line setting to re-run the status line command every N seconds
  • Running subagent indicator (● N running) in /agents
  • Hardened Bash tool permissions around env-var prefixes and network redirects
v2.1.92 (April 4, 2026)

View official release

  • /powerup command for interactive feature lessons with animated demos
  • /ultraplan command for drafting plans, reviewing in browser, and executing remotely
  • --remote-control-session-name-prefix to customize Remote Control session name prefix
  • /vim command removed (toggle via /config → Editor mode)
  • Interactive Bedrock setup wizard added to login screen
  • Per-model and cache-hit breakdown added to /cost for subscription users
v2.1.63 (February 28, 2026)

View official release

  • /simplify command for reviewing and improving changed code quality
  • /batch command for executing multiple tasks in batch mode
  • HTTP hooks for event-driven external integrations
  • Settings are now shared across worktrees
  • Multiple memory leak fixes improving long session stability
v2.1.59 (February 26, 2026)

View official release

  • Auto-memory feature for automatically retaining context across sessions
  • /copy command to copy last response or code blocks to clipboard
  • Improved bash command prefix suggestions for more accurate completions
v2.1.53 (February 25, 2026)

View official release

  • Fixed UI flickering issues for improved display stability
  • Improved bulk agent termination for more efficient sub-agent management
  • Enhanced Windows stability with better path handling and process management
v2.1.51 (February 24, 2026)

View official release

  • remote-control subcommand for controlling Claude Code from external processes
  • Improved plugin marketplace UI for easier plugin discovery and installation
  • Security fixes to strengthen sandbox robustness
v2.1.45 (February 17, 2026)

View official release

  • Claude Sonnet 4.6 model support added
  • spinnerTipsOverride setting to customize spinner tips
  • Agent Teams now works on Bedrock, Vertex, and Foundry
  • Fixed sandbox temp file write errors on macOS
v2.1.30 (February 3, 2026)

View official release

  • pages parameter added to Read tool for PDF page-range reading
  • --client-id / --client-secret options for MCP server OAuth
  • /debug command for session troubleshooting
  • Unnecessary text block API sends fixed, reducing token waste
v2.1.20 (January 27, 2026)

View official release

  • PR review status indicator in prompt footer (approved/changes requested/pending/draft)
  • --add-dir directories can now load CLAUDE.md files
  • Task deletion via TaskUpdate tool
  • Wide character (emoji, CJK) rendering artifacts fixed
v2.1.9 (January 16, 2026)

View official release

  • MCP tool search auto-enable threshold configurable with auto:N syntax
  • plansDirectory setting for custom plan file location
  • PreToolUse hooks can now return additionalContext
  • Long session parallel tool call errors fixed
v2.0.73 (December 19, 2025)

View official release

  • Clickable [Image #N] links to open attached images in default viewer
  • Plugin search screen filtering (name, description, marketplace)
  • /theme command opens theme picker directly
  • VSCode tab icon badges (pending permissions: blue, unread completions: orange)

About Claude Code Commands

Claude Code Commands is a comprehensive reference covering all commands needed for terminal-based AI coding with Anthropic's Claude Code CLI. It includes over 140 slash commands, keyboard shortcuts, and CLI options, each with descriptions and practical examples. Version-specific update history is also included, making it easy to track new commands and changes across releases.

Key Features

  • Covers slash commands, keyboard shortcuts, and CLI options
  • Descriptions and practical examples for each command
  • Category-based filtering
  • Real-time search functionality
  • One-click command copying
  • Track command changes with version-specific update history
  • Includes CI/CD pipeline usage examples

Useful When

  • Looking up the /compact vs /clear difference when your Claude Code context window is nearly full mid-session
  • Checking the correct flag for non-interactive CI/CD usage (--dangerously-skip-permissions) before adding Claude Code to a GitHub Actions workflow
  • Finding the right @ mention (file, folder, URL, git) to give Claude Code context without copy-pasting code manually
  • Reviewing MCP server setup commands (/mcp, claude mcp add) before integrating Slack, GitHub, or a database into your Claude Code workspace
  • Sharing a quick-reference cheat sheet with a new teammate who just installed Claude Code for the first time

FAQ

What is Claude Code?

Claude Code is Anthropic's official AI coding assistant that runs in your terminal. It can read, write, and execute code in your project, run shell commands, and hold multi-turn conversations about your codebase — all without leaving the CLI.

What's the difference between /compact and /clear?

/compact summarizes and compresses the conversation history to free up context window space while keeping key information. /clear wipes the entire history and starts a fresh session. Use /compact when you want continuity; use /clear when you want a clean slate.

What is the difference between claude -p and claude "prompt"?

claude "prompt" starts an interactive session with the given prompt. claude -p "prompt" runs in print (pipe) mode — it outputs the response and exits immediately, making it suitable for scripting, piping, and CI/CD workflows.

Can I switch models mid-session?

Yes. Use the /model command inside a session to see available models and switch. You can also set a default model at startup with --model claude-opus-4-5 or similar flags.

What are MCP servers and how do I add one?

MCP (Model Context Protocol) servers extend Claude Code with external tools — like GitHub, Slack, databases, or browsers. Add one with claude mcp add <name> <command>, then manage it with /mcp inside a session. Check the MCP marketplace for community-built servers.

What does /init do and when should I run it?

/init scans your project and auto-generates a CLAUDE.md file with your directory structure, common commands, and coding conventions. Claude references this file automatically in every session. Run it once per project — usually right after cloning a new repo.

What should I do when the context window is full?

Use /compact to summarize the conversation and free up context space. If you want to start completely fresh, use /clear instead. You can also use /cost to check your current token usage before deciding.

How do I run Claude Code non-interactively in GitHub Actions?

Use claude -p "your prompt" with --dangerously-skip-permissions to bypass interactive permission prompts. Combine with --output-format json for machine-readable output. For example: cat build.log | claude -p "Summarize the errors" --output-format json.

What is the memory feature in Claude Code?

The /memory command opens an interface to edit CLAUDE.md files. Content written here persists across sessions. The auto-memory feature can also automatically save important information to CLAUDE.md.

What are the most useful keyboard shortcuts?

Escape cancels the current operation. Ctrl+C interrupts a running task. Shift+Enter inserts a newline without submitting. Tab selects completions. Use /keybindings to view and customize all bindings.

What does the /btw command do in Claude Code?

/btw lets you ask a quick side question without leaving it in the conversation history. The answer appears in a dismissible overlay and is never appended to the transcript. Running /btw with no argument reopens the overlay for your last side question on v2.1.212 or later. On older versions, the question text is a required argument, so a bare /btw does nothing — the most common reason it looks broken. Unlike /branch (fork the conversation), /fork (copy it into a new background session), and /subtask (delegate to a subagent), which exist for parallel work, /btw is purely for gathering information.

How do I fix a hook timed out error in Claude Code?

Set a timeout, in seconds, inside the individual hook handler object in settings.json — at the same level as type and command. The defaults are 600 seconds for command, http, and mcp_tool handlers, 30 seconds for prompt, and 60 seconds for agent. The UserPromptSubmit event lowers the command, http, and mcp_tool default to 30 seconds, and MessageDisplay lowers it to 10 seconds. A hook that runs past its timeout is cancelled and its output is discarded, so the fix is to raise the timeout value on that handler.

How do I stop, suspend, and resume a Claude Code session?

Press Esc to interrupt the current response or tool call; the work completed up to that point is preserved. When a dialog is open, Esc closes the dialog instead (v2.1.202 and later). To suspend the Claude Code process itself on Unix-like systems, press Ctrl+Z to drop back to the shell and run fg to return. To pick a session back up, claude --continue resumes the most recent session in the current directory, while claude --resume with no argument opens an interactive session picker; claude --resume <name> resumes a named session directly.