Changes on
23 changes detected
--- a/changelog.md
+++ b/changelog.md
@@ -1,4 +1,51 @@
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.84
+
+March 26, 2026
+
+ * Added PowerShell tool for Windows as an opt-in preview. Learn more at <https://code.claude.com/docs/en/tools-reference#powershell-tool>
+ * Added `ANTHROPIC_DEFAULT_{OPUS,SONNET,HAIKU}_MODEL_SUPPORTS` env vars to override effort/thinking capability detection for pinned default models for 3p (Bedrock, Vertex, Foundry), and `_MODEL_NAME`/`_DESCRIPTION` to customize the `/model` picker label
+ * Added `CLAUDE_STREAM_IDLE_TIMEOUT_MS` env var to configure the streaming idle watchdog threshold (default 90s)
+ * Added `TaskCreated` hook that fires when a task is created via `TaskCreate`
+ * Added `WorktreeCreate` hook support for `type: "http"` — return the created worktree path via `hookSpecificOutput.worktreePath` in the response JSON
+ * Added `allowedChannelPlugins` managed setting for team/enterprise admins to define a channel plugin allowlist
+ * Added `x-client-request-id` header to API requests for debugging timeouts
+ * Added idle-return prompt that nudges users returning after 75+ minutes to `/clear`, reducing unnecessary token re-caching on stale sessions
+ * Deep links (`claude-cli://`) now open in your preferred terminal instead of whichever terminal happens to be first in the detection list
+ * Rules and skills `paths:` frontmatter now accepts a YAML list of globs
+ * MCP tool descriptions and server instructions are now capped at 2KB to prevent OpenAPI-generated servers from bloating context
+ * MCP servers configured both locally and via claude.ai connectors are now deduplicated — the local config wins
+ * Background bash tasks that appear stuck on an interactive prompt now surface a notification after ~45 seconds
+ * Token counts ≥1M now display as “1.5m” instead of “1512.6k”
+ * Global system-prompt caching now works when `ToolSearch` is enabled, including for users with MCP tools configured
+ * Fixed voice push-to-talk: holding the voice key no longer leaks characters into the text input, and transcripts now insert at the correct position
+ * Fixed up/down arrow keys being unresponsive when a footer item is focused
+ * Fixed `Ctrl+U` (kill-to-line-start) being a no-op at line boundaries in multiline input, so repeated `Ctrl+U` now clears across lines
+ * Fixed null-unbinding a default chord binding (e.g. `"ctrl+x ctrl+k": null`) still entering chord-wait mode instead of freeing the prefix key
+ * Fixed mouse events inserting literal “mouse” text into transcript search input
+ * Fixed workflow subagents failing with API 400 when the outer session uses `--json-schema` and the subagent also specifies a schema
+ * Fixed missing background color behind certain emoji in user message bubbles on some terminals
+ * Fixed the “allow Claude to edit its own settings for this session” permission option not sticking for users with `Edit(.claude)` allow rules
+ * Fixed a hang when generating attachment snippets for large edited files
+ * Fixed MCP tool/resource cache leak on server reconnect
+ * Fixed a startup performance issue where partial clone repositories (Scalar/GVFS) triggered mass blob downloads
+ * Fixed native terminal cursor not tracking the text input caret, so IME composition (CJK input) now renders inline and screen readers can follow the input position
+ * Fixed spurious “Not logged in” errors on macOS caused by transient keychain read failures
+ * Fixed cold-start race where core tools could be deferred without their bypass active, causing Edit/Write to fail with InputValidationError on typed parameters
+ * Improved detection for dangerous removals of Windows drive roots (`C:\`, `C:\Windows`, etc.)
+ * Improved interactive startup by ~30ms by running `setup()` in parallel with slash command and agent loading
+ * Improved startup for `claude "prompt"` with MCP servers — the REPL now renders immediately instead of blocking until all servers connect
+ * Improved Remote Control to show a specific reason when blocked instead of a generic “not yet enabled” message
+ * Improved p90 prompt cache rate
+ * Reduced scroll-to-top resets in long sessions by making the message window immune to compaction and grouping changes
+ * Reduced terminal flickering when animated tool progress scrolls above the viewport
+ * Changed issue/PR references to only become clickable links when written as `owner/repo#123` — bare `#123` is no longer auto-linked
+ * Slash commands unavailable for the current auth setup (`/voice`, `/mobile`, `/chrome`, `/upgrade`, etc.) are now hidden instead of shown
+ * [VSCode] Added rate limit warning banner with usage percentage and reset time
+ * Stats screenshot (Ctrl+S in /stats) now works in all builds and is 16× faster
--- a/channels.md
+++ b/channels.md
@@ -358,12 +358,14 @@
Enterprise controls
-Channels are controlled by the `channelsEnabled` setting in [managed settings](</docs/en/settings>).
-
-Plan type| Default behavior
----|---
-Pro / Max, no organization| Channels available; users opt in per session with `--channels`
-Team / Enterprise| Channels disabled until an admin explicitly enables them
+On Team and Enterprise plans, channels are off by default. Admins control availability through two [managed settings](</docs/en/settings>) that users cannot override:
+
+Setting| Purpose| When not configured
+---|---|---
+`channelsEnabled`| Master switch. Must be `true` for any channel to deliver messages. Set via the [claude.ai Admin console](<https://claude.ai/admin-settings/claude-code>) toggle or directly in managed settings. Blocks all channels including the development flag when off.| Channels blocked
+`allowedChannelPlugins`| Which plugins can register once channels are enabled. Replaces the Anthropic-maintained list when set. Only applies when `channelsEnabled` is `true`.| Anthropic default list applies
+
+Pro and Max users without an organization skip these checks entirely: channels are available and users opt in per session with `--channels`.
###
@@ -373,13 +375,38 @@
Admins can enable channels from [**claude.ai → Admin settings → Claude Code → Channels**](<https://claude.ai/admin-settings/claude-code>), or by setting `channelsEnabled` to `true` in managed settings. Once enabled, users in your organization can use `--channels` to opt channel servers into individual sessions. If the setting is disabled or unset, the MCP server still connects and its tools work, but channel messages won’t arrive. A startup warning tells the user to have an admin enable the setting.
+###
+
+
+
+Restrict which channel plugins can run
+
+By default, any plugin on the Anthropic-maintained allowlist can register as a channel. Admins on Team and Enterprise plans can replace that allowlist with their own by setting `allowedChannelPlugins` in managed settings. Use this to restrict which official plugins are allowed, approve channels from your own internal marketplace, or both. Each entry names a plugin and the marketplace it comes from:
+
+Report incorrect code
+
+Copy
+
+Ask AI
+
+ {
+ "channelsEnabled": true,
+ "allowedChannelPlugins": [
+ { "marketplace": "claude-plugins-official", "plugin": "telegram" },
+ { "marketplace": "claude-plugins-official", "plugin": "discord" },
+ { "marketplace": "acme-corp-plugins", "plugin": "internal-alerts" }
+ ]
+ }
+
+When `allowedChannelPlugins` is set, it replaces the Anthropic allowlist entirely: only the listed plugins can register. Leave it unset to fall back to the default Anthropic allowlist. An empty array blocks all channel plugins from the allowlist, but `--dangerously-load-development-channels` can still bypass it for local testing. To block channels entirely including the development flag, leave `channelsEnabled` unset instead. This setting requires `channelsEnabled: true`. If a user passes a plugin to `--channels` that isn’t on your list, Claude Code starts normally but the channel doesn’t register, and the startup notice explains that the plugin isn’t on the organization’s approved list.
+
##
Research preview
-Channels are a research preview feature. Availability is rolling out gradually, and the `--channels` flag syntax and protocol contract may change based on feedback. During the preview, `--channels` only accepts plugins from an Anthropic-maintained allowlist. The channel plugins in [claude-plugins-official](<https://github.com/anthropics/claude-plugins-official/tree/main/external_plugins>) are the approved set. If you pass something that isn’t, Claude Code starts normally but the channel doesn’t register, and the startup notice tells you why. To test a channel you’re building, use `--dangerously-load-development-channels`. See [Test during the research preview](</docs/en/channels-reference#test-during-the-research-preview>) for information about testing custom channels that you build. Report issues or feedback on the [Claude Code GitHub repository](<https://github.com/anthropics/claude-code/issues>).
+Channels are a research preview feature. Availability is rolling out gradually, and the `--channels` flag syntax and protocol contract may change based on feedback. During the preview, `--channels` only accepts plugins from an Anthropic-maintained allowlist, or from your organization’s allowlist if an admin has set `allowedChannelPlugins`. The channel plugins in [claude-plugins-official](<https://github.com/anthropics/claude-plugins-official/tree/main/external_plugins>) are the default approved set. If you pass something that isn’t on the effective allowlist, Claude Code starts normally but the channel doesn’t register, and the startup notice tells you why. To test a channel you’re building, use `--dangerously-load-development-channels`. See [Test during the research preview](</docs/en/channels-reference#test-during-the-research-preview>) for information about testing custom channels that you build. Report issues or feedback on the [Claude Code GitHub repository](<https://github.com/anthropics/claude-code/issues>).
##
--- a/channels-reference.md
+++ b/channels-reference.md
@@ -863,7 +863,7 @@
Package as a plugin
-To make your channel installable and shareable, wrap it in a [plugin](</docs/en/plugins>) and publish it to a [marketplace](</docs/en/plugin-marketplaces>). Users install it with `/plugin install`, then enable it per session with `--channels plugin:<name>@<marketplace>`. A channel published to your own marketplace still needs `--dangerously-load-development-channels` to run, since it isn’t on the [approved allowlist](</docs/en/channels#supported-channels>). To get it added, [submit it to the official marketplace](</docs/en/plugins#submit-your-plugin-to-the-official-marketplace>). Channel plugins go through security review before being approved.
+To make your channel installable and shareable, wrap it in a [plugin](</docs/en/plugins>) and publish it to a [marketplace](</docs/en/plugin-marketplaces>). Users install it with `/plugin install`, then enable it per session with `--channels plugin:<name>@<marketplace>`. A channel published to your own marketplace still needs `--dangerously-load-development-channels` to run, since it isn’t on the [approved allowlist](</docs/en/channels#supported-channels>). To get it added, [submit it to the official marketplace](</docs/en/plugins#submit-your-plugin-to-the-official-marketplace>). Channel plugins go through security review before being approved. On Team and Enterprise plans, an admin can instead include your plugin in the organization’s own [`allowedChannelPlugins`](</docs/en/channels#restrict-which-channel-plugins-can-run>) list, which replaces the default Anthropic allowlist.
##
--- a/cli-reference.md
+++ b/cli-reference.md
@@ -22,6 +22,7 @@
`claude agents`| List all configured [subagents](</docs/en/sub-agents>), grouped by source| `claude agents`
`claude auto-mode defaults`| Print the built-in [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) classifier rules as JSON. Use `claude auto-mode config` to see your effective config with settings applied| `claude auto-mode defaults > rules.json`
`claude mcp`| Configure Model Context Protocol (MCP) servers| See the [Claude Code MCP documentation](</docs/en/mcp>).
+`claude plugin`| Manage Claude Code [plugins](</docs/en/plugins>). Alias: `claude plugins`. See [plugin reference](</docs/en/plugins-reference#cli-commands-reference>) for subcommands| `claude plugin install code-review@claude-plugins-official`
`claude remote-control`| Start a [Remote Control](</docs/en/remote-control>) server to control Claude Code from Claude.ai or the Claude app. Runs in server mode (no local interactive session). See [Server mode flags](</docs/en/remote-control#server-mode>)| `claude remote-control --name "My Project"`
##
--- a/commands.md
+++ b/commands.md
@@ -1,4 +1,4 @@
-Type `/` in Claude Code to see all available commands, or type `/` followed by any letters to filter. Not all commands are visible to every user. Some depend on your platform, plan, or environment. For example, `/desktop` only appears on macOS and Windows, `/upgrade` and `/privacy-settings` are only available on Pro and Max plans, and `/terminal-setup` is hidden when your terminal natively supports its keybindings. Claude Code also includes [bundled skills](</docs/en/skills#bundled-skills>) like `/simplify`, `/batch`, and `/debug` that appear alongside built-in commands when you type `/`. To create your own commands, see [skills](</docs/en/skills>). In the table below, `<arg>` indicates a required argument and `[arg]` indicates an optional one.
+Type `/` in Claude Code to see all available commands, or type `/` followed by any letters to filter. Not all commands are visible to every user. Some depend on your platform, plan, or environment. For example, `/desktop` only appears on macOS and Windows, `/upgrade` and `/privacy-settings` are only available on Pro and Max plans, and `/terminal-setup` is hidden when your terminal natively supports its keybindings. Claude Code also includes [bundled skills](</docs/en/skills#bundled-skills>) like `/simplify`, `/batch`, `/debug`, and `/loop` that appear alongside built-in commands when you type `/`. To create your own commands, see [skills](</docs/en/skills>). In the table below, `<arg>` indicates a required argument and `[arg]` indicates an optional one.
Command| Purpose
---|---
@@ -11,7 +11,7 @@
`/compact [instructions]`| Compact conversation with optional focus instructions
`/config`| Open the [Settings](</docs/en/settings>) interface to adjust theme, model, [output style](</docs/en/output-styles>), and other preferences. Alias: `/settings`
`/context`| Visualize current context usage as a colored grid. Shows optimization suggestions for context-heavy tools, memory bloat, and capacity warnings
-`/copy [N]`| Copy the last assistant response to clipboard. Pass a number `N` to copy the Nth-latest response: `/copy 2` copies the second-to-last. When code blocks are present, shows an interactive picker to select individual blocks or the full response
+`/copy [N]`| Copy the last assistant response to clipboard. Pass a number `N` to copy the Nth-latest response: `/copy 2` copies the second-to-last. When code blocks are present, shows an interactive picker to select individual blocks or the full response. Press `w` in the picker to write the selection to a file instead of the clipboard, which is useful over SSH
`/cost`| Show token usage statistics. See [cost tracking guide](</docs/en/costs#using-the-cost-command>) for subscription-specific details
`/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
@@ -39,7 +39,7 @@
`/model [model]`| Select or change the AI model. For models that support it, use left/right arrows to [adjust effort level](</docs/en/model-config#adjust-effort-level>). The change takes effect immediately without waiting for the current response to finish
`/passes`| Share a free week of Claude Code with friends. Only visible if your account is eligible
`/permissions`| View or update [permissions](</docs/en/permissions#manage-permissions>). Alias: `/allowed-tools`
-`/plan`| Enter plan mode directly from the prompt
+`/plan [description]`| Enter plan mode directly from the prompt. Pass an optional description to enter plan mode and immediately start with that task, for example `/plan fix the auth bug`
`/plugin`| Manage Claude Code [plugins](</docs/en/plugins>)
`/pr-comments [PR]`| Fetch and display comments from a GitHub pull request. Automatically detects the PR for the current branch, or pass a PR URL or number. Requires the `gh` CLI
`/privacy-settings`| View and update your privacy settings. Only available for Pro and Max plan subscribers
@@ -49,14 +49,14 @@
`/remote-env`| Configure the default remote environment for [web sessions started with `--remote`](</docs/en/claude-code-on-the-web#environment-configuration>)
`/rename [name]`| Rename the current session and show the name on the prompt bar. Without a name, auto-generates one from conversation history
`/resume [session]`| Resume a conversation by ID or name, or open the session picker. Alias: `/continue`
-`/review`| Deprecated. Install the [`code-review` plugin](<https://github.com/anthropics/claude-code-marketplace/blob/main/code-review/README.md>) instead: `claude plugin install code-review@claude-code-marketplace`
+`/review`| Deprecated. Install the [`code-review` plugin](<https://github.com/anthropics/claude-plugins-official/tree/main/plugins/code-review>) instead: `claude plugin install code-review@claude-plugins-official`
`/rewind`| Rewind the conversation and/or code to a previous point, or summarize from a selected message. See [checkpointing](</docs/en/checkpointing>). Alias: `/checkpoint`
`/sandbox`| Toggle [sandbox mode](</docs/en/sandboxing>). Available on supported platforms only
`/schedule [description]`| Create, update, list, or run [Cloud scheduled tasks](</docs/en/web-scheduled-tasks>). Claude walks you through the setup conversationally
`/security-review`| Analyze pending changes on the current branch for security vulnerabilities. Reviews the git diff and identifies risks like injection, auth issues, and data exposure
`/skills`| List available [skills](</docs/en/skills>)
`/stats`| Visualize daily usage, session history, streaks, and model preferences
-`/status`| Open the Settings interface (Status tab) showing version, model, account, and connectivity
+`/status`| Open the Settings interface (Status tab) showing version, model, account, and connectivity. Works while Claude is responding, without waiting for the current response to finish
`/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
--- a/env-vars.md
+++ b/env-vars.md
@@ -10,8 +10,17 @@
`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_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>)
+`ANTHROPIC_DEFAULT_HAIKU_MODEL_SUPPORTED_CAPABILITIES`| See [Model configuration](</docs/en/model-config#customize-pinned-model-display-and-capabilities>)
`ANTHROPIC_DEFAULT_OPUS_MODEL`| See [Model configuration](</docs/en/model-config#environment-variables>)
+`ANTHROPIC_DEFAULT_OPUS_MODEL_DESCRIPTION`| See [Model configuration](</docs/en/model-config#customize-pinned-model-display-and-capabilities>)
+`ANTHROPIC_DEFAULT_OPUS_MODEL_NAME`| See [Model configuration](</docs/en/model-config#customize-pinned-model-display-and-capabilities>)
+`ANTHROPIC_DEFAULT_OPUS_MODEL_SUPPORTED_CAPABILITIES`| See [Model configuration](</docs/en/model-config#customize-pinned-model-display-and-capabilities>)
`ANTHROPIC_DEFAULT_SONNET_MODEL`| See [Model configuration](</docs/en/model-config#environment-variables>)
+`ANTHROPIC_DEFAULT_SONNET_MODEL_DESCRIPTION`| See [Model configuration](</docs/en/model-config#customize-pinned-model-display-and-capabilities>)
+`ANTHROPIC_DEFAULT_SONNET_MODEL_NAME`| See [Model configuration](</docs/en/model-config#customize-pinned-model-display-and-capabilities>)
+`ANTHROPIC_DEFAULT_SONNET_MODEL_SUPPORTED_CAPABILITIES`| See [Model configuration](</docs/en/model-config#customize-pinned-model-display-and-capabilities>)
`ANTHROPIC_FOUNDRY_API_KEY`| API key for Microsoft Foundry authentication (see [Microsoft Foundry](</docs/en/microsoft-foundry>))
`ANTHROPIC_FOUNDRY_BASE_URL`| Full base URL for the Foundry resource (for example, `https://my-resource.services.ai.azure.com/anthropic`). Alternative to `ANTHROPIC_FOUNDRY_RESOURCE` (see [Microsoft Foundry](</docs/en/microsoft-foundry>))
`ANTHROPIC_FOUNDRY_RESOURCE`| Foundry resource name (for example, `my-resource`). Required if `ANTHROPIC_FOUNDRY_BASE_URL` is not set (see [Microsoft Foundry](</docs/en/microsoft-foundry>))
@@ -42,6 +51,7 @@
`CLAUDE_CODE_DISABLE_FAST_MODE`| Set to `1` to disable [fast mode](</docs/en/fast-mode>)
`CLAUDE_CODE_DISABLE_FEEDBACK_SURVEY`| Set to `1` to disable the “How is Claude doing?” session quality surveys. Surveys are also disabled when `DISABLE_TELEMETRY` or `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC` is set. See [Session quality surveys](</docs/en/data-usage#session-quality-surveys>)
`CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC`| Equivalent of setting `DISABLE_AUTOUPDATER`, `DISABLE_FEEDBACK_COMMAND`, `DISABLE_ERROR_REPORTING`, and `DISABLE_TELEMETRY`
+`CLAUDE_CODE_DISABLE_NONSTREAMING_FALLBACK`| Set to `1` to disable the non-streaming fallback when a streaming request fails mid-stream. Streaming errors propagate to the retry layer instead. Useful when a proxy or gateway causes the fallback to produce duplicate tool execution
`CLAUDE_CODE_DISABLE_TERMINAL_TITLE`| Set to `1` to disable automatic terminal title updates based on conversation context
`CLAUDE_CODE_EFFORT_LEVEL`| Set the effort level for supported models. Values: `low`, `medium`, `high`, `max` (Opus 4.6 only), or `auto` to use the model default. Takes precedence over `/effort` and the `effortLevel` setting. See [Adjust effort level](</docs/en/model-config#adjust-effort-level>)
`CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION`| Set to `false` to disable prompt suggestions (the “Prompt suggestions” toggle in `/config`). These are the grayed-out predictions that appear in your prompt input after Claude responds. See [Prompt suggestions](</docs/en/interactive-mode#prompt-suggestions>)
@@ -68,15 +78,17 @@
`CLAUDE_CODE_SKIP_FOUNDRY_AUTH`| Skip Azure authentication for Microsoft Foundry (for example, when using an LLM gateway)
`CLAUDE_CODE_SKIP_VERTEX_AUTH`| Skip Google authentication for Vertex (for example, when using an LLM gateway)
`CLAUDE_CODE_SUBAGENT_MODEL`| See [Model configuration](</docs/en/model-config>)
+`CLAUDE_CODE_SUBPROCESS_ENV_SCRUB`| Set to `1` to strip Anthropic and cloud provider credentials from subprocess environments (Bash tool, hooks, MCP stdio servers). The parent Claude process keeps these credentials for API calls, but child processes cannot read them, reducing exposure to prompt injection attacks that attempt to exfiltrate secrets via shell expansion. `claude-code-action` sets this automatically when `allowed_non_write_users` is configured
`CLAUDE_CODE_TASK_LIST_ID`| Share a task list across sessions. Set the same ID in multiple Claude Code instances to coordinate on a shared task list. See [Task list](</docs/en/interactive-mode#task-list>)
`CLAUDE_CODE_TEAM_NAME`| Name of the agent team this teammate belongs to. Set automatically on [agent team](</docs/en/agent-teams>) members
`CLAUDE_CODE_TMPDIR`| Override the temp directory used for internal temp files. Claude Code appends `/claude/` to this path. Default: `/tmp` on Unix/macOS, `os.tmpdir()` on Windows
`CLAUDE_CODE_USER_EMAIL`| Email address for the authenticated user. Used by SDK callers to provide account information synchronously. Requires `CLAUDE_CODE_ACCOUNT_UUID` and `CLAUDE_CODE_ORGANIZATION_UUID` to also be set
`CLAUDE_CODE_USE_BEDROCK`| Use [Bedrock](</docs/en/amazon-bedrock>)
`CLAUDE_CODE_USE_FOUNDRY`| Use [Microsoft Foundry](</docs/en/microsoft-foundry>)
+`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`| Customize where Claude Code stores its configuration and data files
-`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 hooks](</docs/en/hooks#persist-environment-variables>)
+`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
`DISABLE_AUTOUPDATER`| Set to `1` to disable automatic updates.
`DISABLE_COST_WARNINGS`| Set to `1` to disable cost warning messages
`DISABLE_ERROR_REPORTING`| Set to `1` to opt out of Sentry error reporting
--- a/features-overview.md
+++ b/features-overview.md
@@ -81,7 +81,7 @@
**Can trigger workflows**| No| Yes, with `/<name>`
**Best for**| ”Always do X” rules| Reference material, invocable workflows
-**Put it in CLAUDE.md** if Claude should always know it: coding conventions, build commands, project structure, “never do X” rules.**Put it in a skill** if it’s reference material Claude needs sometimes (API docs, style guides) or a workflow you trigger with `/<name>` (deploy, review, release).**Rule of thumb:** Keep CLAUDE.md under 200 lines. If it’s growing, move reference content to skills or split into [`.claude/rules/`](</docs/en/memory#organize-rules-with-clauderules>) files.
+**Put it in CLAUDE.md** if Claude should always know it: coding conventions, build commands, project structure, “never do X” rules.**Put it in a skill** if it’s reference material Claude needs sometimes (API docs, style guides) or a workflow you trigger with `/<name>` (deploy, review, release).**Rule of thumb:** Keep CLAUDE.md under 200 lines. If it’s growing, move reference content to skills or split into [`.claude/rules/`](</docs/en/memory#organize-rules-with-claude/rules/>) files.
All three store instructions, but they load differently:
Show diff (272 lines)
--- a/hooks.md
+++ b/hooks.md
@@ -29,6 +29,8 @@
`TaskCompleted`| When a task is being marked as completed
`InstructionsLoaded`| When a CLAUDE.md or `.claude/rules/*.md` file is loaded into context. Fires at session start and when files are lazily loaded during a session
`ConfigChange`| When a configuration file changes during a session
+`CwdChanged`| When the working directory changes, for example when Claude executes a `cd` command. Useful for reactive environment management with tools like direnv
+`FileChanged`| When a watched file changes on disk. The `matcher` field specifies which filenames to watch
`WorktreeCreate`| When a worktree is being created via `--worktree` or `isolation: "worktree"`. Replaces default git behavior
`WorktreeRemove`| When a worktree is being removed, either at session exit or when a subagent finishes
`PreCompact`| Before context compaction
@@ -196,6 +198,8 @@
`PreCompact`, `PostCompact`| what triggered compaction| `manual`, `auto`
`SubagentStop`| agent type| same values as `SubagentStart`
`ConfigChange`| configuration source| `user_settings`, `project_settings`, `local_settings`, `policy_settings`, `skills`
+`CwdChanged`| no matcher support| always fires on every directory change
+`FileChanged`| filename (basename of the changed file)| `.envrc`, `.env`, any filename you want to watch
`StopFailure`| error type| `rate_limit`, `authentication_failed`, `billing_error`, `invalid_request`, `server_error`, `max_output_tokens`, `unknown`
`InstructionsLoaded`| load reason| `session_start`, `nested_traversal`, `path_glob_match`, `include`, `compact`
`Elicitation`| MCP server name| your configured MCP server names
@@ -226,7 +230,7 @@
}
}
-`UserPromptSubmit`, `Stop`, `TeammateIdle`, `TaskCompleted`, `WorktreeCreate`, and `WorktreeRemove` don’t support matchers and always fire on every occurrence. If you add a `matcher` field to these events, it is silently ignored.
+`UserPromptSubmit`, `Stop`, `TeammateIdle`, `TaskCompleted`, `WorktreeCreate`, `WorktreeRemove`, and `CwdChanged` don’t support matchers and always fire on every occurrence. If you add a `matcher` field to these events, it is silently ignored.
####
@@ -318,6 +322,7 @@
---|---|---
`command`| yes| Shell command to execute
`async`| no| If `true`, runs in the background without blocking. See Run hooks in the background
+`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
####
@@ -600,6 +605,8 @@
`SubagentStart`| No| Shows stderr to user only
`SessionStart`| No| Shows stderr to user only
`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
`PostCompact`| No| Shows stderr to user only
`Elicitation`| Yes| Denies the elicitation
@@ -671,10 +678,10 @@
TeammateIdle, 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), `permissionDecisionReason`
PermissionRequest| `hookSpecificOutput`| `decision.behavior` (allow/deny)
-WorktreeCreate| stdout path| Hook prints absolute path to created worktree. Non-zero exit fails creation
+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| None| No decision control. Used for side effects like logging or cleanup
+WorktreeRemove, Notification, SessionEnd, PreCompact, 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:
@@ -855,7 +862,7 @@
Any variables written to this file will be available in all subsequent Bash commands that Claude Code executes during the session.
-`CLAUDE_ENV_FILE` is available for SessionStart hooks. Other hook types do not have access to this variable.
+`CLAUDE_ENV_FILE` is available for SessionStart, CwdChanged, and FileChanged hooks. Other hook types do not have access to this variable.
###
@@ -1845,9 +1852,104 @@
+CwdChanged
+
+Runs when the working directory changes during a session, for example when Claude executes a `cd` command. Use this to react to directory changes: reload environment variables, activate project-specific toolchains, or run setup scripts automatically. Pairs with FileChanged for tools like [direnv](<https://direnv.net/>) that manage per-directory environment. CwdChanged hooks have access to `CLAUDE_ENV_FILE`. Variables written to that file persist into subsequent Bash commands for the session, just as in SessionStart hooks. Only `type: "command"` hooks are supported. CwdChanged does not support matchers and fires on every directory change.
+
+####
+
+
+
+CwdChanged input
+
+In addition to the common input fields, CwdChanged hooks receive `old_cwd` and `new_cwd`.
+
+Report incorrect code
+
+Copy
+
+Ask AI
+
+ {
+ "session_id": "abc123",
+ "transcript_path": "/Users/.../.claude/projects/.../transcript.jsonl",
+ "cwd": "/Users/my-project/src",
+ "hook_event_name": "CwdChanged",
+ "old_cwd": "/Users/my-project",
+ "new_cwd": "/Users/my-project/src"
+ }
+
+####
+
+
+
+CwdChanged output
+
+In addition to the JSON output fields available to all hooks, CwdChanged hooks can return `watchPaths` to dynamically set which file paths FileChanged watches:
+
+Field| Description
+---|---
+`watchPaths`| Array of absolute paths. Replaces the current dynamic watch list (paths from your `matcher` configuration are always watched). Returning an empty array clears the dynamic list, which is typical when entering a new directory
+
+CwdChanged hooks have no decision control. They cannot block the directory change.
+
+###
+
+
+
+FileChanged
+
+Runs when a watched file changes on disk. The `matcher` field in your hook configuration controls which filenames to watch: it is a pipe-separated list of basenames (filenames without directory paths, for example `".envrc|.env"`). The same `matcher` value is also used to filter which hooks run when a file changes, matching against the basename of the changed file. Useful for reloading environment variables when project configuration files are modified. FileChanged hooks have access to `CLAUDE_ENV_FILE`. Variables written to that file persist into subsequent Bash commands for the session, just as in SessionStart hooks. Only `type: "command"` hooks are supported.
+
+####
+
+
+
+FileChanged input
+
+In addition to the common input fields, FileChanged hooks receive `file_path` and `event`.
+
+Field| Description
+---|---
+`file_path`| Absolute path to the file that changed
+`event`| What happened: `"change"` (file modified), `"add"` (file created), or `"unlink"` (file deleted)
+
+Report incorrect code
+
+Copy
+
+Ask AI
+
+ {
+ "session_id": "abc123",
+ "transcript_path": "/Users/.../.claude/projects/.../transcript.jsonl",
+ "cwd": "/Users/my-project",
+ "hook_event_name": "FileChanged",
+ "file_path": "/Users/my-project/.envrc",
+ "event": "change"
+ }
+
+####
+
+
+
+FileChanged output
+
+In addition to the JSON output fields available to all hooks, FileChanged hooks can return `watchPaths` to dynamically update which file paths are watched:
+
+Field| Description
+---|---
+`watchPaths`| Array of absolute paths. Replaces the current dynamic watch list (paths from your `matcher` configuration are always watched). Use this when your hook script discovers additional files to watch based on the changed file
+
+FileChanged hooks have no decision control. They cannot block the file change from occurring.
+
+###
+
+
+
WorktreeCreate
-When you run `claude --worktree` or a [subagent uses `isolation: "worktree"`](</docs/en/sub-agents#choose-the-subagent-scope>), Claude Code creates an isolated working copy using `git worktree`. If you configure a WorktreeCreate hook, it replaces the default git behavior, letting you use a different version control system like SVN, Perforce, or Mercurial. The hook must print the absolute path to the created worktree directory on stdout. Claude Code uses this path as the working directory for the isolated session. This example creates an SVN working copy and prints the path for Claude Code to use. Replace the repository URL with your own:
+When you run `claude --worktree` or a [subagent uses `isolation: "worktree"`](</docs/en/sub-agents#choose-the-subagent-scope>), Claude Code creates an isolated working copy using `git worktree`. If you configure a WorktreeCreate hook, it replaces the default git behavior, letting you use a different version control system like SVN, Perforce, or Mercurial. The hook must return the absolute path to the created worktree directory. Claude Code uses this path as the working directory for the isolated session. Command hooks print it on stdout; HTTP hooks return it via `hookSpecificOutput.worktreePath`. This example creates an SVN working copy and prints the path for Claude Code to use. Replace the repository URL with your own:
Report incorrect code
@@ -1900,7 +2002,12 @@
WorktreeCreate output
-The hook must print the absolute path to the created worktree directory on stdout. If the hook fails or produces no output, worktree creation fails with an error. WorktreeCreate hooks do not use the standard allow/block decision model. Instead, the hook’s success or failure determines the outcome. Only `type: "command"` hooks are supported.
+WorktreeCreate hooks do not use the standard allow/block decision model. Instead, the hook’s success or failure determines the outcome. The hook must return the absolute path to the created worktree directory:
+
+ * **Command hooks** (`type: "command"`): print the path on stdout.
+ * **HTTP hooks** (`type: "http"`): return `{ "hookSpecificOutput": { "hookEventName": "WorktreeCreate", "worktreePath": "/absolute/path" } }` in the response body.
+
+If the hook fails or produces no path, worktree creation fails with an error.
###
@@ -1908,7 +2015,7 @@
WorktreeRemove
-The cleanup counterpart to WorktreeCreate. This hook fires when a worktree is being removed, either when you exit a `--worktree` session and choose to remove it, or when a subagent with `isolation: "worktree"` finishes. For git-based worktrees, Claude handles cleanup automatically with `git worktree remove`. If you configured a WorktreeCreate hook for a non-git version control system, pair it with a WorktreeRemove hook to handle cleanup. Without one, the worktree directory is left on disk. Claude Code passes the path that WorktreeCreate printed on stdout as `worktree_path` in the hook input. This example reads that path and removes the directory:
+The cleanup counterpart to WorktreeCreate. This hook fires when a worktree is being removed, either when you exit a `--worktree` session and choose to remove it, or when a subagent with `isolation: "worktree"` finishes. For git-based worktrees, Claude handles cleanup automatically with `git worktree remove`. If you configured a WorktreeCreate hook for a non-git version control system, pair it with a WorktreeRemove hook to handle cleanup. Without one, the worktree directory is left on disk. Claude Code passes the path returned by WorktreeCreate as `worktree_path` in the hook input. This example reads that path and removes the directory:
Report incorrect code
@@ -1953,7 +2060,7 @@
"worktree_path": "/Users/.../my-project/.claude/worktrees/feature-auth"
}
-WorktreeRemove hooks have no decision control. They cannot block worktree removal but can perform cleanup tasks like removing version control state or archiving changes. Hook failures are logged in debug mode only. Only `type: "command"` hooks are supported.
+WorktreeRemove hooks have no decision control. They cannot block worktree removal but can perform cleanup tasks like removing version control state or archiving changes. Hook failures are logged in debug mode only.
###
@@ -2249,22 +2356,25 @@
* `TaskCompleted`
* `UserPromptSubmit`
-Events that only support `type: "command"` hooks:
+Events that support `command` and `http` hooks but not `prompt` or `agent`:
* `ConfigChange`
+ * `CwdChanged`
* `Elicitation`
* `ElicitationResult`
+ * `FileChanged`
* `InstructionsLoaded`
* `Notification`
* `PostCompact`
* `PreCompact`
* `SessionEnd`
- * `SessionStart`
* `StopFailure`
* `SubagentStart`
* `TeammateIdle`
* `WorktreeCreate`
* `WorktreeRemove`
+
+`SessionStart` supports only `command` hooks.
###
@@ -2589,6 +2699,37 @@
+Windows PowerShell tool
+
+On Windows, you can run individual hooks in PowerShell by setting `"shell": "powershell"` on a command hook. Hooks spawn PowerShell directly, so this works regardless of whether `CLAUDE_CODE_USE_POWERSHELL_TOOL` is set. Claude Code auto-detects `pwsh.exe` (PowerShell 7+) with a fallback to `powershell.exe` (5.1).
+
+Report incorrect code
+
+Copy
+
+Ask AI
+
+ {
+ "hooks": {
+ "PostToolUse": [
+ {
+ "matcher": "Write",
+ "hooks": [
+ {
+ "type": "command",
+ "shell": "powershell",
+ "command": "Write-Host 'File written'"
+ }
+ ]
+ }
+ ]
+ }
+ }
+
+##
+
+
+
Debug hooks
Run `claude --debug` to see hook execution details, including which hooks matched, their exit codes, and output. Toggle verbose mode with `Ctrl+O` to see hook progress in the transcript.
--- a/hooks-guide.md
+++ b/hooks-guide.md
@@ -67,6 +67,7 @@
* Block edits to protected files
* Re-inject context after compaction
* Audit configuration changes
+ * Reload environment when directory or files change
* Auto-approve specific permission prompts
###
@@ -323,6 +324,61 @@
}
The matcher filters by configuration type: `user_settings`, `project_settings`, `local_settings`, `policy_settings`, or `skills`. To block a change from taking effect, exit with code 2 or return `{"decision": "block"}`. See the [ConfigChange reference](</docs/en/hooks#configchange>) for the full input schema.
+
+###
+
+
+
+Reload environment when directory or files change
+
+Some projects set different environment variables depending on which directory you are in. Tools like [direnv](<https://direnv.net/>) do this automatically in your shell, but Claude’s Bash tool does not pick up those changes on its own. A `CwdChanged` hook fixes this: it runs each time Claude changes directory, so you can reload the correct variables for the new location. The hook writes the updated values to `CLAUDE_ENV_FILE`, which Claude Code applies before each Bash command. Add this to `~/.claude/settings.json`:
+
+Report incorrect code
+
+Copy
+
+Ask AI
+
+ {
+ "hooks": {
+ "CwdChanged": [
+ {
+ "hooks": [
+ {
+ "type": "command",
+ "command": "direnv export bash >> \"$CLAUDE_ENV_FILE\""
+ }
+ ]
+ }
+ ]
+ }
+ }
+
+To react to specific files instead of every directory change, use `FileChanged` with a `matcher` listing the filenames to watch (pipe-separated). The `matcher` both configures which files to watch and filters which hooks run. This example watches `.envrc` and `.env` for changes in the current directory:
+
+Report incorrect code
+
+Copy
+
+Ask AI
+
+ {
+ "hooks": {
+ "FileChanged": [
+ {
+ "matcher": ".envrc|.env",
+ "hooks": [
+ {
+ "type": "command",
+ "command": "direnv export bash >> \"$CLAUDE_ENV_FILE\""
+ }
+ ]
+ }
+ ]
+ }
+ }
+
+See the [CwdChanged](</docs/en/hooks#cwdchanged>) and [FileChanged](</docs/en/hooks#filechanged>) reference entries for input schemas, `watchPaths` output, and `CLAUDE_ENV_FILE` details.
###
@@ -401,6 +457,8 @@
`TaskCompleted`| When a task is being marked as completed
`InstructionsLoaded`| When a CLAUDE.md or `.claude/rules/*.md` file is loaded into context. Fires at session start and when files are lazily loaded during a session
`ConfigChange`| When a configuration file changes during a session
+`CwdChanged`| When the working directory changes, for example when Claude executes a `cd` command. Useful for reactive environment management with tools like direnv
+`FileChanged`| When a watched file changes on disk. The `matcher` field specifies which filenames to watch
`WorktreeCreate`| When a worktree is being created via `--worktree` or `isolation: "worktree"`. Replaces default git behavior
`WorktreeRemove`| When a worktree is being removed, either at session exit or when a subagent finishes
`PreCompact`| Before context compaction
@@ -557,7 +615,8 @@
`InstructionsLoaded`| load reason| `session_start`, `nested_traversal`, `path_glob_match`, `include`, `compact`
`Elicitation`| MCP server name| your configured MCP server names
`ElicitationResult`| MCP server name| same values as `Elicitation`
-`UserPromptSubmit`, `Stop`, `TeammateIdle`, `TaskCompleted`, `WorktreeCreate`, `WorktreeRemove`| no matcher support| always fires on every occurrence
+`FileChanged`| filename (basename of the changed file)| `.envrc`, `.env`, any filename you want to watch
+`UserPromptSubmit`, `Stop`, `TeammateIdle`, `TaskCompleted`, `WorktreeCreate`, `WorktreeRemove`, `CwdChanged`| no matcher support| always fires on every occurrence
A few more examples showing matchers on different event types:
--- a/interactive-mode.md
+++ b/interactive-mode.md
@@ -21,13 +21,13 @@
Shortcut| Description| Context
---|---|---
`Ctrl+C`| Cancel current input or generation| Standard interrupt
-`Ctrl+F`| Kill all background agents. Press twice within 3 seconds to confirm| Background agent control
+`Ctrl+X Ctrl+K`| Kill all background agents. Press twice within 3 seconds to confirm| Background agent control
`Ctrl+D`| Exit Claude Code session| EOF signal
-`Ctrl+G`| Open in default text editor| Edit your prompt or custom response in your default text editor
+`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 terminal screen| Keeps conversation history
`Ctrl+O`| Toggle verbose output| Shows detailed tool usage and execution. Also expands MCP read and search calls, which collapse to a single line like “Queried slack” by default
`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| Pastes an image or path to an image file
+`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
`Ctrl+T`| Toggle task list| Show or hide the task list in the terminal status area
`Left/Right arrows`| Cycle through dialog tabs| Navigate between tabs in permission dialogs and menus
@@ -36,6 +36,7 @@
`Shift+Tab` or `Alt+M` (some configurations)| Cycle permission modes| Cycle through `default`, `acceptEdits`, `plan`, and any modes you have enabled, such as `auto` or `bypassPermissions`. See [permission modes](</docs/en/permission-modes>).
`Option+P` (macOS) or `Alt+P` (Windows/Linux)| Switch model| Switch models without clearing your prompt
`Option+T` (macOS) or `Alt+T` (Windows/Linux)| Toggle extended thinking| Enable or disable extended thinking mode. Run `/terminal-setup` first to enable this shortcut
+`Option+O` (macOS) or `Alt+O` (Windows/Linux)| Toggle fast mode| Enable or disable [fast mode](</docs/en/fast-mode>)
###
@@ -91,6 +92,19 @@
`/` at start| Command or skill| See built-in commands and [skills](</docs/en/skills>)
`!` at start| Bash mode| Run commands directly and add execution output to the session
`@`| File path mention| Trigger file path autocomplete
+
+###
+
+
+
+Transcript viewer
+
+When the transcript viewer is open (toggled with `Ctrl+O`), these shortcuts are available. `Ctrl+E` can be rebound via [`transcript:toggleShowAll`](</docs/en/keybindings>).
+
+Shortcut| Description
+---|---
+`Ctrl+E`| Toggle show all content
+`q`, `Ctrl+C`, `Esc`| Exit transcript view. `Ctrl+C` and `Esc` can be rebound via [`transcript:exit`](</docs/en/keybindings>); `q` is not rebindable
###
@@ -256,7 +270,7 @@
**Key features:**
- * Output is buffered and Claude can retrieve it using the TaskOutput tool
+ * Output is written to a file and Claude can retrieve it using the Read tool
* Background tasks have unique IDs for tracking and output retrieval
* Background tasks are automatically cleaned up when Claude Code exits
* Background tasks are automatically terminated if output exceeds 5GB, with a note in stderr explaining why
--- a/keybindings.md
+++ b/keybindings.md
@@ -117,12 +117,14 @@
Action| Default| Description
---|---|---
`chat:cancel`| Escape| Cancel current input
+`chat:killAgents`| Ctrl+X Ctrl+K| Kill all background agents
`chat:cycleMode`| Shift+Tab*| Cycle permission modes
`chat:modelPicker`| Cmd+P / Meta+P| Open model picker
+`chat:fastMode`| Meta+O| Toggle fast mode
`chat:thinkingToggle`| Cmd+T / Meta+T| Toggle extended thinking
`chat:submit`| Enter| Submit message
`chat:undo`| Ctrl+_| Undo last action
-`chat:externalEditor`| Ctrl+G| Open in external editor
+`chat:externalEditor`| Ctrl+G, Ctrl+X Ctrl+E| Open in external editor
`chat:stash`| Ctrl+S| Stash current prompt
`chat:imagePaste`| Ctrl+V (Alt+V on Windows)| Paste image
@@ -278,6 +280,8 @@
---|---|---
`footer:next`| Right| Next footer item
`footer:previous`| Left| Previous footer item
+`footer:up`| Up| Navigate up in footer (deselects at top)
+`footer:down`| Down| Navigate down in footer
`footer:openSelected`| Enter| Open selected footer item
`footer:clearSelection`| Escape| Clear footer selection
@@ -419,7 +423,7 @@
Uppercase letters
-A standalone uppercase letter implies Shift. For example, `K` is equivalent to `shift+k`. This is useful for vim-style bindings where uppercase and lowercase keys have different meanings. Uppercase letters with modifiers (e.g., `ctrl+K`) are treated as stylistic and do **not** imply Shift — `ctrl+K` is the same as `ctrl+k`.
+A standalone uppercase letter implies Shift. For example, `K` is equivalent to `shift+k`. This is useful for vim-style bindings where uppercase and lowercase keys have different meanings. Uppercase letters with modifiers (e.g., `ctrl+K`) are treated as stylistic and do **not** imply Shift: `ctrl+K` is the same as `ctrl+k`.
###
--- a/memory.md
+++ b/memory.md
@@ -116,9 +116,31 @@
+AGENTS.md
+
+Claude Code reads `CLAUDE.md`, not `AGENTS.md`. If your repository already uses `AGENTS.md` for other coding agents, create a `CLAUDE.md` that imports it so both tools read the same instructions without duplicating them. You can also add Claude-specific instructions below the import. Claude loads the imported file at session start, then appends the rest:
+
+CLAUDE.md
+
+Report incorrect code
+
+Copy
+
+Ask AI
+
+ @AGENTS.md
+
+ ## Claude Code
+
+ Use plan mode for changes under `src/billing/`.
+
+###
+
+
+
How CLAUDE.md files load
-Claude Code reads CLAUDE.md files by walking up the directory tree from your current working directory, checking each directory along the way. This means if you run Claude Code in `foo/bar/`, it loads instructions from both `foo/bar/CLAUDE.md` and `foo/CLAUDE.md`. Claude also discovers CLAUDE.md files in subdirectories under your current working directory. Instead of loading them at launch, they are included when Claude reads files in those subdirectories. If you work in a large monorepo where other teams’ CLAUDE.md files get picked up, use `claudeMdExcludes` to skip them.
+Claude Code reads CLAUDE.md files by walking up the directory tree from your current working directory, checking each directory along the way. This means if you run Claude Code in `foo/bar/`, it loads instructions from both `foo/bar/CLAUDE.md` and `foo/CLAUDE.md`. Claude also discovers CLAUDE.md files in subdirectories under your current working directory. Instead of loading them at launch, they are included when Claude reads files in those subdirectories. If you work in a large monorepo where other teams’ CLAUDE.md files get picked up, use `claudeMdExcludes` to skip them. Block-level HTML comments (`<!-- maintainer notes -->`) in CLAUDE.md files are stripped before the content is injected into Claude’s context. Use them to leave notes for human maintainers without spending context tokens on them. Comments inside code blocks are preserved. When you open a CLAUDE.md file directly with the Read tool, comments remain visible.
####
--- a/model-config.md
+++ b/model-config.md
@@ -172,7 +172,7 @@
Adjust effort level
-[Effort levels](<https://platform.claude.com/docs/en/build-with-claude/effort>) control adaptive reasoning, which dynamically allocates thinking based on task complexity. Lower effort is faster and cheaper for straightforward tasks, while higher effort provides deeper reasoning for complex problems. Three levels persist across sessions: **low** , **medium** , and **high**. A fourth level, **max** , provides the deepest reasoning with no constraint on token spending, so responses are slower and cost more than at `high`. `max` is available on Opus 4.6 only and applies to the current session without persisting. Opus 4.6 defaults to medium effort for Max and Team subscribers. **Setting effort:**
+[Effort levels](<https://platform.claude.com/docs/en/build-with-claude/effort>) control adaptive reasoning, which dynamically allocates thinking based on task complexity. Lower effort is faster and cheaper for straightforward tasks, while higher effort provides deeper reasoning for complex problems. Three levels persist across sessions: **low** , **medium** , and **high**. A fourth level, **max** , provides the deepest reasoning with no constraint on token spending, so responses are slower and cost more than at `high`. `max` is available on Opus 4.6 only and does not persist across sessions except through the `CLAUDE_CODE_EFFORT_LEVEL` environment variable. Opus 4.6 and Sonnet 4.6 default to medium effort. This applies to all providers, including Bedrock, Vertex AI, and direct API access. Medium is the recommended level for most coding tasks: it balances speed and reasoning depth, and higher levels can cause the model to overthink routine work. Reserve `high` or `max` for tasks that genuinely benefit from deeper reasoning, such as hard debugging problems or complex architectural decisions. For one-off deep reasoning without changing your session setting, include “ultrathink” in your prompt to trigger high effort for that turn. **Setting effort:**
* **`/effort`** : run `/effort low`, `/effort medium`, `/effort high`, or `/effort max` to change the level, or `/effort auto` to reset to the model default
* **In`/model`**: use left/right arrow keys to adjust the effort slider when selecting a model
@@ -291,6 +291,43 @@
The `[1m]` suffix applies the 1M context window to all usage of that alias, including `opusplan`. Claude Code strips the suffix before sending the model ID to your provider. Only append `[1m]` when the underlying model supports 1M context, such as Opus 4.6 or Sonnet 4.6.
The `settings.availableModels` allowlist still applies when using third-party providers. Filtering matches on the model alias (`opus`, `sonnet`, `haiku`), not the provider-specific model ID.
+
+###
+
+
+
+Customize pinned model display and capabilities
+
+When you pin a model on a third-party provider, the provider-specific ID appears as-is in the `/model` picker and Claude Code may not recognize which features the model supports. You can override the display name and declare capabilities with companion environment variables for each pinned model. These variables only take effect on third-party providers such as Bedrock, Vertex AI, and Foundry. They have no effect when using the Anthropic API directly.
+
+Environment variable| Description
+---|---
+`ANTHROPIC_DEFAULT_OPUS_MODEL_NAME`| Display name for the pinned Opus model in the `/model` picker. Defaults to the model ID when not set
+`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:
+
+Capability value| Enables
+---|---
+`effort`| Effort levels and the `/effort` command
+`max_effort`| The `max` effort level
+`thinking`| [Extended thinking](</docs/en/common-workflows#use-extended-thinking-thinking-mode>)
+`adaptive_thinking`| Adaptive reasoning that dynamically allocates thinking based on task complexity
+`interleaved_thinking`| Thinking between tool calls
+
+When `_SUPPORTED_CAPABILITIES` is set, listed capabilities are enabled and unlisted capabilities are disabled for the matching pinned model. When the variable is unset, Claude Code falls back to built-in detection based on the model ID. This example pins Opus to a Bedrock custom model ARN, sets a friendly name, and declares its capabilities:
+
+Report incorrect code
+
+Copy
+
+Ask AI
+
+ export ANTHROPIC_DEFAULT_OPUS_MODEL='arn:aws:bedrock:us-east-1:123456789012:custom-model/abc'
+ export ANTHROPIC_DEFAULT_OPUS_MODEL_NAME='Opus via Bedrock'
+ export ANTHROPIC_DEFAULT_OPUS_MODEL_DESCRIPTION='Opus 4.6 routed through a Bedrock custom endpoint'
+ export ANTHROPIC_DEFAULT_OPUS_MODEL_SUPPORTED_CAPABILITIES='effort,max_effort,thinking,adaptive_thinking,interleaved_thinking'
###
--- a/monitoring-usage.md
+++ b/monitoring-usage.md
@@ -95,7 +95,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 MCP server/tool names and skill names in tool events (default: disabled)| `1` to enable
+`OTEL_LOG_TOOL_DETAILS`| Enable logging of tool input arguments, MCP server/tool names, and skill names in tool events (default: disabled)| `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`
@@ -482,6 +482,7 @@
* For Bash tool: includes `bash_command`, `full_command`, `timeout`, `description`, `dangerouslyDisableSandbox`, and `git_commit_id` (the commit SHA, when a `git commit` command succeeds)
* For MCP tools (when `OTEL_LOG_TOOL_DETAILS=1`): includes `mcp_server_name`, `mcp_tool_name`
* For Skill tool (when `OTEL_LOG_TOOL_DETAILS=1`): includes `skill_name`
+ * `tool_input` (when `OTEL_LOG_TOOL_DETAILS=1`): JSON-serialized tool arguments. Individual values over 512 characters are truncated, and the full payload is bounded to ~4 K characters. Applies to all tools including MCP tools.
####
@@ -666,7 +667,7 @@
* Raw file contents and code snippets are not included in metrics or events. Tool execution events include bash commands and file paths in the `tool_parameters` field, which may contain sensitive values. If your commands may include secrets, configure your telemetry backend to filter or redact `tool_parameters`
* 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`
- * MCP server/tool names and skill names are not logged by default because they can reveal user-specific configurations. To include them, set `OTEL_LOG_TOOL_DETAILS=1`
+ * Tool input arguments are not logged by default. To include them, set `OTEL_LOG_TOOL_DETAILS=1`. When enabled, `tool_result` events include MCP server/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 `tool_input` as needed
##
--- a/plugins.md
+++ b/plugins.md
@@ -168,7 +168,7 @@
You’ll see Claude respond with a greeting. Run `/help` to see your skill listed under the plugin namespace.
-**Why namespacing?** Plugin skills are always namespaced (like `/greet:hello`) to prevent conflicts when multiple plugins have skills with the same name.To change the namespace prefix, update the `name` field in `plugin.json`.
+**Why namespacing?** Plugin skills are always namespaced (like `/my-first-plugin:hello`) to prevent conflicts when multiple plugins have skills with the same name.To change the namespace prefix, update the `name` field in `plugin.json`.
5
Show diff (142 lines)
--- a/plugins-reference.md
+++ b/plugins-reference.md
@@ -121,6 +121,8 @@
`TaskCompleted`| When a task is being marked as completed
`InstructionsLoaded`| When a CLAUDE.md or `.claude/rules/*.md` file is loaded into context. Fires at session start and when files are lazily loaded during a session
`ConfigChange`| When a configuration file changes during a session
+`CwdChanged`| When the working directory changes, for example when Claude executes a `cd` command. Useful for reactive environment management with tools like direnv
+`FileChanged`| When a watched file changes on disk. The `matcher` field specifies which filenames to watch
`WorktreeCreate`| When a worktree is being created via `--worktree` or `isolation: "worktree"`. Replaces default git behavior
`WorktreeRemove`| When a worktree is being removed, either at session exit or when a subagent finishes
`PreCompact`| Before context compaction
@@ -362,13 +364,72 @@
Field| Type| Description| Example
---|---|---|---
-`commands`| string|array| Additional command files/directories| `"./custom/cmd.md"` or `["./cmd1.md"]`
-`agents`| string|array| Additional agent files| `"./custom/agents/reviewer.md"`
-`skills`| string|array| Additional skill directories| `"./custom/skills/"`
+`commands`| string|array| Custom command files/directories (replaces default `commands/`)| `"./custom/cmd.md"` or `["./cmd1.md"]`
+`agents`| string|array| Custom agent files (replaces default `agents/`)| `"./custom/agents/reviewer.md"`
+`skills`| string|array| Custom skill directories (replaces default `skills/`)| `"./custom/skills/"`
`hooks`| string|array|object| Hook config paths or inline config| `"./my-extra-hooks.json"`
`mcpServers`| string|array|object| MCP config paths or inline config| `"./my-extra-mcp-config.json"`
-`outputStyles`| string|array| Additional output style files/directories| `"./styles/"`
+`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"`
+`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
+
+###
+
+
+
+User configuration
+
+The `userConfig` field declares values that Claude Code prompts the user for when the plugin is enabled. Use this instead of requiring users to hand-edit `settings.json`.
+
+Report incorrect code
+
+Copy
+
+Ask AI
+
+ {
+ "userConfig": {
+ "api_endpoint": {
+ "description": "Your team's API endpoint",
+ "sensitive": false
+ },
+ "api_token": {
+ "description": "API authentication token",
+ "sensitive": true
+ }
+ }
+ }
+
+Keys must be valid identifiers. Each value is available for substitution as `${user_config.KEY}` in MCP and LSP server configs, hook commands, and (for non-sensitive values only) skill and agent content. Values are also exported to plugin subprocesses as `CLAUDE_PLUGIN_OPTION_<KEY>` environment variables. Non-sensitive values are stored in `settings.json` under `pluginConfigs[<plugin-id>].options`. Sensitive values go to the system keychain (or `~/.claude/.credentials.json` where the keychain is unavailable). Keychain storage is shared with OAuth tokens and has an approximately 2 KB total limit, so keep sensitive values small.
+
+###
+
+
+
+Channels
+
+The `channels` field lets a plugin declare one or more message channels that inject content into the conversation. Each channel binds to an MCP server that the plugin provides.
+
+Report incorrect code
+
+Copy
+
+Ask AI
+
+ {
+ "channels": [
+ {
+ "server": "telegram",
+ "userConfig": {
+ "bot_token": { "description": "Telegram bot token", "sensitive": true },
+ "owner_id": { "description": "Your Telegram user ID", "sensitive": false }
+ }
+ }
+ ]
+ }
+
+The `server` field is required and must match a key in the plugin’s `mcpServers`. The optional per-channel `userConfig` uses the same schema as the top-level field, letting the plugin prompt for bot tokens or owner IDs when the plugin is enabled.
###
@@ -376,12 +437,12 @@
Path behavior rules
-**Important** : Custom paths supplement default directories - they don’t replace them.
-
- * If `commands/` exists, it’s loaded in addition to custom command paths
- * All paths must be relative to plugin root and start with `./`
- * Commands from custom paths use the same naming and namespacing rules
- * Multiple paths can be specified as arrays for flexibility
+For `commands`, `agents`, `skills`, and `outputStyles`, custom paths replace the default directory. If the manifest specifies `commands`, the default `commands/` directory is not scanned. 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
+ * Multiple paths can be specified as arrays
+ * To keep the default directory and add more paths for commands, agents, skills, or output styles, include the default in your array: `"commands": ["./commands/", "./extras/deploy.md"]`
**Path examples** :
@@ -562,6 +623,8 @@
│ └── pdf-processor/
│ ├── SKILL.md
│ └── scripts/
+ ├── output-styles/ # Output style definitions
+ │ └── terse.md
├── hooks/ # Hook configurations
│ ├── hooks.json # Main hook config
│ └── security-hooks.json # Additional hooks
@@ -575,7 +638,7 @@
├── LICENSE # License file
└── CHANGELOG.md # Version history
-The `.claude-plugin/` directory contains the `plugin.json` file. All other directories (commands/, agents/, skills/, 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/, hooks/) must be at the plugin root, not inside `.claude-plugin/`.
###
@@ -589,6 +652,7 @@
**Commands**| `commands/`| Skill Markdown files (legacy; use `skills/` for new skills)
**Agents**| `agents/`| Subagent Markdown files
**Skills**| `skills/`| Skills with `<name>/SKILL.md` structure
+**Output styles**| `output-styles/`| Output style definitions
**Hooks**| `hooks/hooks.json`| Hook configuration
**MCP servers**| `.mcp.json`| MCP server definitions
**LSP servers**| `.lsp.json`| Language server configurations
@@ -773,7 +837,7 @@
Debugging commands
-Use `claude --debug` (or `/debug` within the TUI) to see plugin loading details: This shows:
+Use `claude --debug` to see plugin loading details: This shows:
* Which plugins are being loaded
* Any errors in plugin manifests
--- a/sandboxing.md
+++ b/sandboxing.md
@@ -125,7 +125,7 @@
/sandbox
-This opens a menu where you can choose between sandbox modes. If required dependencies are missing (such as `bubblewrap` or `socat` on Linux), the menu displays installation instructions for your platform.
+This opens a menu where you can choose between sandbox modes. If required dependencies are missing (such as `bubblewrap` or `socat` on Linux), the menu displays installation instructions for your platform. By default, if the sandbox cannot start (missing dependencies, unsupported platform, or platform restrictions), Claude Code shows a warning and runs commands without sandboxing. To make this a hard failure instead, set [`sandbox.failIfUnavailable`](</docs/en/settings#sandbox-settings>) to `true`. This is intended for managed deployments that require sandboxing as a security gate.
###
--- a/settings.md
+++ b/settings.md
@@ -110,6 +110,7 @@
The legacy Windows path `C:\ProgramData\ClaudeCode\managed-settings.json` is no longer supported as of v2.1.75. Administrators who deployed settings to that location must migrate files to `C:\Program Files\ClaudeCode\managed-settings.json`.
+File-based managed settings also support a drop-in directory at `managed-settings.d/` in the same system directory alongside `managed-settings.json`. This lets separate teams deploy independent policy fragments without coordinating edits to a single file. Following the systemd convention, `managed-settings.json` is merged first as the base, then all `*.json` files in the drop-in directory are sorted alphabetically and merged on top. Later files override earlier ones for scalar values; arrays are concatenated and de-duplicated; objects are deep-merged. Hidden files starting with `.` are ignored. Use numeric prefixes to control merge order, for example `10-telemetry.json` and `20-security.json`.
See [managed settings](</docs/en/permissions#managed-only-settings>) and [Managed MCP configuration](</docs/en/mcp#managed-mcp-configuration>) for details.
Managed deployments can also restrict **plugin marketplace additions** using `strictKnownMarketplaces`. For more information, see [Managed marketplace restrictions](</docs/en/plugin-marketplaces#managed-marketplace-restrictions>).
@@ -177,7 +178,9 @@
`permissions`| See table below for structure of permissions.|
`autoMode`| Customize what the [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) classifier blocks and allows. Contains `environment`, `allow`, and `soft_deny` arrays of prose rules. See [Configure the auto mode classifier](</docs/en/permissions#configure-the-auto-mode-classifier>). Not read from shared project settings| `{"environment": ["Trusted repo: github.example.com/acme"]}`
`disableAutoMode`| Set to `"disable"` to prevent [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) from being activated. Removes `auto` from the `Shift+Tab` cycle and rejects `--permission-mode auto` at startup. Most useful in [managed settings](</docs/en/permissions#managed-settings>) where users cannot override it| `"disable"`
+`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`
`hooks`| Configure custom commands to run at lifecycle events. See [hooks documentation](</docs/en/hooks>) for format| See [hooks](</docs/en/hooks>)
+`defaultShell`| Default shell for input-box `!` commands. Accepts `"bash"` (default) or `"powershell"`. Setting `"powershell"` routes interactive `!` commands through PowerShell on Windows. Requires `CLAUDE_CODE_USE_POWERSHELL_TOOL=1`. See [PowerShell tool](</docs/en/tools-reference#powershell-tool>)| `"powershell"`
`disableAllHooks`| Disable all [hooks](</docs/en/hooks>) and any custom [status line](</docs/en/statusline>)| `true`
`allowManagedHooksOnly`| (Managed settings only) Prevent loading of user, project, and plugin hooks. Only allows managed hooks and SDK hooks. See Hook configuration| `true`
`allowedHttpHookUrls`| Allowlist of URL patterns that HTTP hooks may target. Supports `*` as a wildcard. When set, hooks with non-matching URLs are blocked. Undefined = no restriction, empty array = block all HTTP hooks. Arrays merge across settings sources. See Hook configuration| `["https://hooks.example.com/*"]`
@@ -200,6 +203,7 @@
`enabledMcpjsonServers`| List of specific MCP servers from `.mcp.json` files to approve| `["memory", "github"]`
`disabledMcpjsonServers`| List of specific MCP servers from `.mcp.json` files to reject| `["filesystem"]`
`channelsEnabled`| (Managed settings only) Allow [channels](</docs/en/channels>) for Team and Enterprise users. Unset or `false` blocks channel message delivery regardless of what users pass to `--channels`| `true`
+`allowedChannelPlugins`| (Managed settings only) Allowlist of channel plugins that may push messages. Replaces the default Anthropic allowlist when set. Undefined = fall back to the default, empty array = block all channel plugins. Requires `channelsEnabled: true`. See [Restrict which channel plugins can run](</docs/en/channels#restrict-which-channel-plugins-can-run>)| `[{ "marketplace": "claude-plugins-official", "plugin": "telegram" }]`
`allowedMcpServers`| When set in managed-settings.json, allowlist of MCP servers users can configure. Undefined = no restrictions, empty array = lockdown. Applies to all scopes. Denylist takes precedence. See [Managed MCP configuration](</docs/en/mcp#managed-mcp-configuration>)| `[{ "serverName": "github" }]`
`deniedMcpServers`| When set in managed-settings.json, denylist of MCP servers that are explicitly blocked. Applies to all scopes including managed servers. Denylist takes precedence over allowlist. See [Managed MCP configuration](</docs/en/mcp#managed-mcp-configuration>)| `[{ "serverName": "filesystem" }]`
`strictKnownMarketplaces`| When set in managed-settings.json, 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" }]`
@@ -293,6 +297,7 @@
Keys| Description| Example
---|---|---
`enabled`| Enable bash sandboxing (macOS, Linux, and WSL2). Default: false| `true`
+`failIfUnavailable`| Exit with an error at startup if `sandbox.enabled` is true but the sandbox cannot start (missing dependencies, unsupported platform, or platform restrictions). When false (default), a warning is shown and commands run unsandboxed. Intended for managed settings deployments that require sandboxing as a hard gate| `true`
`autoAllowBashIfSandboxed`| Auto-approve bash commands when sandboxed. Default: true| `true`
`excludedCommands`| Commands that should run outside of the sandbox| `["git", "docker"]`
`allowUnsandboxedCommands`| Allow commands to run outside the sandbox via the `dangerouslyDisableSandbox` parameter. When set to `false`, the `dangerouslyDisableSandbox` escape hatch is completely disabled and all commands must run sandboxed (or be in `excludedCommands`). Useful for enterprise policies that require strict sandboxing. Default: true| `false`
@@ -513,7 +518,7 @@
1. **Managed settings** ([server-managed](</docs/en/server-managed-settings>), MDM/OS-level policies, or [managed settings](</docs/en/settings#settings-files>))
* Policies deployed by IT through server delivery, MDM configuration profiles, registry policies, or managed settings files
* Cannot be overridden by any other level, including command line arguments
- * Within the managed tier, precedence is: server-managed > MDM/OS-level policies > `managed-settings.json` > HKCU registry (Windows only). Only one managed source is used; sources do not merge.
+ * Within the managed tier, precedence is: server-managed > MDM/OS-level policies > file-based (`managed-settings.d/*.json` \+ `managed-settings.json`) > HKCU registry (Windows only). Only one managed source is used; sources do not merge across tiers. Within the file-based tier, drop-in files and the base file are merged together.
2. **Command line arguments**
* Temporary overrides for a specific session
3. **Local project settings** (`.claude/settings.local.json`)
--- a/setup.md
+++ b/setup.md
@@ -129,7 +129,7 @@
}
}
-**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** Both WSL 1 and WSL 2 are supported. WSL 2 supports [sandboxing](</docs/en/sandboxing>) for enhanced security. WSL 1 does not support sandboxing.
###
--- a/skills.md
+++ b/skills.md
@@ -16,7 +16,7 @@
---|---
`/batch <instruction>`| Orchestrate large-scale changes across a codebase in parallel. Researches the codebase, decomposes the work into 5 to 30 independent units, and presents a plan. Once approved, spawns one background agent per unit in an isolated [git worktree](</docs/en/common-workflows#run-parallel-claude-code-sessions-with-git-worktrees>). Each agent implements its unit, runs tests, and opens a pull request. Requires a git repository. Example: `/batch migrate src/ from Solid to React`
`/claude-api`| Load Claude API reference material for your project’s language (Python, TypeScript, Java, Go, Ruby, C#, PHP, or cURL) and Agent SDK reference for Python and TypeScript. Covers tool use, streaming, batches, structured outputs, and common pitfalls. Also activates automatically when your code imports `anthropic`, `@anthropic-ai/sdk`, or `claude_agent_sdk`
-`/debug [description]`| Troubleshoot your current Claude Code session by reading the session debug log. Optionally describe the issue to focus the analysis
+`/debug [description]`| 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
`/loop [interval] <prompt>`| Run a prompt repeatedly on an interval while the session stays open. Useful for polling a deployment, babysitting a PR, or periodically re-running another skill. Example: `/loop 5m check if the deploy finished`. See [Run prompts on a schedule](</docs/en/scheduled-tasks>)
`/simplify [focus]`| Review your recently changed files for code reuse, quality, and efficiency issues, then fix them. Spawns three review agents in parallel, aggregates their findings, and applies fixes. Pass text to focus on specific concerns: `/simplify focus on memory efficiency`
@@ -245,6 +245,7 @@
`context`| No| Set to `fork` to run in a forked subagent context.
`agent`| No| Which subagent type to use when `context: fork` is set.
`hooks`| No| Hooks scoped to this skill’s lifecycle. See [Hooks in skills and agents](</docs/en/hooks#hooks-in-skills-and-agents>) for configuration format.
+`shell`| No| Shell to use for `!`command`` blocks in this skill. Accepts `bash` (default) or `powershell`. Setting `powershell` runs inline shell commands via PowerShell on Windows. Requires `CLAUDE_CODE_USE_POWERSHELL_TOOL=1`.
####
--- a/sub-agents.md
+++ b/sub-agents.md
@@ -208,7 +208,7 @@
}
}'
-The `--agents` flag accepts JSON with the same frontmatter fields as file-based subagents: `description`, `prompt`, `tools`, `disallowedTools`, `model`, `permissionMode`, `mcpServers`, `hooks`, `maxTurns`, `skills`, `memory`, `effort`, `background`, and `isolation`. Use `prompt` for the system prompt, equivalent to the markdown body in file-based subagents. **Plugin subagents** come from [plugins](</docs/en/plugins>) you’ve installed. They appear in `/agents` alongside your custom subagents. See the [plugin components reference](</docs/en/plugins-reference#agents>) for details on creating plugin subagents.
+The `--agents` flag accepts JSON with the same frontmatter fields as file-based subagents: `description`, `prompt`, `tools`, `disallowedTools`, `model`, `permissionMode`, `mcpServers`, `hooks`, `maxTurns`, `skills`, `initialPrompt`, `memory`, `effort`, `background`, and `isolation`. Use `prompt` for the system prompt, equivalent to the markdown body in file-based subagents. **Plugin subagents** come from [plugins](</docs/en/plugins>) you’ve installed. They appear in `/agents` alongside your custom subagents. See the [plugin components reference](</docs/en/plugins-reference#agents>) for details on creating plugin subagents.
For security reasons, plugin subagents do not support the `hooks`, `mcpServers`, or `permissionMode` frontmatter fields. These fields are ignored when loading agents from a plugin. If you need them, copy the agent file into `.claude/agents/` or `~/.claude/agents/`. You can also add rules to [`permissions.allow`](</docs/en/settings#permission-settings>) in `settings.json` or `settings.local.json`, but these rules apply to the entire session, not just the plugin subagent.
@@ -264,6 +264,7 @@
`background`| No| Set to `true` to always run this subagent as a background task. Default: `false`
`effort`| No| Effort level when this subagent is active. Overrides the session effort level. Default: inherits from session. Options: `low`, `medium`, `high`, `max` (Opus 4.6 only)
`isolation`| No| Set to `worktree` to run the subagent in a temporary [git worktree](</docs/en/common-workflows#run-parallel-claude-code-sessions-with-git-worktrees>), giving it an isolated copy of the repository. The worktree is automatically cleaned up if the subagent makes no changes
+`initialPrompt`| No| Auto-submitted as the first user turn when this agent runs as the main session agent (via `--agent` or the `agent` setting). [Commands](</docs/en/commands>) and [skills](</docs/en/skills>) are processed. Prepended to any user-provided prompt
###
@@ -277,6 +278,13 @@
* **Full model ID** : Use a full model ID such as `claude-opus-4-6` or `claude-sonnet-4-6`. Accepts the same values as the `--model` flag
* **inherit** : Use the same model as the main conversation
* **Omitted** : If not specified, defaults to `inherit` (uses the same model as the main conversation)
+
+When Claude invokes a subagent, it can also pass a `model` parameter for that specific invocation. Claude Code resolves the subagent’s model in this order:
+
+ 1. The [`CLAUDE_CODE_SUBAGENT_MODEL`](</docs/en/model-config#environment-variables>) environment variable, if set
+ 2. The per-invocation `model` parameter
+ 3. The subagent definition’s `model` frontmatter
+ 4. The main conversation’s model
###
--- a/tools-reference.md
+++ b/tools-reference.md
@@ -18,13 +18,14 @@
`ListMcpResourcesTool`| Lists resources exposed by connected [MCP servers](</docs/en/mcp>)| No
`LSP`| Code intelligence via language servers. Reports type errors and warnings automatically after file edits. Also supports navigation operations: jump to definitions, find references, get type info, list symbols, find implementations, trace call hierarchies. Requires a [code intelligence plugin](</docs/en/discover-plugins#code-intelligence>) and its language server binary| No
`NotebookEdit`| Modifies Jupyter notebook cells| Yes
+`PowerShell`| Executes PowerShell commands on Windows. Opt-in preview. See PowerShell tool| Yes
`Read`| Reads the contents of files| No
`ReadMcpResourceTool`| Reads a specific MCP resource by URI| No
`Skill`| Executes a [skill](</docs/en/skills#control-who-invokes-a-skill>) within the main conversation| Yes
`TaskCreate`| Creates a new task in the task list| No
`TaskGet`| Retrieves full details for a specific task| No
`TaskList`| Lists all tasks with their current status| No
-`TaskOutput`| Retrieves output from a background task| No
+`TaskOutput`| (Deprecated) Retrieves output from a background task. Prefer `Read` on the task’s output file path| No
`TaskStop`| Kills a running background task by ID| No
`TaskUpdate`| Updates task status, dependencies, details, or deletes tasks| No
`TodoWrite`| Manages the session task checklist. Available in non-interactive mode and the [Agent SDK](</docs/en/headless>); interactive sessions use TaskCreate, TaskGet, TaskList, and TaskUpdate instead| No
@@ -52,6 +53,62 @@
+PowerShell tool
+
+On Windows, Claude Code can run PowerShell commands natively instead of routing through Git Bash. This is an opt-in preview.
+
+###
+
+
+
+Enable the PowerShell tool
+
+Set `CLAUDE_CODE_USE_POWERSHELL_TOOL=1` in your environment or in `settings.json`:
+
+Report incorrect code
+
+Copy
+
+Ask AI
+
+ {
+ "env": {
+ "CLAUDE_CODE_USE_POWERSHELL_TOOL": "1"
+ }
+ }
+
+Claude Code auto-detects `pwsh.exe` (PowerShell 7+) with a fallback to `powershell.exe` (PowerShell 5.1). The Bash tool remains registered alongside the PowerShell tool, so you may need to ask Claude to use PowerShell.
+
+###
+
+
+
+Shell selection in settings, hooks, and skills
+
+Three additional settings control where PowerShell is used:
+
+ * `"defaultShell": "powershell"` in [`settings.json`](</docs/en/settings#available-settings>): routes interactive `!` commands through PowerShell. Requires the PowerShell tool to be enabled.
+ * `"shell": "powershell"` on individual [command hooks](</docs/en/hooks#command-hook-fields>): runs that hook in PowerShell. Hooks spawn PowerShell directly, so this works regardless of `CLAUDE_CODE_USE_POWERSHELL_TOOL`.
+ * `shell: powershell` in [skill frontmatter](</docs/en/skills#frontmatter-reference>): runs `!`command`` blocks in PowerShell. Requires the PowerShell tool to be enabled.
+
+###
+
+
+
+Preview limitations
+
+The PowerShell tool has the following known limitations during the preview:
+
+ * Auto mode does not work with the PowerShell tool yet
+ * PowerShell profiles are not loaded
+ * Sandboxing is not supported
+ * Only supported on native Windows, not WSL
+ * Git Bash is still required to start Claude Code
+
+##
+
+
+
See also
* [Permissions](</docs/en/permissions>): permission system, rule syntax, and tool-specific patterns
--- a/vs-code.md
+++ b/vs-code.md
@@ -259,6 +259,39 @@
Insert @-Mention Reference| `Option+K` (Mac) / `Alt+K` (Windows/Linux)| Insert a reference to the current file and selection (requires editor to be focused)
Show Logs| -| View extension debug logs
Logout| -| Sign out of your Anthropic account
+
+###
+
+
+
+Launch a VS Code tab from other tools
+
+The extension registers a URI handler at `vscode://anthropic.claude-code/open`. Use it to open a new Claude Code tab from your own tooling: a shell alias, a browser bookmarklet, or any script that can open a URL. If VS Code isn’t already running, opening the URL launches it first. If VS Code is already running, the URL opens in whichever window is currently focused. Invoke the handler with your operating system’s URL opener. On macOS:
+
+Report incorrect code
+
+Copy
+
+Ask AI
+
+ open "vscode://anthropic.claude-code/open"
+
+Use `xdg-open` on Linux or `start` on Windows. The handler accepts two optional query parameters:
+
+Parameter| Description
+---|---
+`prompt`| Text to pre-fill in the prompt box. Must be URL-encoded. The prompt is pre-filled but not submitted automatically.
+`session`| A session ID to resume instead of starting a new conversation. The session must belong to the workspace currently open in VS Code. If the session isn’t found, a fresh conversation starts instead. If the session is already open in a tab, that tab is focused. To capture a session ID programmatically, see [Continue conversations](</docs/en/headless#continue-conversations>).
+
+For example, to open a tab pre-filled with “review my changes”:
+
+Report incorrect code
+
+Copy
+
+Ask AI
+
+ vscode://anthropic.claude-code/open?prompt=review%20my%20changes
##