added Week 15 · April 6–10, 2026 View current →
--- a/2026-w15.md +++ b/2026-w15.md @@ -0,0 +1,83 @@ +Releases [v2.1.92 → v2.1.101](</en/changelog#2-1-92>)4 features · April 6–10 + +Ultraplanresearch preview + +Kick off plan mode in the cloud from your terminal, then review the result in your browser. Claude drafts the plan in a Claude Code on the web session while your terminal stays free; when it’s ready you comment on individual sections, ask for revisions, and choose to execute remotely or send it back to your CLI. As of v2.1.101 the first run auto-creates a default cloud environment, so there’s no web setup step before you can try it. + +Run the command, or just include the keyword in any prompt: + +Claude Code + + > /ultraplan migrate the auth service from sessions to JWTs + +[Ultraplan guide](</en/ultraplan>) + +Monitor toolv2.1.98 + +A new built-in tool that spawns a background watcher and streams its events into the conversation: each event lands as a new transcript message that Claude reacts to immediately. Tail a training run, babysit a PR’s CI, or auto-fix a dev server crash the moment it happens, all without a Bash sleep loop holding the turn open. + +Ask Claude to watch something while you keep working: + +Claude Code + + > Tail server.log in the background and tell me the moment a 5xx shows up + +This pairs with `/loop`, which now self-paces: omit the interval and Claude schedules the next tick based on the task, or reaches for the Monitor tool to skip polling altogether. + +Claude Code + + > /loop check CI on my PR + +[Monitor tool reference](</en/tools-reference#monitor-tool>) + +/autofix-prCLI + +PR auto-fix landed on the web in Week 13. Now you can turn it on without leaving your terminal: `/autofix-pr` infers the open PR for your current branch and enables auto-fix for it on Claude Code on the web in one step. Push your branch, run the command, walk away; Claude watches CI and review comments and pushes fixes until it’s green. + +Run it from the PR’s branch: + +Claude Code + + > /autofix-pr + +[Auto-fix pull requests](</en/claude-code-on-the-web#auto-fix-pull-requests>) + +/team-onboardingv2.1.101 + +Generates a teammate ramp-up guide from your local Claude Code usage. Run it in a project you know well and hand the output to a new teammate so they can replay your setup instead of starting from defaults. + +Run it from a project you’ve spent real time in: + +Claude Code + + > /team-onboarding + +[Commands reference](</en/commands>) + +Other wins + +Focus view: press `Ctrl+O` in flicker-free mode to collapse the view to your last prompt, a one-line tool summary with diffstats, and Claude’s final response + +Guided [Bedrock](</en/amazon-bedrock>) and [Vertex AI](</en/google-vertex-ai>) setup wizards on the login screen: pick “3rd-party platform” for step-by-step auth, region, credential check, and model pinning + +`/agents` gets a tabbed layout: a Running tab shows live subagents with a `● N running` count, plus Run agent and View running instance actions in the Library tab + +Default effort level is now `high` for API-key, Bedrock, Vertex, Foundry, Team, and Enterprise users (control with `/effort`) + +`/cost` shows a per-model and cache-hit breakdown for subscription users + +`/release-notes` is now an interactive version picker + +Status line: new `refreshInterval` setting re-runs the command every N seconds, and `workspace.git_worktree` in the JSON input + +`CLAUDE_CODE_PERFORCE_MODE`: Edit/Write fail on read-only files with a `p4 edit` hint instead of silently overwriting + +OS CA certificate store is now trusted by default, so enterprise TLS proxies work without extra setup (`CLAUDE_CODE_CERT_STORE=bundled` to opt out) + +Amazon Bedrock powered by Mantle: set `CLAUDE_CODE_USE_MANTLE=1` + +Hardened Bash tool permissions: backslash-escaped flags, env-var prefixes, `/dev/tcp` redirects, and compound commands now prompt correctly + +`UserPromptSubmit` hooks can set the session title via `hookSpecificOutput.sessionTitle` + +[Full changelog for v2.1.92–v2.1.101 →](</docs/en/changelog#2-1-92>)
modified Changelog View current →
--- a/changelog.md +++ b/changelog.md @@ -1,4 +1,56 @@ This page is generated from the [CHANGELOG.md on GitHub](<https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md>). Run `claude --version` to check your installed version. + +​ + +2.1.107 + +April 14, 2026 + + * Show thinking hints sooner during long operations + +​ + +2.1.105 + +April 13, 2026 + + * Added `path` parameter to the `EnterWorktree` tool to switch into an existing worktree of the current repository + * Added PreCompact hook support: hooks can now block compaction by exiting with code 2 or returning `{"decision":"block"}` + * Added background monitor support for plugins via a top-level `monitors` manifest key that auto-arms at session start or on skill invoke + * `/proactive` is now an alias for `/loop` + * Improved stalled API stream handling: streams now abort after 5 minutes of no data and retry non-streaming instead of hanging indefinitely + * Improved network error messages: connection errors now show a retry message immediately instead of a silent spinner + * Improved file write display: long single-line writes (e.g. minified JSON) are now truncated in the UI instead of paginating across many screens + * Improved `/doctor` layout with status icons; press `f` to have Claude fix reported issues + * Improved `/config` labels and descriptions for clarity + * Improved skill description handling: raised the listing cap from 250 to 1,536 characters and added a startup warning when descriptions are truncated + * Improved `WebFetch` to strip `<style>` and `<script>` contents from fetched pages so CSS-heavy pages no longer exhaust the content budget before reaching actual text + * Improved stale agent worktree cleanup to remove worktrees whose PR was squash-merged instead of keeping them indefinitely + * Improved MCP large-output truncation prompt to give format-specific recipes (e.g. `jq` for JSON, computed Read chunk sizes for text) + * Fixed images attached to queued messages (sent while Claude is working) being dropped + * Fixed screen going blank when the prompt input wraps to a second line in long conversations + * Fixed leading whitespace getting copied when selecting multi-line assistant responses in fullscreen mode + * Fixed leading whitespace being trimmed from assistant messages, breaking ASCII art and indented diagrams + * Fixed garbled bash output when commands print clickable file links (e.g. Python `rich`/`loguru` logging) + * Fixed alt+enter not inserting a newline in terminals using ESC-prefix alt encoding, and Ctrl+J not inserting a newline (regression in 2.1.100) + * Fixed duplicate “Creating worktree” text in EnterWorktree/ExitWorktree tool display + * Fixed queued user prompts disappearing from focus mode + * Fixed one-shot scheduled tasks re-firing repeatedly when the file watcher missed the post-fire cleanup + * Fixed inbound channel notifications being silently dropped after the first message for Team/Enterprise users + * Fixed marketplace plugins with `package.json` and lockfile not having dependencies installed automatically after install/update + * Fixed marketplace auto-update leaving the official marketplace in a broken state when a plugin process holds files open during the update + * Fixed “Resume this session with…” hint not printing on exit after `/resume`, `--worktree`, or `/branch` + * Fixed feedback survey shortcut keys firing when typed at the end of a longer prompt + * Fixed stdio MCP server emitting malformed (non-JSON) output hanging the session instead of failing fast with “Connection closed” + * Fixed MCP tools missing on the first turn of headless/remote-trigger sessions when MCP servers connect asynchronously + * Fixed `/model` picker on AWS Bedrock in non-US regions persisting invalid `us.*` model IDs to `settings.json` when inference profile discovery is still in-flight + * Fixed 429 rate-limit errors showing a raw JSON dump instead of a clean message for API-key, Bedrock, and Vertex users + * Fixed crash on resume when session contains malformed text blocks + * Fixed `/help` dropping the tab bar, Shortcuts heading, and footer at short terminal heights + * Fixed malformed keybinding entry values in `keybindings.json` being silently loaded instead of rejected with a clear error + * Fixed `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC` in one project’s settings permanently disabling usage metrics for all projects on the machine + * Fixed washed-out 16-color palette when using Ghostty, Kitty, Alacritty, WezTerm, foot, rio, or Contour over SSH/mosh + * Fixed Bash tool suggesting `acceptEdits` permission mode when exiting plan mode would downgrade from a higher permission level ​
modified Commands View current →
--- a/commands.md +++ b/commands.md @@ -19,7 +19,7 @@ `/debug [description]`| **[Skill](</docs/en/skills#bundled-skills>).** Enable debug logging for the current session and troubleshoot issues by reading the session debug log. Debug logging is off by default unless you started with `claude --debug`, so running `/debug` mid-session starts capturing logs from that point forward. Optionally describe the issue to focus the analysis `/desktop`| Continue the current session in the Claude Code Desktop app. macOS and Windows only. Alias: `/app` `/diff`| Open an interactive diff viewer showing uncommitted changes and per-turn diffs. Use left/right arrows to switch between the current git diff and individual Claude turns, and up/down to browse files -`/doctor`| Diagnose and verify your Claude Code installation and settings +`/doctor`| Diagnose and verify your Claude Code installation and settings. Results show with status icons. Press `f` to have Claude fix any reported issues `/effort [low|medium|high|max|auto]`| Set the model [effort level](</docs/en/model-config#adjust-effort-level>). `low`, `medium`, and `high` persist across sessions. `max` applies to the current session only and requires Opus 4.6. `auto` resets to the model default. Without an argument, shows the current level. Takes effect immediately without waiting for the current response to finish `/exit`| Exit the CLI. Alias: `/quit` `/export [filename]`| Export the current conversation as plain text. With a filename, writes directly to that file. Without, opens a dialog to copy to clipboard or save to a file @@ -37,7 +37,7 @@ `/keybindings`| Open or create your keybindings configuration file `/login`| Sign in to your Anthropic account `/logout`| Sign out from your Anthropic account -`/loop [interval] [prompt]`| **[Skill](</docs/en/skills#bundled-skills>).** Run a prompt repeatedly while the session stays open. Omit the interval and Claude self-paces between iterations. Omit the prompt and Claude runs an autonomous maintenance check, or the prompt in `.claude/loop.md` if present. Example: `/loop 5m check if the deploy finished`. See [Run prompts on a schedule](</docs/en/scheduled-tasks>) +`/loop [interval] [prompt]`| **[Skill](</docs/en/skills#bundled-skills>).** Run a prompt repeatedly while the session stays open. Omit the interval and Claude self-paces between iterations. Omit the prompt and Claude runs an autonomous maintenance check, or the prompt in `.claude/loop.md` if present. Example: `/loop 5m check if the deploy finished`. See [Run prompts on a schedule](</docs/en/scheduled-tasks>). Alias: `/proactive` `/mcp`| Manage MCP server connections and OAuth authentication `/memory`| Edit `CLAUDE.md` memory files, enable or disable [auto-memory](</docs/en/memory#auto-memory>), and view auto-memory entries `/mobile`| Show QR code to download the Claude mobile app. Aliases: `/ios`, `/android` @@ -69,6 +69,7 @@ `/statusline`| Configure Claude Code’s [status line](</docs/en/statusline>). Describe what you want, or run without arguments to auto-configure from your shell prompt `/stickers`| Order Claude Code stickers `/tasks`| List and manage background tasks. Also available as `/bashes` +`/team-onboarding`| Generate a team onboarding guide from your Claude Code usage history. Claude analyzes your sessions, commands, and MCP server usage from the past 30 days and produces a markdown guide a teammate can paste as a first message to get set up quickly `/teleport`| Pull a [Claude Code on the web](</docs/en/claude-code-on-the-web#from-web-to-terminal>) session into this terminal: opens a picker, then fetches the branch and conversation. Also available as `/tp`. Requires a claude.ai subscription `/terminal-setup`| Configure terminal keybindings for Shift+Enter and other shortcuts. Only visible in terminals that need it, like VS Code, Alacritty, or Warp `/theme`| Change the color theme. Includes light and dark variants, colorblind-accessible (daltonized) themes, and ANSI themes that use your terminal’s color palette
modified Common workflows View current →
--- a/common-workflows.md +++ b/common-workflows.md @@ -535,7 +535,7 @@ * `claude --resume` opens a conversation picker or resumes by name * `claude --from-pr 123` resumes sessions linked to a specific pull request -From inside an active session, use `/resume` to switch to a different conversation. Sessions are stored per project directory. The `/resume` picker shows interactive sessions from the same git repository, including worktrees. When you select a session from another worktree of the same repository, Claude Code resumes it directly without requiring you to switch directories first. Sessions created by `claude -p` or SDK invocations do not appear in the picker, but you can still resume one by passing its session ID directly to `claude --resume <session-id>`. +From inside an active session, use `/resume` to switch to a different conversation. Sessions are stored per project directory. The `/resume` picker shows interactive sessions from the same git repository, including worktrees. When you select a session from another worktree of the same repository, Claude Code resumes it directly without requiring you to switch directories first. Sessions created by `claude -p` or SDK invocations do not appear in the picker, but you can still resume one by passing its session ID or custom name to `claude --resume <session-id-or-name>`. Custom names set with `--name` or `/rename` are accepted in addition to session IDs. ###
modified Manage costs effectively View current →
--- a/costs.md +++ b/costs.md @@ -1,4 +1,4 @@ -Claude Code charges by API token consumption. Per-developer costs vary widely based on model selection, codebase size, and usage patterns such as running multiple instances or automation. Across enterprise deployments, the average cost is around $13 per developer per active day and $150-250 per developer per month, with costs remaining below $30 per active day for 90% of users. To estimate spend for your own team, start with a small pilot group and use the tracking tools below to establish a baseline before wider rollout. This page covers how to track your costs, manage costs for teams, and reduce token usage. +Claude Code charges by API token consumption. For subscription plan pricing (Pro, Max, Team, Enterprise), see [claude.com/pricing](<https://claude.com/pricing>). Per-developer costs vary widely based on model selection, codebase size, and usage patterns such as running multiple instances or automation. Across enterprise deployments, the average cost is around $13 per developer per active day and $150-250 per developer per month, with costs remaining below $30 per active day for 90% of users. To estimate spend for your own team, start with a small pilot group and use the tracking tools below to establish a baseline before wider rollout. This page covers how to track your costs, manage costs for teams, and reduce token usage. ##
modified Discover and install prebuilt plugins through marketplaces View current →
--- a/discover-plugins.md +++ b/discover-plugins.md @@ -31,6 +31,8 @@ The official Anthropic marketplace (`claude-plugins-official`) is automatically available when you start Claude Code. Run `/plugin` and go to the **Discover** tab to browse what’s available, or view the catalog at [claude.com/plugins](<https://claude.com/plugins>). To install a plugin from the official marketplace, use `/plugin install <name>@claude-plugins-official`. For example, to install the GitHub integration: /plugin install github@claude-plugins-official + +If Claude Code reports that the plugin is not found in any marketplace, your marketplace is either missing or outdated. Run `/plugin marketplace update claude-plugins-official` to refresh it, or `/plugin marketplace add anthropics/claude-plugins-official` if you haven’t added it before. Then retry the install. The official marketplace is maintained by Anthropic. To submit a plugin to the official marketplace, use one of the in-app submission forms:
modified Environment variables View current →
--- a/env-vars.md +++ b/env-vars.md @@ -12,6 +12,7 @@ `ANTHROPIC_CUSTOM_MODEL_OPTION`| Model ID to add as a custom entry in the `/model` picker. Use this to make a non-standard or gateway-specific model selectable without replacing built-in aliases. See [Model configuration](</docs/en/model-config#add-a-custom-model-option>) `ANTHROPIC_CUSTOM_MODEL_OPTION_DESCRIPTION`| Display description for the custom model entry in the `/model` picker. Defaults to `Custom model (<model-id>)` when not set `ANTHROPIC_CUSTOM_MODEL_OPTION_NAME`| Display name for the custom model entry in the `/model` picker. Defaults to the model ID when not set +`ANTHROPIC_CUSTOM_MODEL_OPTION_SUPPORTED_CAPABILITIES`| See [Model configuration](</docs/en/model-config#customize-pinned-model-display-and-capabilities>) `ANTHROPIC_DEFAULT_HAIKU_MODEL`| See [Model configuration](</docs/en/model-config#environment-variables>) `ANTHROPIC_DEFAULT_HAIKU_MODEL_DESCRIPTION`| See [Model configuration](</docs/en/model-config#customize-pinned-model-display-and-capabilities>) `ANTHROPIC_DEFAULT_HAIKU_MODEL_NAME`| See [Model configuration](</docs/en/model-config#customize-pinned-model-display-and-capabilities>) @@ -45,7 +46,7 @@ `CLAUDE_AUTO_BACKGROUND_TASKS`| Set to `1` to force-enable automatic backgrounding of long-running agent tasks. When enabled, subagents are moved to the background after running for approximately two minutes `CLAUDE_BASH_MAINTAIN_PROJECT_WORKING_DIR`| Return to the original working directory after each Bash or PowerShell command in the main session `CLAUDE_CODE_ACCESSIBILITY`| Set to `1` to keep the native terminal cursor visible and disable the inverted-text cursor indicator. Allows screen magnifiers like macOS Zoom to track cursor position -`CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD`| Set to `1` to load CLAUDE.md files from directories specified with `--add-dir`. By default, additional directories do not load memory files +`CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD`| Set to `1` to load memory files from directories specified with `--add-dir`. Loads `CLAUDE.md`, `.claude/CLAUDE.md`, `.claude/rules/*.md`, and `CLAUDE.local.md`. By default, additional directories do not load memory files `CLAUDE_CODE_API_KEY_HELPER_TTL_MS`| Interval in milliseconds at which credentials should be refreshed (when using [`apiKeyHelper`](</docs/en/settings#available-settings>)) `CLAUDE_CODE_AUTO_COMPACT_WINDOW`| Set the context capacity in tokens used for auto-compaction calculations. Defaults to the model’s context window: 200K for standard models or 1M for [extended context](</docs/en/model-config#extended-context>) models. Use a lower value like `500000` on a 1M model to treat the window as 500K for compaction purposes. The value is capped at the model’s actual context window. `CLAUDE_AUTOCOMPACT_PCT_OVERRIDE` is applied as a percentage of this value. Setting this variable decouples the compaction threshold from the status line’s `used_percentage`, which always uses the model’s full context window `CLAUDE_CODE_AUTO_CONNECT_IDE`| Override automatic [IDE connection](</docs/en/vs-code>). By default, Claude Code connects automatically when launched inside a supported IDE’s integrated terminal. Set to `false` to prevent this. Set to `true` to force a connection attempt when auto-detection fails, such as when tmux obscures the parent terminal @@ -109,7 +110,7 @@ `CLAUDE_CODE_RESUME_INTERRUPTED_TURN`| Set to `1` to automatically resume if the previous session ended mid-turn. Used in SDK mode so the model continues without requiring the SDK to re-send the prompt `CLAUDE_CODE_SCRIPT_CAPS`| JSON object limiting how many times specific scripts may be invoked per session when `CLAUDE_CODE_SUBPROCESS_ENV_SCRUB` is set. Keys are substrings matched against the command text; values are integer call limits. For example, `{"deploy.sh": 2}` allows `deploy.sh` to be called at most twice. Matching is substring-based so shell-expansion tricks like `./scripts/deploy.sh $(evil)` still count against the cap. Runtime fan-out via `xargs` or `find -exec` is not detected; this is a defense-in-depth control `CLAUDE_CODE_SCROLL_SPEED`| Set the mouse wheel scroll multiplier in [fullscreen rendering](</docs/en/fullscreen#adjust-wheel-scroll-speed>). Accepts values from 1 to 20. Set to `3` to match `vim` if your terminal sends one wheel event per notch without amplification -`CLAUDE_CODE_SESSIONEND_HOOKS_TIMEOUT_MS`| Maximum time in milliseconds for [SessionEnd](</docs/en/hooks#sessionend>) hooks to complete (default: `1500`). Applies to session exit, `/clear`, and switching sessions via interactive `/resume`. Per-hook `timeout` values are also capped by this budget +`CLAUDE_CODE_SESSIONEND_HOOKS_TIMEOUT_MS`| Override the time budget in milliseconds for [SessionEnd](</docs/en/hooks#sessionend>) hooks. Applies to session exit, `/clear`, and switching sessions via interactive `/resume`. By default the budget is 1.5 seconds, automatically raised to the highest per-hook `timeout` configured in settings files, up to 60 seconds. Timeouts on plugin-provided hooks do not raise the budget `CLAUDE_CODE_SHELL`| Override automatic shell detection. Useful when your login shell differs from your preferred working shell (for example, `bash` vs `zsh`) `CLAUDE_CODE_SHELL_PREFIX`| Command prefix to wrap all bash commands (for example, for logging or auditing). Example: `/path/to/logger.sh` will execute `/path/to/logger.sh <command>` `CLAUDE_CODE_SIMPLE`| Set to `1` to run with a minimal system prompt and only the Bash, file read, and file edit tools. MCP tools from `--mcp-config` are still available. Disables auto-discovery of hooks, skills, plugins, MCP servers, auto memory, and CLAUDE.md. The [`--bare`](</docs/en/headless#start-faster-with-bare-mode>) CLI flag sets this @@ -131,10 +132,11 @@ `CLAUDE_CODE_USE_POWERSHELL_TOOL`| Set to `1` to enable the PowerShell tool on Windows (opt-in preview). When enabled, Claude can run PowerShell commands natively instead of routing through Git Bash. Only supported on native Windows, not WSL. See [PowerShell tool](</docs/en/tools-reference#powershell-tool>) `CLAUDE_CODE_USE_VERTEX`| Use [Vertex](</docs/en/google-vertex-ai>) `CLAUDE_CONFIG_DIR`| Override the configuration directory (default: `~/.claude`). All settings, credentials, session history, and plugins are stored under this path. Useful for running multiple accounts side by side: for example, `alias claude-work='CLAUDE_CONFIG_DIR=~/.claude-work claude'` -`CLAUDE_ENABLE_STREAM_WATCHDOG`| Set to `1` to abort API response streams that stall with no data for 90 seconds. Useful in automated environments where a hung session would go unnoticed, or behind proxies that drop connections silently. Without this, a stalled stream can hang the session indefinitely since the request timeout only covers the initial connection. Configure the timeout with `CLAUDE_STREAM_IDLE_TIMEOUT_MS` +`CLAUDE_ENABLE_BYTE_WATCHDOG`| Set to `1` to force-enable the byte-level streaming idle watchdog, or set to `0` to force-disable it. When unset, the watchdog is enabled by default for Anthropic API connections. The byte watchdog aborts a connection when no bytes arrive on the wire for the duration set by `CLAUDE_STREAM_IDLE_TIMEOUT_MS`, with a minimum of 5 minutes, independent of the event-level watchdog +`CLAUDE_ENABLE_STREAM_WATCHDOG`| Set to `1` to enable the event-level streaming idle watchdog. Off by default. For Bedrock, Vertex, and Foundry, this is the only idle watchdog available. Configure the timeout with `CLAUDE_STREAM_IDLE_TIMEOUT_MS` `CLAUDE_ENV_FILE`| Path to a shell script that Claude Code sources before each Bash command. Use to persist virtualenv or conda activation across commands. Also populated dynamically by [SessionStart](</docs/en/hooks#persist-environment-variables>), [CwdChanged](</docs/en/hooks#cwdchanged>), and [FileChanged](</docs/en/hooks#filechanged>) hooks `CLAUDE_REMOTE_CONTROL_SESSION_NAME_PREFIX`| Prefix for auto-generated [Remote Control](</docs/en/remote-control>) session names when no explicit name is provided. Defaults to your machine’s hostname, producing names like `myhost-graceful-unicorn`. The `--remote-control-session-name-prefix` CLI flag sets the same value for a single invocation -`CLAUDE_STREAM_IDLE_TIMEOUT_MS`| Timeout in milliseconds before the streaming idle watchdog closes a stalled connection. Default: `90000` (90 seconds). Requires `CLAUDE_ENABLE_STREAM_WATCHDOG=1`. Increase this value if long-running tools or slow networks cause premature timeout errors +`CLAUDE_STREAM_IDLE_TIMEOUT_MS`| Timeout in milliseconds before the streaming idle watchdog closes a stalled connection. For the byte-level watchdog on the Anthropic API: default and minimum `300000` (5 minutes); lower values are silently clamped to absorb extended thinking pauses and proxy buffering. For the event-level watchdog: default `90000` (90 seconds), no minimum. For third-party providers, requires `CLAUDE_ENABLE_STREAM_WATCHDOG=1` `DISABLE_AUTOUPDATER`| Set to `1` to disable automatic updates `DISABLE_AUTO_COMPACT`| Set to `1` to disable automatic compaction when approaching the context limit. The manual `/compact` command remains available. Use when you want explicit control over when compaction occurs `DISABLE_COMPACT`| Set to `1` to disable all compaction: both automatic compaction and the manual `/compact` command @@ -174,7 +176,7 @@ `MCP_TOOL_TIMEOUT`| Timeout in milliseconds for MCP tool execution (default: 100000000, about 28 hours) `NO_PROXY`| List of domains and IPs to which requests will be directly issued, bypassing proxy `OTEL_LOG_TOOL_CONTENT`| Set to `1` to include tool input and output content in OpenTelemetry span events. Disabled by default to protect sensitive data. See [Monitoring](</docs/en/monitoring-usage>) -`OTEL_LOG_TOOL_DETAILS`| Set to `1` to include MCP server names and tool details in telemetry. Disabled by default to protect PII. See [Monitoring](</docs/en/monitoring-usage>) +`OTEL_LOG_TOOL_DETAILS`| Set to `1` to include tool input arguments, MCP server names, and tool details in OpenTelemetry traces and logs. Disabled by default to protect PII. See [Monitoring](</docs/en/monitoring-usage>) `OTEL_LOG_USER_PROMPTS`| Set to `1` to include user prompt text in OpenTelemetry traces and logs. Disabled by default (prompts are redacted). See [Monitoring](</docs/en/monitoring-usage>) `OTEL_METRICS_INCLUDE_ACCOUNT_UUID`| Set to `false` to exclude account UUID from metrics attributes (default: included). See [Monitoring](</docs/en/monitoring-usage>) `OTEL_METRICS_INCLUDE_SESSION_ID`| Set to `false` to exclude session ID from metrics attributes (default: included). See [Monitoring](</docs/en/monitoring-usage>) @@ -188,7 +190,9 @@ `VERTEX_REGION_CLAUDE_4_0_OPUS`| Override region for Claude 4.0 Opus when using Vertex AI `VERTEX_REGION_CLAUDE_4_0_SONNET`| Override region for Claude 4.0 Sonnet when using Vertex AI `VERTEX_REGION_CLAUDE_4_1_OPUS`| Override region for Claude 4.1 Opus when using Vertex AI +`VERTEX_REGION_CLAUDE_4_5_OPUS`| Override region for Claude Opus 4.5 when using Vertex AI `VERTEX_REGION_CLAUDE_4_5_SONNET`| Override region for Claude Sonnet 4.5 when using Vertex AI +`VERTEX_REGION_CLAUDE_4_6_OPUS`| Override region for Claude Opus 4.6 when using Vertex AI `VERTEX_REGION_CLAUDE_4_6_SONNET`| Override region for Claude Sonnet 4.6 when using Vertex AI `VERTEX_REGION_CLAUDE_HAIKU_4_5`| Override region for Claude Haiku 4.5 when using Vertex AI
modified Hooks reference View current →
--- a/hooks.md +++ b/hooks.md @@ -304,6 +304,7 @@ ---|---|--- `command`| yes| Shell command to execute `async`| no| If `true`, runs in the background without blocking. See Run hooks in the background +`asyncRewake`| no| If `true`, runs in the background and wakes Claude on exit code 2. Implies `async`. The hook’s stderr, or stdout if stderr is empty, is shown to Claude as a system reminder so it can react to a long-running background failure `shell`| no| Shell to use for this hook. Accepts `"bash"` (default) or `"powershell"`. Setting `"powershell"` runs the command via PowerShell on Windows. Does not require `CLAUDE_CODE_USE_POWERSHELL_TOOL` since hooks spawn PowerShell directly #### @@ -557,7 +558,7 @@ `SessionEnd`| No| Shows stderr to user only `CwdChanged`| No| Shows stderr to user only `FileChanged`| No| Shows stderr to user only -`PreCompact`| No| Shows stderr to user only +`PreCompact`| Yes| Blocks compaction `PostCompact`| No| Shows stderr to user only `Elicitation`| Yes| Denies the elicitation `ElicitationResult`| Yes| Blocks the response (action becomes decline) @@ -618,7 +619,7 @@ Events| Decision pattern| Key fields ---|---|--- -UserPromptSubmit, PostToolUse, PostToolUseFailure, Stop, SubagentStop, ConfigChange| Top-level `decision`| `decision: "block"`, `reason` +UserPromptSubmit, PostToolUse, PostToolUseFailure, Stop, SubagentStop, ConfigChange, PreCompact| Top-level `decision`| `decision: "block"`, `reason` TeammateIdle, TaskCreated, TaskCompleted| Exit code or `continue: false`| Exit code 2 blocks the action with stderr feedback. JSON `{"continue": false, "stopReason": "..."}` also stops the teammate entirely, matching `Stop` hook behavior PreToolUse| `hookSpecificOutput`| `permissionDecision` (allow/deny/ask/defer), `permissionDecisionReason` PermissionRequest| `hookSpecificOutput`| `decision.behavior` (allow/deny) @@ -626,7 +627,7 @@ WorktreeCreate| path return| Command hook prints path on stdout; HTTP hook returns `hookSpecificOutput.worktreePath`. Hook failure or missing path fails creation Elicitation| `hookSpecificOutput`| `action` (accept/decline/cancel), `content` (form field values for accept) ElicitationResult| `hookSpecificOutput`| `action` (accept/decline/cancel), `content` (form field values override) -WorktreeRemove, Notification, SessionEnd, PreCompact, PostCompact, InstructionsLoaded, StopFailure, CwdChanged, FileChanged| None| No decision control. Used for side effects like logging or cleanup +WorktreeRemove, Notification, SessionEnd, PostCompact, InstructionsLoaded, StopFailure, CwdChanged, FileChanged| None| No decision control. Used for side effects like logging or cleanup Here are examples of each pattern in action: @@ -636,7 +637,7 @@ * PermissionRequest -Used by `UserPromptSubmit`, `PostToolUse`, `PostToolUseFailure`, `Stop`, `SubagentStop`, and `ConfigChange`. The only value is `"block"`. To allow the action to proceed, omit `decision` from your JSON, or exit 0 without any JSON at all: +Used by `UserPromptSubmit`, `PostToolUse`, `PostToolUseFailure`, `Stop`, `SubagentStop`, `ConfigChange`, and `PreCompact`. The only value is `"block"`. To allow the action to proceed, omit `decision` from your JSON, or exit 0 without any JSON at all: { "decision": "block", @@ -995,7 +996,7 @@ Field| Description ---|--- -`permissionDecision`| `"allow"` skips the permission prompt. `"deny"` prevents the tool call. `"ask"` prompts the user to confirm. `"defer"` exits gracefully so the tool can be resumed later. [Deny and ask rules](</docs/en/permissions#manage-permissions>) still apply when a hook returns `"allow"` +`permissionDecision`| `"allow"` skips the permission prompt. `"deny"` prevents the tool call. `"ask"` prompts the user to confirm. `"defer"` exits gracefully so the tool can be resumed later. [Deny and ask rules](</docs/en/permissions#manage-permissions>) are still evaluated regardless of what the hook returns `permissionDecisionReason`| For `"allow"` and `"ask"`, shown to the user but not Claude. For `"deny"`, shown to Claude. For `"defer"`, ignored `updatedInput`| Modifies the tool’s input parameters before execution. Replaces the entire input object, so include unchanged fields alongside modified ones. Combine with `"allow"` to auto-approve, or `"ask"` to show the modified input to the user. For `"defer"`, ignored `additionalContext`| String added to Claude’s context before the tool executes. For `"defer"`, ignored @@ -1959,6 +1960,8 @@ `manual`| `/compact` `auto`| Auto-compact when the context window is full +Exit with code 2 to block compaction. For a manual `/compact`, the stderr message is shown to the user. You can also block by returning JSON with `"decision": "block"`. Blocking automatic compaction has different effects depending on when it fires. If compaction was triggered proactively before the context limit, Claude Code skips it and the conversation continues uncompacted. If compaction was triggered to recover from a context-limit error already returned by the API, the underlying error surfaces and the current request fails. + #### ​ @@ -2041,7 +2044,7 @@ "reason": "other" } -SessionEnd hooks have no decision control. They cannot block session termination but can perform cleanup tasks. SessionEnd hooks have a default timeout of 1.5 seconds. This applies to session exit, `/clear`, and switching sessions via interactive `/resume`. If your hooks need more time, set the `CLAUDE_CODE_SESSIONEND_HOOKS_TIMEOUT_MS` environment variable to a higher value in milliseconds. Any per-hook `timeout` setting is also capped by this value. +SessionEnd hooks have no decision control. They cannot block session termination but can perform cleanup tasks. SessionEnd hooks have a default timeout of 1.5 seconds. This applies to session exit, `/clear`, and switching sessions via interactive `/resume`. If a hook needs more time, set a per-hook `timeout` in the hook configuration. The overall budget is automatically raised to the highest per-hook timeout configured in settings files, up to 60 seconds. Timeouts set on plugin-provided hooks do not raise the budget. To override the budget explicitly, set the `CLAUDE_CODE_SESSIONEND_HOOKS_TIMEOUT_MS` environment variable in milliseconds. CLAUDE_CODE_SESSIONEND_HOOKS_TIMEOUT_MS=5000 claude @@ -2452,7 +2455,7 @@ * Only `type: "command"` hooks support `async`. Prompt-based hooks cannot run asynchronously. * Async hooks cannot block tool calls or return decisions. By the time the hook completes, the triggering action has already proceeded. - * Hook output is delivered on the next conversation turn. If the session is idle, the response waits until the next user interaction. + * Hook output is delivered on the next conversation turn. If the session is idle, the response waits until the next user interaction. Exception: an `asyncRewake` hook that exits with code 2 wakes Claude immediately even when the session is idle. * Each execution creates a separate background process. There is no deduplication across multiple firings of the same async hook. ##
modified What's new View current →
--- a/index.md +++ b/index.md @@ -1,4 +1,14 @@ The weekly dev digest highlights the features most likely to change how you work. Each entry includes runnable code, a short demo, and a link to the full docs. For every bug fix and minor improvement, see the [changelog](</docs/en/changelog>). + +​ + +Week 15 + +v2.1.92–v2.1.101 + +April 6–10, 2026 + +**Ultraplan** enters early preview: draft a plan in the cloud from your CLI, review and comment on it in a web editor, then run it remotely or pull it back local. The first run now auto-creates a cloud environment for you.Also this week: the **Monitor** tool streams background events into the conversation so Claude can tail logs and react live, `/loop` self-paces when you omit the interval, `/team-onboarding` packages your setup into a replayable guide, and `/autofix-pr` turns on PR auto-fix from your terminal.[Read the Week 15 digest →](</docs/en/whats-new/2026-w15>) ​
modified Interactive mode View current →
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -25,7 +25,7 @@ `Ctrl+D`| Exit Claude Code session| EOF signal `Ctrl+G` or `Ctrl+X Ctrl+E`| Open in default text editor| Edit your prompt or custom response in your default text editor. `Ctrl+X Ctrl+E` is the readline-native binding `Ctrl+L`| Clear prompt input| Clears typed text, keeps conversation history -`Ctrl+O`| Toggle transcript viewer| Shows detailed tool usage and execution. Also expands MCP read and search calls, which collapse to a single line like “Queried slack” by default. In [fullscreen rendering](</docs/en/fullscreen>), cycles through three states: normal prompt, transcript mode, and focus view (last prompt + tool summary + response) +`Ctrl+O`| Toggle transcript viewer| Shows detailed tool usage and execution. Also expands MCP calls, which collapse to a single line like “Called slack 3 times” by default. In [fullscreen rendering](</docs/en/fullscreen>), cycles through three states: normal prompt, transcript mode, and focus view (last prompt + tool summary + response) `Ctrl+R`| Reverse search command history| Search through previous commands interactively `Ctrl+V` or `Cmd+V` (iTerm2) or `Alt+V` (Windows)| Paste image from clipboard| Inserts an `[Image #N]` chip at the cursor so you can reference it positionally in your prompt `Ctrl+B`| Background running tasks| Backgrounds bash commands and agents. Tmux users press twice
modified Customize keyboard shortcuts View current →
--- a/keybindings.md +++ b/keybindings.md @@ -63,6 +63,7 @@ `Select`| Generic select/list components `Plugin`| Plugin dialog (browse, discover, manage) `Scroll`| Conversation scrolling and text selection in fullscreen mode +`Doctor`| `/doctor` diagnostics screen ## @@ -120,7 +121,7 @@ `chat:fastMode`| Meta+O| Toggle fast mode `chat:thinkingToggle`| Cmd+T / Meta+T| Toggle extended thinking `chat:submit`| Enter| Submit message -`chat:newline`| (unbound)| Insert a newline without submitting +`chat:newline`| Ctrl+J| Insert a newline without submitting `chat:undo`| Ctrl+_, Ctrl+Shift+-| Undo last action `chat:externalEditor`| Ctrl+G, Ctrl+X Ctrl+E| Open in external editor `chat:stash`| Ctrl+S| Stash current prompt @@ -372,6 +373,18 @@ `settings:search`| /| Enter search mode `settings:retry`| R| Retry loading usage data (on error) `settings:close`| Enter| Save changes and close the config panel. Escape discards changes and closes + +### + +​ + +Doctor actions + +Actions available in the `Doctor` context: + +Action| Default| Description +---|---|--- +`doctor:fix`| F| Send the diagnostics report to Claude to fix the reported issues. Only active when issues are found ###
modified How Claude remembers your project View current →
--- a/memory.md +++ b/memory.md @@ -146,11 +146,11 @@ Load from additional directories -The `--add-dir` flag gives Claude access to additional directories outside your main working directory. By default, CLAUDE.md files from these directories are not loaded. To also load CLAUDE.md files from additional directories, including `CLAUDE.md`, `.claude/CLAUDE.md`, and `.claude/rules/*.md`, set the `CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD` environment variable: +The `--add-dir` flag gives Claude access to additional directories outside your main working directory. By default, CLAUDE.md files from these directories are not loaded. To also load memory files from additional directories, set the `CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD` environment variable: CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD=1 claude --add-dir ../shared-config -`CLAUDE.local.md` files in additional directories are not loaded. +This loads `CLAUDE.md`, `.claude/CLAUDE.md`, `.claude/rules/*.md`, and `CLAUDE.local.md` from the additional directory. `CLAUDE.local.md` is skipped if you exclude `local` from [`--setting-sources`](</docs/en/cli-reference>). ###
modified Model configuration View current →
--- a/model-config.md +++ b/model-config.md @@ -279,7 +279,7 @@ `ANTHROPIC_DEFAULT_OPUS_MODEL_DESCRIPTION`| Display description for the pinned Opus model in the `/model` picker. Defaults to `Custom Opus model` when not set `ANTHROPIC_DEFAULT_OPUS_MODEL_SUPPORTED_CAPABILITIES`| Comma-separated list of capabilities the pinned Opus model supports -The same `_NAME`, `_DESCRIPTION`, and `_SUPPORTED_CAPABILITIES` suffixes are available for `ANTHROPIC_DEFAULT_SONNET_MODEL` and `ANTHROPIC_DEFAULT_HAIKU_MODEL`. Claude Code enables features like effort levels and [extended thinking](</docs/en/common-workflows#use-extended-thinking-thinking-mode>) by matching the model ID against known patterns. Provider-specific IDs such as Bedrock ARNs or custom deployment names often don’t match these patterns, leaving supported features disabled. Set `_SUPPORTED_CAPABILITIES` to tell Claude Code which features the model actually supports: +The same `_NAME`, `_DESCRIPTION`, and `_SUPPORTED_CAPABILITIES` suffixes are available for `ANTHROPIC_DEFAULT_SONNET_MODEL`, `ANTHROPIC_DEFAULT_HAIKU_MODEL`, and `ANTHROPIC_CUSTOM_MODEL_OPTION`. Claude Code enables features like effort levels and [extended thinking](</docs/en/common-workflows#use-extended-thinking-thinking-mode>) by matching the model ID against known patterns. Provider-specific IDs such as Bedrock ARNs or custom deployment names often don’t match these patterns, leaving supported features disabled. Set `_SUPPORTED_CAPABILITIES` to tell Claude Code which features the model actually supports: Capability value| Enables ---|---
modified Monitoring View current →
--- a/monitoring-usage.md +++ b/monitoring-usage.md @@ -83,7 +83,7 @@ `OTEL_METRIC_EXPORT_INTERVAL`| Export interval in milliseconds (default: 60000)| `5000`, `60000` `OTEL_LOGS_EXPORT_INTERVAL`| Logs export interval in milliseconds (default: 5000)| `1000`, `10000` `OTEL_LOG_USER_PROMPTS`| Enable logging of user prompt content (default: disabled)| `1` to enable -`OTEL_LOG_TOOL_DETAILS`| Enable logging of tool parameters and input arguments in tool events: Bash commands, MCP server and tool names, skill names, and tool input (default: disabled)| `1` to enable +`OTEL_LOG_TOOL_DETAILS`| Enable logging of tool parameters and input arguments in tool events and trace span attributes: Bash commands, MCP server and tool names, skill names, and tool input (default: disabled)| `1` to enable `OTEL_LOG_TOOL_CONTENT`| Enable logging of tool input and output content in span events (default: disabled). Requires tracing. Content is truncated at 60 KB| `1` to enable `OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE`| Metrics temporality preference (default: `delta`). Set to `cumulative` if your backend expects cumulative temporality| `delta`, `cumulative` `CLAUDE_CODE_OTEL_HEADERS_HELPER_DEBOUNCE_MS`| Interval for refreshing dynamic headers (default: 1740000ms / 29 minutes)| `900000` @@ -120,7 +120,7 @@ `OTEL_EXPORTER_OTLP_TRACES_ENDPOINT`| OTLP traces endpoint, overrides `OTEL_EXPORTER_OTLP_ENDPOINT`| `http://localhost:4318/v1/traces` `OTEL_TRACES_EXPORT_INTERVAL`| Span batch export interval in milliseconds (default: 5000)| `1000`, `10000` -Spans redact user prompt text and tool content by default. Set `OTEL_LOG_USER_PROMPTS=1` and `OTEL_LOG_TOOL_CONTENT=1` to include them. When tracing is active, Bash and PowerShell subprocesses automatically inherit a `TRACEPARENT` environment variable containing the W3C trace context of the active tool execution span. This lets any subprocess that reads `TRACEPARENT` parent its own spans under the same trace, enabling end-to-end distributed tracing through scripts and commands that Claude runs. +Spans redact user prompt text, tool input details, and tool content by default. Set `OTEL_LOG_USER_PROMPTS=1`, `OTEL_LOG_TOOL_DETAILS=1`, and `OTEL_LOG_TOOL_CONTENT=1` to include them. When tracing is active, Bash and PowerShell subprocesses automatically inherit a `TRACEPARENT` environment variable containing the W3C trace context of the active tool execution span. This lets any subprocess that reads `TRACEPARENT` parent its own spans under the same trace, enabling end-to-end distributed tracing through scripts and commands that Claude runs. ### @@ -517,6 +517,41 @@ * `decision`: Either `"accept"` or `"reject"` * `source`: Decision source - `"config"`, `"hook"`, `"user_permanent"`, `"user_temporary"`, `"user_abort"`, or `"user_reject"` +#### + +​ + +Plugin installed event + +Logged when a plugin finishes installing, from both the `claude plugin install` CLI command and the interactive `/plugin` UI. **Event Name** : `claude_code.plugin_installed` **Attributes** : + + * All standard attributes + * `event.name`: `"plugin_installed"` + * `event.timestamp`: ISO 8601 timestamp + * `event.sequence`: monotonically increasing counter for ordering events within a session + * `plugin.name`: Name of the installed plugin + * `plugin.version`: Plugin version when declared in the marketplace entry + * `marketplace.name`: Marketplace the plugin was installed from + * `marketplace.is_official`: `"true"` if the marketplace is an official Anthropic marketplace, `"false"` otherwise + * `install.trigger`: `"cli"` or `"ui"` + +#### + +​ + +Skill activated event + +Logged when a skill is invoked. **Event Name** : `claude_code.skill_activated` **Attributes** : + + * All standard attributes + * `event.name`: `"skill_activated"` + * `event.timestamp`: ISO 8601 timestamp + * `event.sequence`: monotonically increasing counter for ordering events within a session + * `skill.name`: Name of the skill + * `skill.source`: Where the skill was loaded from (for example, `"bundled"`, `"userSettings"`, `"projectSettings"`, `"plugin"`) + * `plugin.name`: Name of the owning plugin when the skill is provided by a plugin + * `marketplace.name`: Marketplace the owning plugin was installed from, when the skill is provided by a plugin + ## ​ @@ -663,7 +698,7 @@ * Raw file contents and code snippets are not included in metrics or events. Trace spans are a separate data path: see the `OTEL_LOG_TOOL_CONTENT` bullet below * When authenticated via OAuth, `user.email` is included in telemetry attributes. If this is a concern for your organization, work with your telemetry backend to filter or redact this field * User prompt content is not collected by default. Only prompt length is recorded. To include prompt content, set `OTEL_LOG_USER_PROMPTS=1` - * Tool input arguments and parameters are not logged by default. To include them, set `OTEL_LOG_TOOL_DETAILS=1`. When enabled, `tool_result` events include a `tool_parameters` attribute with Bash commands, MCP server and tool names, and skill names, plus a `tool_input` attribute with file paths, URLs, search patterns, and other arguments. Individual values over 512 characters are truncated and the total is bounded to ~4 K characters, but the arguments may still contain sensitive values. Configure your telemetry backend to filter or redact these attributes as needed + * Tool input arguments and parameters are not logged by default. To include them, set `OTEL_LOG_TOOL_DETAILS=1`. When enabled, `tool_result` events include a `tool_parameters` attribute with Bash commands, MCP server and tool names, and skill names, plus a `tool_input` attribute with file paths, URLs, search patterns, and other arguments. Trace spans include the same `tool_input` attribute and input-derived attributes such as `file_path`. Individual values over 512 characters are truncated and the total is bounded to ~4 K characters, but the arguments may still contain sensitive values. Configure your telemetry backend to filter or redact these attributes as needed * Tool input and output content is not logged in trace spans by default. To include it, set `OTEL_LOG_TOOL_CONTENT=1`. When enabled, span events include full tool input and output content truncated at 60 KB per span. This can include raw file contents from Read tool results and Bash command output. Configure your telemetry backend to filter or redact these attributes as needed ##
modified Enterprise network configuration View current →
--- a/network-config.md +++ b/network-config.md @@ -109,7 +109,7 @@ * `storage.googleapis.com`: download bucket for the Claude Code binary and auto-updater * `downloads.claude.ai`: CDN hosting the install script, version pointers, manifests, signing keys, and plugin executables -[Claude Code on the web](</docs/en/claude-code-on-the-web>) and [Code Review](</docs/en/code-review>) connect to your repositories from Anthropic-managed infrastructure. If your GitHub Enterprise Cloud organization restricts access by IP address, enable [IP allow list inheritance for installed GitHub Apps](<https://docs.github.com/en/enterprise-cloud@latest/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/managing-allowed-ip-addresses-for-your-organization#allowing-access-by-github-apps>). The Claude GitHub App registers its IP ranges, so enabling this setting allows access without manual configuration. To [add the ranges to your allow list manually](<https://docs.github.com/en/enterprise-cloud@latest/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/managing-allowed-ip-addresses-for-your-organization#adding-an-allowed-ip-address>) instead, or to configure other firewalls, see the [Anthropic API IP addresses](<https://platform.claude.com/docs/en/api/ip-addresses>). For self-hosted [GitHub Enterprise Server](</docs/en/github-enterprise-server>) instances behind a firewall, allowlist the same [Anthropic API IP addresses](<https://platform.claude.com/docs/en/api/ip-addresses>) so Anthropic infrastructure can reach your GHES host to clone repositories and post review comments. +The [Chrome integration](</docs/en/chrome>) connects to the browser extension over a WebSocket bridge. If you use Claude in Chrome, allowlist `bridge.claudeusercontent.com` for outbound WebSocket connections. [Claude Code on the web](</docs/en/claude-code-on-the-web>) and [Code Review](</docs/en/code-review>) connect to your repositories from Anthropic-managed infrastructure. If your GitHub Enterprise Cloud organization restricts access by IP address, enable [IP allow list inheritance for installed GitHub Apps](<https://docs.github.com/en/enterprise-cloud@latest/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/managing-allowed-ip-addresses-for-your-organization#allowing-access-by-github-apps>). The Claude GitHub App registers its IP ranges, so enabling this setting allows access without manual configuration. To [add the ranges to your allow list manually](<https://docs.github.com/en/enterprise-cloud@latest/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/managing-allowed-ip-addresses-for-your-organization#adding-an-allowed-ip-address>) instead, or to configure other firewalls, see the [Anthropic API IP addresses](<https://platform.claude.com/docs/en/api/ip-addresses>). For self-hosted [GitHub Enterprise Server](</docs/en/github-enterprise-server>) instances behind a firewall, allowlist the same [Anthropic API IP addresses](<https://platform.claude.com/docs/en/api/ip-addresses>) so Anthropic infrastructure can reach your GHES host to clone repositories and post review comments. ##
modified Claude Code overview View current →
--- a/overview.md +++ b/overview.md @@ -38,7 +38,7 @@ curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd -If you see `The token '&&' is not a valid statement separator`, you’re in PowerShell, not CMD. Use the PowerShell command above instead. Your prompt shows `PS C:\` when you’re in PowerShell.**Windows requires[Git for Windows](<https://git-scm.com/downloads/win>).** Install it first if you don’t have it. +If you see `The token '&&' is not a valid statement separator`, you’re in PowerShell, not CMD. Use the PowerShell command above instead. Your prompt shows `PS C:\` when you’re in PowerShell.**Native Windows setups require[Git for Windows](<https://git-scm.com/downloads/win>).** Install it first if you don’t have it. WSL setups do not need it. Native installations automatically update in the background to keep you on the latest version.
modified Configure permissions View current →
--- a/permissions.md +++ b/permissions.md @@ -110,7 +110,7 @@ } } -The space before `*` matters: `Bash(ls *)` matches `ls -la` but not `lsof`, while `Bash(ls*)` matches both. The `:*` suffix is an equivalent way to write a trailing wildcard. `Bash(ls:*)` matches the same commands as `Bash(ls *)`. +The space before `*` matters: `Bash(ls *)` matches `ls -la` but not `lsof`, while `Bash(ls*)` matches both. The `:*` suffix is an equivalent way to write a trailing wildcard, so `Bash(ls:*)` matches the same commands as `Bash(ls *)`. The permission dialog writes the `:*` form when you select “Yes, don’t ask again” for a command prefix. This form is only recognized at the end of a pattern. In a pattern like `Bash(git:* push)`, the colon is treated as a literal character and won’t match git commands. ## @@ -130,13 +130,27 @@ * `Bash(npm run test *)` matches Bash commands starting with `npm run test` * `Bash(npm *)` matches any command starting with `npm ` * `Bash(* install)` matches any command ending with ` install` - * `Bash(git * main)` matches commands like `git checkout main`, `git merge main` - -When `*` appears at the end with a space before it (like `Bash(ls *)`), it enforces a word boundary, requiring the prefix to be followed by a space or end-of-string. For example, `Bash(ls *)` matches `ls -la` but not `lsof`. In contrast, `Bash(ls*)` without a space matches both `ls -la` and `lsof` because there’s no word boundary constraint. - -Claude Code is aware of shell operators (like `&&`) so a prefix match rule like `Bash(safe-cmd *)` won’t give it permission to run the command `safe-cmd && other-cmd`. + * `Bash(git * main)` matches commands like `git checkout main` and `git log --oneline main` + +A single `*` matches any sequence of characters including spaces, so one wildcard can span multiple arguments. `Bash(git:*)` matches `git log --oneline --all`, and `Bash(git * main)` matches `git push origin main` as well as `git merge main`. When `*` appears at the end with a space before it (like `Bash(ls *)`), it enforces a word boundary, requiring the prefix to be followed by a space or end-of-string. For example, `Bash(ls *)` matches `ls -la` but not `lsof`. In contrast, `Bash(ls*)` without a space matches both `ls -la` and `lsof` because there’s no word boundary constraint. + +#### + +​ + +Compound commands + +Claude Code is aware of shell operators, so a rule like `Bash(safe-cmd *)` won’t give it permission to run the command `safe-cmd && other-cmd`. The recognized command separators are `&&`, `||`, `;`, `|`, `|&`, `&`, and newlines. A rule must match each subcommand independently. When you approve a compound command with “Yes, don’t ask again”, Claude Code saves a separate rule for each subcommand that requires approval, rather than a single rule for the full compound string. For example, approving `git status && npm test` saves a rule for `npm test`, so future `npm test` invocations are recognized regardless of what precedes the `&&`. Subcommands like `cd` into a subdirectory generate their own Read rule for that path. Up to 5 rules may be saved for a single compound command. + +#### + +​ + +Process wrappers + +Before matching Bash rules, Claude Code strips a fixed set of process wrappers so a rule like `Bash(npm test *)` also matches `timeout 30 npm test`. The recognized wrappers are `timeout`, `time`, `nice`, `nohup`, and `stdbuf`. Bare `xargs` is also stripped, so `Bash(grep *)` matches `xargs grep pattern`. Stripping applies only when `xargs` has no flags: an invocation like `xargs -n1 grep pattern` is matched as an `xargs` command, so rules written for the inner command do not cover it. This wrapper list is built in and is not configurable. Development environment runners such as `direnv exec`, `devbox run`, `mise exec`, `npx`, and `docker exec` are not in the list. Because these tools execute their arguments as a command, a rule like `Bash(devbox run *)` matches whatever comes after `run`, including `devbox run rm -rf .`. To approve work inside an environment runner, write a specific rule that includes both the runner and the inner command, such as `Bash(devbox run npm test)`. Add one rule per inner command you want to allow. Bash permission patterns that try to constrain command arguments are fragile. For example, `Bash(curl http://github.com/ *)` intends to restrict curl to GitHub URLs, but won’t match variations like: @@ -228,7 +242,7 @@ Extend permissions with hooks -[Claude Code hooks](</docs/en/hooks-guide>) provide a way to register custom shell commands to perform permission evaluation at runtime. When Claude Code makes a tool call, PreToolUse hooks run before the permission prompt. The hook output can deny the tool call, force a prompt, or skip the prompt to let the call proceed. Skipping the prompt does not bypass permission rules. Deny and ask rules are still evaluated after a hook returns `"allow"`, so a matching deny rule still blocks the call. This preserves the deny-first precedence described in Manage permissions, including deny rules set in managed settings. A blocking hook also takes precedence over allow rules. A hook that exits with code 2 stops the tool call before permission rules are evaluated, so the block applies even when an allow rule would otherwise let the call proceed. To run all Bash commands without prompts except for a few you want blocked, add `"Bash"` to your allow list and register a PreToolUse hook that rejects those specific commands. See [Block edits to protected files](</docs/en/hooks-guide#block-edits-to-protected-files>) for a hook script you can adapt. +[Claude Code hooks](</docs/en/hooks-guide>) provide a way to register custom shell commands to perform permission evaluation at runtime. When Claude Code makes a tool call, PreToolUse hooks run before the permission prompt. The hook output can deny the tool call, force a prompt, or skip the prompt to let the call proceed. Hook decisions do not bypass permission rules. Deny and ask rules are evaluated regardless of what a PreToolUse hook returns, so a matching deny rule blocks the call and a matching ask rule still prompts even when the hook returned `"allow"` or `"ask"`. This preserves the deny-first precedence described in Manage permissions, including deny rules set in managed settings. A blocking hook also takes precedence over allow rules. A hook that exits with code 2 stops the tool call before permission rules are evaluated, so the block applies even when an allow rule would otherwise let the call proceed. To run all Bash commands without prompts except for a few you want blocked, add `"Bash"` to your allow list and register a PreToolUse hook that rejects those specific commands. See [Block edits to protected files](</docs/en/hooks-guide#block-edits-to-protected-files>) for a hook script you can adapt. ## @@ -256,7 +270,7 @@ ---|--- [Skills](</docs/en/skills>) in `.claude/skills/`| Yes, with live reload Plugin settings in `.claude/settings.json`| `enabledPlugins` and `extraKnownMarketplaces` only -[CLAUDE.md](</docs/en/memory>) files and `.claude/rules/`| Only when `CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD=1` is set +[CLAUDE.md](</docs/en/memory>) files, `.claude/rules/`, and `CLAUDE.local.md`| Only when `CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD=1` is set. `CLAUDE.local.md` additionally requires the `local` setting source, which is enabled by default Everything else, including subagents, commands, output styles, hooks, and other settings, is discovered only from the current working directory and its parents, your user directory at `~/.claude/`, and managed settings. To share that configuration across projects, use one of these approaches:
modified Create plugins View current →
--- a/plugins.md +++ b/plugins.md @@ -249,7 +249,7 @@ Ship default settings with your plugin -Plugins can include a `settings.json` file at the plugin root to apply default configuration when the plugin is enabled. Currently, only the `agent` key is supported. Setting `agent` activates one of the plugin’s [custom agents](</docs/en/sub-agents>) as the main thread, applying its system prompt, tool restrictions, and model. This lets a plugin change how Claude Code behaves by default when enabled. +Plugins can include a `settings.json` file at the plugin root to apply default configuration when the plugin is enabled. Currently, only the `agent` and `subagentStatusLine` keys are supported. Setting `agent` activates one of the plugin’s [custom agents](</docs/en/sub-agents>) as the main thread, applying its system prompt, tool restrictions, and model. This lets a plugin change how Claude Code behaves by default when enabled. settings.json
modified Plugins reference View current →
--- a/plugins-reference.md +++ b/plugins-reference.md @@ -283,7 +283,8 @@ "hooks": "./config/hooks.json", "mcpServers": "./mcp-config.json", "outputStyles": "./styles/", - "lspServers": "./.lsp.json" + "lspServers": "./.lsp.json", + "monitors": "./monitors.json" } ### @@ -331,6 +332,7 @@ `mcpServers`| string|array|object| MCP config paths or inline config| `"./my-extra-mcp-config.json"` `outputStyles`| string|array| Custom output style files/directories (replaces default `output-styles/`)| `"./styles/"` `lspServers`| string|array|object| [Language Server Protocol](<https://microsoft.github.io/language-server-protocol/>) configs for code intelligence (go to definition, find references, etc.)| `"./.lsp.json"` +`monitors`| string|array|object| Background [Monitor](</docs/en/tools-reference#monitor-tool>) configurations that auto-arm when the plugin is enabled at session start or when a skill in this plugin is invoked| `"./monitors.json"` `userConfig`| object| User-configurable values prompted at enable time. See User configuration| See below `channels`| array| Channel declarations for message injection (Telegram, Slack, Discord style). See Channels| See below @@ -385,7 +387,7 @@ Path behavior rules -For `skills`, `commands`, `agents`, and `outputStyles`, custom paths replace the default directory. If the manifest specifies `skills`, the default `skills/` directory is not scanned. Hooks, MCP servers, and LSP servers have different semantics for handling multiple sources. +For `skills`, `commands`, `agents`, `outputStyles`, and `monitors`, a custom path replaces the default. If the manifest specifies `skills`, the default `skills/` directory is not scanned; if it specifies `monitors`, the default `monitors/monitors.json` is not loaded. Hooks, MCP servers, and LSP servers have different semantics for handling multiple sources. * All paths must be relative to the plugin root and start with `./` * Components from custom paths use the same naming and namespacing rules @@ -537,6 +539,8 @@ │ └── compliance-checker.md ├── output-styles/ # Output style definitions │ └── terse.md + ├── monitors/ # Background monitor configurations + │ └── monitors.json ├── hooks/ # Hook configurations │ ├── hooks.json # Main hook config │ └── security-hooks.json # Additional hooks @@ -552,7 +556,7 @@ ├── LICENSE # License file └── CHANGELOG.md # Version history -The `.claude-plugin/` directory contains the `plugin.json` file. All other directories (commands/, agents/, skills/, output-styles/, hooks/) must be at the plugin root, not inside `.claude-plugin/`. +The `.claude-plugin/` directory contains the `plugin.json` file. All other directories (commands/, agents/, skills/, output-styles/, monitors/, hooks/) must be at the plugin root, not inside `.claude-plugin/`. ### @@ -570,8 +574,9 @@ **Hooks**| `hooks/hooks.json`| Hook configuration **MCP servers**| `.mcp.json`| MCP server definitions **LSP servers**| `.lsp.json`| Language server configurations +**Monitors**| `monitors/monitors.json`| Background monitor configurations **Executables**| `bin/`| Executables added to the Bash tool’s `PATH`. Files here are invokable as bare commands in any Bash tool call while the plugin is enabled -**Settings**| `settings.json`| Default configuration applied when the plugin is enabled. Only [`agent`](</docs/en/sub-agents>) settings are currently supported +**Settings**| `settings.json`| Default configuration applied when the plugin is enabled. Only the [`agent`](</docs/en/sub-agents>) and [`subagentStatusLine`](</docs/en/statusline#subagent-status-lines>) keys are currently supported * * *
modified Quickstart View current →
--- a/quickstart.md +++ b/quickstart.md @@ -41,7 +41,7 @@ curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd -If you see `The token '&&' is not a valid statement separator`, you’re in PowerShell, not CMD. Use the PowerShell command above instead. Your prompt shows `PS C:\` when you’re in PowerShell.**Windows requires[Git for Windows](<https://git-scm.com/downloads/win>).** Install it first if you don’t have it. +If you see `The token '&&' is not a valid statement separator`, you’re in PowerShell, not CMD. Use the PowerShell command above instead. Your prompt shows `PS C:\` when you’re in PowerShell.**Native Windows setups require[Git for Windows](<https://git-scm.com/downloads/win>).** Install it first if you don’t have it. WSL setups do not need it. Native installations automatically update in the background to keep you on the latest version.
modified Claude Code settings View current →
--- a/settings.md +++ b/settings.md @@ -218,6 +218,7 @@ `statusLine`| Configure a custom status line to display context. See [`statusLine` documentation](</docs/en/statusline>)| `{"type": "command", "command": "~/.claude/statusline.sh"}` `strictKnownMarketplaces`| (Managed settings only) Allowlist of plugin marketplaces users can add. Undefined = no restrictions, empty array = lockdown. Applies to marketplace additions only. See [Managed marketplace restrictions](</docs/en/plugin-marketplaces#managed-marketplace-restrictions>)| `[{ "source": "github", "repo": "acme-corp/plugins" }]` `useAutoModeDuringPlan`| Whether plan mode uses auto mode semantics when auto mode is available. Default: `true`. Not read from shared project settings. Appears in `/config` as “Use auto mode during plan”| `false` +`viewMode`| Default transcript view mode on startup: `"default"`, `"verbose"`, or `"focus"`. Overrides the sticky Ctrl+O selection when set| `"verbose"` `voiceEnabled`| Enable push-to-talk [voice dictation](</docs/en/voice-dictation>). Written automatically when you run `/voice`. Requires a Claude.ai account| `true` ###
modified Advanced setup View current →
--- a/setup.md +++ b/setup.md @@ -16,7 +16,7 @@ * Alpine Linux 3.19+ * **Hardware** : 4 GB+ RAM, x64 or ARM64 processor * **Network** : internet connection required. See [network configuration](</docs/en/network-config#network-access-requirements>). - * **Shell** : Bash, Zsh, PowerShell, or CMD. On Windows, [Git for Windows](<https://git-scm.com/downloads/win>) is required. + * **Shell** : Bash, Zsh, PowerShell, or CMD. Native Windows setups require [Git for Windows](<https://git-scm.com/downloads/win>). WSL setups do not. * **Location** : [Anthropic supported countries](<https://www.anthropic.com/supported-countries>) ### @@ -55,7 +55,7 @@ curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd -If you see `The token '&&' is not a valid statement separator`, you’re in PowerShell, not CMD. Use the PowerShell command above instead. Your prompt shows `PS C:\` when you’re in PowerShell.**Windows requires[Git for Windows](<https://git-scm.com/downloads/win>).** Install it first if you don’t have it. +If you see `The token '&&' is not a valid statement separator`, you’re in PowerShell, not CMD. Use the PowerShell command above instead. Your prompt shows `PS C:\` when you’re in PowerShell.**Native Windows setups require[Git for Windows](<https://git-scm.com/downloads/win>).** Install it first if you don’t have it. WSL setups do not need it. Native installations automatically update in the background to keep you on the latest version. @@ -81,7 +81,15 @@ Set up on Windows -Claude Code on Windows requires [Git for Windows](<https://git-scm.com/downloads/win>) or WSL. You can launch `claude` from PowerShell, CMD, or Git Bash. Claude Code uses Git Bash internally to run commands. You do not need to run PowerShell as Administrator. **Option 1: Native Windows with Git Bash** Install [Git for Windows](<https://git-scm.com/downloads/win>), then run the install command from PowerShell or CMD. If Claude Code can’t find your Git Bash installation, set the path in your [settings.json file](</docs/en/settings>): +You can run Claude Code natively on Windows or inside WSL. Pick based on where your projects are located and which features you need: + +Option| Requires| [Sandboxing](</docs/en/sandboxing>)| When to use +---|---|---|--- +Native Windows| [Git for Windows](<https://git-scm.com/downloads/win>)| Not supported| Windows-native projects and tools +WSL 2| WSL 2 enabled| Supported| Linux toolchains or sandboxed command execution +WSL 1| WSL 1 enabled| Not supported| If WSL 2 is unavailable + +**Option 1: Native Windows with Git Bash** Install [Git for Windows](<https://git-scm.com/downloads/win>), then run the install command from PowerShell or CMD. You do not need to run as Administrator. Whether you install from PowerShell or CMD only affects which install command you run. Your prompt shows `PS C:\Users\YourName>` in PowerShell and `C:\Users\YourName>` without the `PS` in CMD. If you’re new to the terminal, the [terminal guide](</docs/en/terminal-guide#windows>) walks through each step. After installation, launch `claude` from PowerShell, CMD, or Git Bash. Claude Code uses Git Bash internally to execute commands regardless of where you launched it. If Claude Code can’t find your Git Bash installation, set the path in your [settings.json file](</docs/en/settings>): { "env": { @@ -89,7 +97,7 @@ } } -Claude Code can also run PowerShell natively on Windows as an opt-in preview. See [PowerShell tool](</docs/en/tools-reference#powershell-tool>) for setup and limitations. **Option 2: WSL** Both WSL 1 and WSL 2 are supported. WSL 2 supports [sandboxing](</docs/en/sandboxing>) for enhanced security. WSL 1 does not support sandboxing. +Claude Code can also run PowerShell natively on Windows as an opt-in preview. See [PowerShell tool](</docs/en/tools-reference#powershell-tool>) for setup and limitations. **Option 2: WSL** Open your WSL distribution and run the Linux installer from the install instructions above. You install and launch `claude` inside the WSL terminal, not from PowerShell or CMD. ###
modified Extend Claude with skills View current →
--- a/skills.md +++ b/skills.md @@ -84,6 +84,14 @@ Plugin| `<plugin>/skills/<skill-name>/SKILL.md`| Where plugin is enabled When skills share the same name across levels, higher-priority locations win: enterprise > personal > project. Plugin skills use a `plugin-name:skill-name` namespace, so they cannot conflict with other levels. If you have files in `.claude/commands/`, those work the same way, but if a skill and a command share the same name, the skill takes precedence. + +#### + +​ + +Live change detection + +Claude Code watches skill directories for file changes. Adding, editing, or removing a skill under `~/.claude/skills/`, the project `.claude/skills/`, or a `.claude/skills/` inside an `--add-dir` directory takes effect within the current session without restarting. Creating a top-level skills directory that did not exist when the session started requires restarting Claude Code so the new directory can be watched. #### @@ -111,7 +119,7 @@ Skills from additional directories -The `--add-dir` flag [grants file access](</docs/en/permissions#additional-directories-grant-file-access-not-configuration>) rather than configuration discovery, but skills are an exception: `.claude/skills/` within an added directory is loaded automatically and picked up by live change detection, so you can edit those skills during a session without restarting. Other `.claude/` configuration such as subagents, commands, and output styles is not loaded from additional directories. See the [exceptions table](</docs/en/permissions#additional-directories-grant-file-access-not-configuration>) for the complete list of what is and isn’t loaded, and the recommended ways to share configuration across projects. +The `--add-dir` flag [grants file access](</docs/en/permissions#additional-directories-grant-file-access-not-configuration>) rather than configuration discovery, but skills are an exception: `.claude/skills/` within an added directory is loaded automatically. See Live change detection for how edits are picked up during a session. Other `.claude/` configuration such as subagents, commands, and output styles is not loaded from additional directories. See the [exceptions table](</docs/en/permissions#additional-directories-grant-file-access-not-configuration>) for the complete list of what is and isn’t loaded, and the recommended ways to share configuration across projects. CLAUDE.md files from `--add-dir` directories are not loaded by default. To load them, set `CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD=1`. See [Load from additional directories](</docs/en/memory#load-from-additional-directories>). @@ -179,7 +187,8 @@ Field| Required| Description ---|---|--- `name`| No| Display name for the skill. If omitted, uses the directory name. Lowercase letters, numbers, and hyphens only (max 64 characters). -`description`| Recommended| What the skill does and when to use it. Claude uses this to decide when to apply the skill. If omitted, uses the first paragraph of markdown content. Front-load the key use case: descriptions longer than 250 characters are truncated in the skill listing to reduce context usage. +`description`| Recommended| What the skill does and when to use it. Claude uses this to decide when to apply the skill. If omitted, uses the first paragraph of markdown content. Front-load the key use case: the combined `description` and `when_to_use` text is truncated at 1,536 characters in the skill listing to reduce context usage. +`when_to_use`| No| Additional context for when Claude should invoke the skill, such as trigger phrases or example requests. Appended to `description` in the skill listing and counts toward the 1,536-character cap. `argument-hint`| No| Hint shown during autocomplete to indicate expected arguments. Example: `[issue-number]` or `[filename] [format]`. `disable-model-invocation`| No| Set to `true` to prevent Claude from automatically loading this skill. Use for workflows you want to trigger manually with `/name`. Default: `false`. `user-invocable`| No| Set to `false` to hide from the `/` menu. Use for background knowledge users shouldn’t invoke directly. Default: `true`. @@ -699,7 +708,7 @@ Skill descriptions are cut short -Skill descriptions are loaded into context so Claude knows what’s available. All skill names are always included, but if you have many skills, descriptions are shortened to fit the character budget, which can strip the keywords Claude needs to match your request. The budget scales dynamically at 1% of the context window, with a fallback of 8,000 characters. To raise the limit, set the `SLASH_COMMAND_TOOL_CHAR_BUDGET` environment variable. Or trim descriptions at the source: front-load the key use case, since each entry is capped at 250 characters regardless of budget. +Skill descriptions are loaded into context so Claude knows what’s available. All skill names are always included, but if you have many skills, descriptions are shortened to fit the character budget, which can strip the keywords Claude needs to match your request. The budget scales dynamically at 1% of the context window, with a fallback of 8,000 characters. To raise the limit, set the `SLASH_COMMAND_TOOL_CHAR_BUDGET` environment variable. Or trim the `description` and `when_to_use` text at the source: front-load the key use case, since each entry’s combined text is capped at 1,536 characters regardless of budget. ##
modified Customize your status line View current →
--- a/statusline.md +++ b/statusline.md @@ -581,6 +581,23 @@ ​ +Subagent status lines + +The `subagentStatusLine` setting renders a custom row body for each [subagent](</docs/en/sub-agents>) shown in the agent panel below the prompt. Use it to replace the default `name · description · token count` row with your own formatting. + + { + "subagentStatusLine": { + "type": "command", + "command": "~/.claude/subagent-statusline.sh" + } + } + +The command runs once per refresh tick with all visible subagent rows passed as a single JSON object on stdin. The input includes the [base hook fields](</docs/en/hooks#common-input-fields>) plus `columns` (the usable row width) and a `tasks` array, where each task has `id`, `name`, `type`, `status`, `description`, `label`, `startTime`, `tokenCount`, `tokenSamples`, and `cwd`. Write one JSON line to stdout per row you want to override, in the form `{"id": "<task id>", "content": "<row body>"}`. The `content` string is rendered as-is, including ANSI colors and OSC 8 hyperlinks. Omit a task’s `id` to keep the default rendering for that row; emit an empty `content` string to hide it. The same trust and `disableAllHooks` gates that apply to `statusLine` apply here. Plugins can ship a default `subagentStatusLine` in their [`settings.json`](</docs/en/plugins-reference#standard-plugin-layout>). + +## + +​ + Tips * **Test with mock input** : `echo '{"model":{"display_name":"Opus"},"workspace":{"current_dir":"/home/user/project"},"context_window":{"used_percentage":25},"session_id":"test-session-abc"}' | ./statusline.sh`
modified Create custom subagents View current →
--- a/sub-agents.md +++ b/sub-agents.md @@ -499,7 +499,11 @@ Hooks in subagent frontmatter -Define hooks directly in the subagent’s markdown file. These hooks only run while that specific subagent is active and are cleaned up when it finishes. All [hook events](</docs/en/hooks#hook-events>) are supported. The most common events for subagents are: +Define hooks directly in the subagent’s markdown file. These hooks only run while that specific subagent is active and are cleaned up when it finishes. + +Frontmatter hooks fire when the agent is spawned as a subagent through the Agent tool or an @-mention. They do not fire when the agent runs as the main session via `--agent` or the `agent` setting. For session-wide hooks, configure them in [`settings.json`](</docs/en/hooks>). + +All [hook events](</docs/en/hooks#hook-events>) are supported. The most common events for subagents are: Event| Matcher input| When it fires ---|---|---
modified Optimize your terminal setup View current →
--- a/terminal-config.md +++ b/terminal-config.md @@ -19,21 +19,50 @@ * **Shift+Enter** : Works out of the box in iTerm2, WezTerm, Ghostty, and Kitty * **Keyboard shortcut** : Set up a keybinding to insert a newline in other terminals -**Set up Shift+Enter for other terminals** Run `/terminal-setup` within Claude Code to automatically configure Shift+Enter for VS Code, Alacritty, Zed, and Warp. +#### + +​ + +Set up Shift+Enter with /terminal-setup + +Run `/terminal-setup` within Claude Code to automatically configure Shift+Enter for VS Code, Alacritty, Zed, and Warp. The `/terminal-setup` command is only visible in terminals that require manual configuration. If you’re using iTerm2, WezTerm, Ghostty, or Kitty, you won’t see this command because Shift+Enter already works natively. -**Set up Option+Enter (VS Code, iTerm2 or macOS Terminal.app)** **For Mac Terminal.app:** +#### + +​ + +Set up Shift+Enter in tmux + +Inside tmux, `Shift+Enter` submits instead of inserting a newline unless extended key reporting is enabled. Add these lines to `~/.tmux.conf`, then run `tmux source-file ~/.tmux.conf` to reload your configuration: + + set -s extended-keys on + set -as terminal-features 'xterm*:extkeys' + +Claude Code requests extended keys at startup, but tmux ignores the request unless `extended-keys` is set to `on`. The `terminal-features` line tells tmux that your outer terminal can send these sequences. + +#### + +​ + +Set up Option+Enter on macOS + +On macOS, you can use Option+Enter as the newline keybinding in Terminal.app, iTerm2, and the VS Code terminal after enabling the Option-as-Meta setting. + + * Terminal.app + + * iTerm2 + + * VS Code 1. Open Settings → Profiles → Keyboard 2. Check “Use Option as Meta Key” -**For iTerm2:** - 1. Open Settings → Profiles → Keys 2. Under General, set Left/Right Option key to “Esc+” -**For VS Code terminal:** Set `"terminal.integrated.macOptionIsMeta": true` in VS Code settings. +Set `"terminal.integrated.macOptionIsMeta": true` in VS Code settings. ###
modified Tools reference View current →
--- a/tools-reference.md +++ b/tools-reference.md @@ -10,7 +10,7 @@ `CronList`| Lists all scheduled tasks in the session| No `Edit`| Makes targeted edits to specific files| Yes `EnterPlanMode`| Switches to plan mode to design an approach before coding| No -`EnterWorktree`| Creates an isolated [git worktree](</docs/en/common-workflows#run-parallel-claude-code-sessions-with-git-worktrees>) and switches into it| No +`EnterWorktree`| Creates an isolated [git worktree](</docs/en/common-workflows#run-parallel-claude-code-sessions-with-git-worktrees>) and switches into it. Pass a `path` to switch into an existing worktree of the current repository instead of creating a new one| No `ExitPlanMode`| Presents a plan for approval and exits plan mode| Yes `ExitWorktree`| Exits a worktree session and returns to the original directory| No `Glob`| Finds files based on pattern matching| No @@ -87,7 +87,7 @@ * Watch a directory for file changes * Track output from any long-running script you point it at -Claude writes a small script for the watch, runs it in the background, and receives each output line as it arrives. You keep working in the same session and Claude interjects when an event lands. Stop a monitor by asking Claude to cancel it or by ending the session. Monitor uses the same [permission rules as Bash](</docs/en/permissions#tool-specific-permission-rules>), so `allow` and `deny` patterns you have set for Bash apply here too. It is not available on Amazon Bedrock, Google Vertex AI, or Microsoft Foundry. +Claude writes a small script for the watch, runs it in the background, and receives each output line as it arrives. You keep working in the same session and Claude interjects when an event lands. Stop a monitor by asking Claude to cancel it or by ending the session. Monitor uses the same [permission rules as Bash](</docs/en/permissions#tool-specific-permission-rules>), so `allow` and `deny` patterns you have set for Bash apply here too. It is not available on Amazon Bedrock, Google Vertex AI, or Microsoft Foundry. It is also not available when `DISABLE_TELEMETRY` or `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC` is set. ##
modified Troubleshooting View current →
Show diff (104 lines)
--- a/troubleshooting.md +++ b/troubleshooting.md @@ -17,10 +17,12 @@ `TLS connect error` or `SSL/TLS secure channel`| Update CA certificates `Failed to fetch version` or can’t reach download server| Check network and proxy settings `irm is not recognized` or `&& is not valid`| Use the right command for your shell +`'bash' is not recognized as the name of a cmdlet`| Use the Windows installer command `Claude Code on Windows requires git-bash`| Install or configure Git Bash +`Claude Code does not support 32-bit Windows`| Open Windows PowerShell, not the x86 entry `Error loading shared library`| Wrong binary variant for your system `Illegal instruction` on Linux| Architecture mismatch -`dyld: cannot load` or `Abort trap` on macOS| Binary incompatibility +`dyld: cannot load`, `dyld: Symbol not found`, or `Abort trap` on macOS| Binary incompatibility `Invoke-Expression: Missing argument in parameter list`| Install script returns HTML `App unavailable in region`| Claude Code is not available in your country. See [supported countries](<https://www.anthropic.com/supported-countries>). `unable to get local issuer certificate`| Configure corporate CA certificates @@ -306,9 +308,9 @@ ​ -Windows: `irm` or `&&` not recognized - -If you see `'irm' is not recognized` or `The token '&&' is not valid`, you’re running the wrong command for your shell. +Windows: wrong install command + +If you see `'irm' is not recognized`, `The token '&&' is not valid`, or `'bash' is not recognized as the name of a cmdlet`, you copied the install command for a different shell or operating system. * **`irm` not recognized**: you’re in CMD, not PowerShell. You have two options: Open PowerShell by searching for “PowerShell” in the Start menu, then run the original install command: @@ -319,6 +321,10 @@ curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd * **`&&` not valid**: you’re in PowerShell but ran the CMD installer command. Use the PowerShell installer: + + irm https://claude.ai/install.ps1 | iex + + * **`bash` not recognized**: you ran the macOS/Linux installer on Windows. Use the PowerShell installer instead: irm https://claude.ai/install.ps1 | iex @@ -379,7 +385,7 @@ ​ -Windows: “Claude Code on Windows requires git-bash” +Windows: Claude Code on Windows requires git-bash Claude Code on native Windows needs [Git for Windows](<https://git-scm.com/downloads/win>), which includes Git Bash. **If Git is not installed** , download and install it from [git-scm.com/downloads/win](<https://git-scm.com/downloads/win>). During setup, select “Add to PATH.” Restart your terminal after installing. **If Git is already installed** but Claude Code still can’t find it, set the path in your [settings.json file](</docs/en/settings>): @@ -395,6 +401,18 @@ ​ +Windows: Claude Code does not support 32-bit Windows + +Windows includes two PowerShell entries in the Start menu: `Windows PowerShell` and `Windows PowerShell (x86)`. The x86 entry runs as a 32-bit process and triggers this error even on a 64-bit machine. To check which case you’re in, run this in the same window that produced the error: + + [Environment]::Is64BitOperatingSystem + +If this prints `True`, your operating system is fine. Close the window, open `Windows PowerShell` without the x86 suffix, and run the install command again. If this prints `False`, you are on a 32-bit edition of Windows. Claude Code requires a 64-bit operating system. See the [system requirements](</docs/en/setup#system-requirements>). + +### + +​ + Linux: wrong binary variant installed (musl/glibc mismatch) If you see errors about missing shared libraries like `libstdc++.so.6` or `libgcc_s.so.1` after installation, the installer may have downloaded the wrong binary variant for your system. @@ -440,10 +458,16 @@ `dyld: cannot load` on macOS -If you see `dyld: cannot load` or `Abort trap: 6` during installation, the binary is incompatible with your macOS version or hardware. +If you see `dyld: cannot load`, `dyld: Symbol not found`, or `Abort trap: 6` during installation, the binary is incompatible with your macOS version or hardware. dyld: cannot load 'claude-2.1.42-darwin-x64' (load command 0x80000034 is unknown) Abort trap: 6 + +A `Symbol not found` error that references `libicucore` also indicates your macOS version is older than the binary supports: + + dyld: Symbol not found: _ubrk_clone + Referenced from: claude-darwin-x64 (which was built for Mac OS X 13.0) + Expected in: /usr/lib/libicucore.A.dylib **Solutions:** @@ -594,7 +618,7 @@ ​ -”This organization has been disabled” with an active subscription +This organization has been disabled with an active subscription If you see `API Error: 400 ... "This organization has been disabled"` despite having an active Claude subscription, an `ANTHROPIC_API_KEY` environment variable is overriding your subscription. This commonly happens when an old API key from a previous employer or project is still set in your shell profile. When `ANTHROPIC_API_KEY` is present and you have approved it, Claude Code uses that key instead of your subscription’s OAuth credentials. In non-interactive mode (`-p`), the key is always used when present. See [authentication precedence](</docs/en/authentication#authentication-precedence>) for the full resolution order. To use your subscription instead, unset the environment variable and remove it from your shell profile: @@ -620,7 +644,7 @@ ​ -”Not logged in” or token expired +Not logged in or token expired If Claude Code prompts you to log in again after a session, your OAuth token may have expired. Run `/login` to re-authenticate. If this happens frequently, check that your system clock is accurate, as token validation depends on correct timestamps. On macOS, login can also fail when the Keychain is locked or its password is out of sync with your account password, which prevents Claude Code from saving credentials. Run `claude doctor` to check Keychain access. To unlock the Keychain manually, run `security unlock-keychain ~/Library/Keychains/login.keychain-db`. If unlocking doesn’t help, open Keychain Access, select the `login` keychain, and choose Edit > Change Password for Keychain “login” to resync it with your account password.
modified Agent SDK reference - TypeScript View current →
--- a/typescript.md +++ b/typescript.md @@ -1835,9 +1835,10 @@ type EnterWorktreeInput = { name?: string; - }; - -Creates and enters a temporary git worktree for isolated work. + path?: string; + }; + +Creates and enters a temporary git worktree for isolated work. Pass `path` to switch into an existing worktree of the current repository instead of creating a new one. `name` and `path` are mutually exclusive. ##
modified Plan in the cloud with ultraplan View current →
--- a/ultraplan.md +++ b/ultraplan.md @@ -6,7 +6,7 @@ * **Hands-off drafting** : the plan is generated remotely, so your terminal stays free for other work * **Flexible execution** : approve the plan to run on the web and open a pull request, or send it back to your terminal -Ultraplan requires a [Claude Code on the web](</docs/en/claude-code-on-the-web>) account and a GitHub repository. Because it runs on Anthropic’s cloud infrastructure, it is not available when using Amazon Bedrock, Google Cloud Vertex AI, or Microsoft Foundry. The cloud session runs in your account’s default [cloud environment](</docs/en/claude-code-on-the-web#the-cloud-environment>). +Ultraplan requires a [Claude Code on the web](</docs/en/claude-code-on-the-web>) account and a GitHub repository. Because it runs on Anthropic’s cloud infrastructure, it is not available when using Amazon Bedrock, Google Cloud Vertex AI, or Microsoft Foundry. The cloud session runs in your account’s default [cloud environment](</docs/en/claude-code-on-the-web#the-cloud-environment>). If you don’t have a cloud environment yet, ultraplan creates one automatically when it first launches. ##
modified Get started with Claude Code on the web View current →
--- a/web-quickstart.md +++ b/web-quickstart.md @@ -217,9 +217,9 @@ ​ -”No cloud environment available” when using `--remote` - -You haven’t created a cloud environment yet. Run `/web-setup` in the Claude Code CLI to create one, or visit [claude.ai/code](<https://claude.ai/code>) and follow the **Create your environment** step above. +”Could not create a cloud environment” or “No cloud environment available” when using `--remote` or ultraplan + +Remote-session features create a default cloud environment automatically if you don’t have one. If you see “Could not create a cloud environment”, automatic creation failed. If you see “No cloud environment available”, your CLI predates automatic creation. In either case, run `/web-setup` in the Claude Code CLI to create one manually, or visit [claude.ai/code](<https://claude.ai/code>) and follow the **Create your environment** step above. ###