Changes on
26 changes detected
--- a/2026-w16.md
+++ b/2026-w16.md
@@ -43,23 +43,17 @@
[Commands reference](</docs/en/commands>)
-/ultrareviewv2.1.111
+Mobile push notificationsmobile
-Comprehensive code review in the cloud. Ultrareview fans your branch out across parallel reviewers on Claude Code on the web, runs an adversarial critique pass over each finding, and returns a verified findings report while your terminal stays free. Call it with no arguments to review your current branch, or pass a PR number to fetch and review that PR. The launch dialog now shows a diffstat so you know what’s going up before you confirm.
+With [Remote Control](</docs/en/remote-control>) connected, Claude can send a push notification to your phone when a long task finishes or it needs a decision to keep going. Turn it on with “Push when Claude decides” in `/config`, or ask for one in your prompt. Useful when you kick off a long agent run and want to step away from the terminal.
-Review the branch you’re on:
+Ask Claude to ping you when it’s done:
Claude Code
- > /ultrareview
+ > notify me when the tests pass
-Or point it at a PR:
-
-Claude Code
-
- > /ultrareview 1234
-
-[Ultrareview guide](</docs/en/ultrareview>)
+[Remote Control: mobile push notifications](</docs/en/remote-control#mobile-push-notifications>)
Native binariesv2.1.113
@@ -74,13 +68,13 @@
Other wins
+New [`/ultrareview`](</docs/en/ultrareview>): comprehensive code review in the cloud using parallel multi-agent analysis and an adversarial critique pass. Run it bare to review your current branch, or `/ultrareview <PR#>` for a specific PR
+
[Auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) is now available for Max subscribers on Opus 4.7, and the `—enable-auto-mode` flag is no longer required
[Session recap](</docs/en/interactive-mode#session-recap>) shows a one-line summary of what happened while you were away; run `/recap` on demand or turn it off from `/config`
New `/tui` command and `tui` setting switch between classic and flicker-free rendering mid-conversation; focus view moved from `Ctrl+O` to its own `/focus` command
-
-Push notification tool: with [Remote Control](</docs/en/remote-control>) connected and “Push when Claude decides” enabled, Claude can ping your phone when it needs you
Plugins can ship background watchers via a top-level `monitors` manifest key that auto-arms at session start or on skill invoke
--- a/2026-w18.md
+++ b/2026-w18.md
@@ -0,0 +1,87 @@
+> ## Documentation Index
+>
+> Fetch the complete documentation index at: <https://code.claude.com/docs/llms.txt>
+>
+> Use this file to discover all available pages before exploring further.
+
+Releases [v2.1.120 → v2.1.126](</docs/en/changelog#2-1-120>)4 features · April 27 – May 1
+
+Sign in without a browser callbackv2.1.126
+
+`claude auth login` now accepts the OAuth code pasted directly into the terminal when the browser callback can’t reach localhost. That covers WSL2, SSH sessions, and containers, where the redirect to a local port doesn’t work. The same release also fixes login timeouts on slow or proxied connections and in IPv6-only devcontainers.
+
+Sign in, then paste the code from the browser:
+
+ claude auth login
+
+[CLI reference](</docs/en/cli-reference#cli-commands>)
+
+claude project purgev2.1.126
+
+Delete all Claude Code state for a project: transcripts, tasks, file history, and the project’s config entry. Supports `--dry-run` to preview, `-y`/`--yes` to skip confirmation, `-i`/`--interactive` to choose, and `--all` to clear every project.
+
+Preview what would be removed:
+
+ claude project purge --dry-run
+
+Then run it for real:
+
+ claude project purge
+
+[CLI reference](</docs/en/cli-reference>)
+
+Resume by PR URLv2.1.122
+
+When you create a pull request with `gh pr create`, Claude Code links it to the session that produced it. Now you can get back to that session from the PR URL alone, without remembering its name.
+
+Open the session picker:
+
+Claude Code
+
+ > /resume
+
+Paste the PR URL into the picker. The first character of the paste drops you into search mode, and the list filters to the session that created that PR. Press Enter to resume it. GitHub, GitHub Enterprise, GitLab, and Bitbucket pull and merge request URLs all work.
+
+Claude Code
+
+ https://github.com/your-org/your-repo/pull/1234
+
+To skip the picker, pass the PR number on the command line instead:
+
+ claude --from-pr 1234
+
+[Sessions: use the session picker](</docs/en/sessions#use-the-session-picker>)
+
+Windows without Git BashWindows
+
+Git for Windows is no longer required. When Bash is absent, Claude Code uses PowerShell as the shell tool, and when the PowerShell tool is enabled it is treated as the primary shell. PowerShell 7 installed via the Microsoft Store, MSI without PATH, or a `.NET` global tool is now detected automatically.
+
+[Setup guide](</docs/en/setup>)
+
+Other wins
+
+MCP servers can opt out of tool-search deferral with `alwaysLoad: true` in their config so all of that server’s tools are always available
+
+New `claude plugin prune` removes orphaned auto-installed plugin dependencies, and `plugin uninstall —prune` cascades
+
+`/skills` now has a type-to-filter search box so you can find a skill in a long list without scrolling
+
+`PostToolUse` hooks can replace tool output for any tool via `hookSpecificOutput.updatedToolOutput`, not only MCP tools
+
+New [`claude ultrareview`](</docs/en/ultrareview>) subcommand runs `/ultrareview` non-interactively from CI or scripts: prints findings to stdout (`—json` for raw output) and exits 0 on completion or 1 on failure
+
+`—dangerously-skip-permissions` now bypasses prompts for writes to `.claude/`, `.git/`, `.vscode/`, shell config files, and other previously protected paths, while catastrophic removal commands still prompt as a safety net
+
+The `/model` picker can list models from your gateway’s `/v1/models` endpoint when `ANTHROPIC_BASE_URL` points at an Anthropic-compatible gateway; opt in with `CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY=1` since v2.1.129
+
+MCP servers that hit a transient error during startup now auto-retry up to 3 times instead of staying disconnected
+
+`ANTHROPIC_BEDROCK_SERVICE_TIER` selects a Bedrock service tier: `default`, `flex`, or `priority`
+
+`/terminal-setup` enables iTerm2’s clipboard access setting so `/copy` works, including from tmux
+
+Vertex AI now supports X.509 certificate-based Workload Identity Federation (mTLS ADC)
+
+Significant memory leak fixes: image-heavy sessions, `/usage` on large transcript histories, and long-running tools without progress events
+
+[Full changelog for v2.1.120–v2.1.126 →](</docs/en/changelog#2-1-120>)
--- a/2026-w19.md
+++ b/2026-w19.md
@@ -0,0 +1,53 @@
+> ## Documentation Index
+>
+> Fetch the complete documentation index at: <https://code.claude.com/docs/llms.txt>
+>
+> Use this file to discover all available pages before exploring further.
+
+Releases [v2.1.128 → v2.1.136](</en/changelog#2-1-128>)2 features · May 4–8
+
+Plugins from .zip archives and URLs
+
+`--plugin-dir` now accepts a `.zip` plugin archive in addition to a directory, and the new `--plugin-url` flag fetches a plugin archive from a URL for the current session. Useful for trying a plugin before adding it to a marketplace, or for shipping internal plugins from an artifact store.
+
+Load a plugin straight from a URL:
+
+terminal
+
+ claude --plugin-url https://example.com/my-plugin.zip
+
+[Plugins guide](</en/plugins>)
+
+History search across all your projectsv2.1.129
+
+`Ctrl+R` reverse-search now defaults to all prompts across every project, restoring the behavior from before v2.1.124. Press `Ctrl+S` while searching to narrow back to the current project or session. Handy when you remember a command you ran in another repo last week and don’t want to go digging for it.
+
+[Interactive mode: command history](</en/interactive-mode#command-history>)
+
+Other wins
+
+New `worktree.baseRef` setting (`fresh` | `head`) controls whether `—worktree`, the `EnterWorktree` tool, and agent-isolation worktrees branch from the remote default branch or local `HEAD`; the default `fresh` keeps unpushed commits out of new worktrees
+
+New `settings.autoMode.hard_deny` rules block matching actions unconditionally in auto mode, regardless of allow exceptions, for actions that should never run automatically even when broader allow rules apply
+
+Hooks now receive the active effort level via the `effort.level` JSON input field and the `$CLAUDE_EFFORT` environment variable, and Bash tool commands can read `$CLAUDE_EFFORT`
+
+`CLAUDE_CODE_DISABLE_ALTERNATE_SCREEN=1` opts out of the fullscreen alternate-screen renderer and keeps the conversation in the terminal’s native scrollback
+
+`CLAUDE_CODE_PACKAGE_MANAGER_AUTO_UPDATE` lets Homebrew or WinGet installations run the upgrade in the background and prompt to restart
+
+`CLAUDE_CODE_SESSION_ID` is now in the Bash tool subprocess environment, matching the `session_id` passed to hooks
+
+`/mcp` now shows the tool count for connected servers and flags servers that connected with 0 tools
+
+`—channels` now works with console (API key) authentication
+
+Subprocesses such as Bash, hooks, MCP, and LSP no longer inherit `OTEL_*` environment variables, so OTEL-instrumented apps run via the Bash tool no longer pick up the CLI’s own OTLP endpoint
+
+Sub-agent progress summaries now hit the prompt cache, cutting `cache_creation` token cost by roughly 3x
+
+Several OAuth and credential reliability fixes: parallel sessions no longer dead-end at 401 after a refresh-token race, MCP OAuth refresh tokens are no longer lost when multiple servers refresh concurrently, and a rare login loop from a concurrent credential write is fixed
+
+New `parentSettingsBehavior` admin key lets admins opt SDK `managedSettings` into the policy merge
+
+[Full changelog for v2.1.128–v2.1.136 →](</docs/en/changelog#2-1-128>)
--- a/agent-teams.md
+++ b/agent-teams.md
@@ -479,7 +479,7 @@
* **No session resumption with in-process teammates** : `/resume` and `/rewind` do not restore in-process teammates. After resuming a session, the lead may attempt to message teammates that no longer exist. If this happens, tell the lead to spawn new teammates.
* **Task status can lag** : teammates sometimes fail to mark tasks as completed, which blocks dependent tasks. If a task appears stuck, check whether the work is actually done and update the task status manually or tell the lead to nudge the teammate.
* **Shutdown can be slow** : teammates finish their current request or tool call before shutting down, which can take time.
- * **One team per session** : a lead can only manage one team at a time. Clean up the current team before starting a new one.
+ * **One team at a time** : a lead can only manage one team. Clean up the current team before creating a new one.
* **No nested teams** : teammates cannot spawn their own teams or teammates. Only the lead can manage the team.
* **Lead is fixed** : the session that creates the team is the lead for its lifetime. You can’t promote a teammate to lead or transfer leadership.
* **Permissions set at spawn** : all teammates start with the lead’s permission mode. You can change individual teammate modes after spawning, but you can’t set per-teammate modes at spawn time.
--- a/auto-mode-config.md
+++ b/auto-mode-config.md
@@ -31,7 +31,7 @@
Organization-wide| [Managed settings](</docs/en/server-managed-settings>)| Trusted infrastructure distributed to all developers
`--settings` flag or Agent SDK| Inline JSON| Per-invocation overrides for automation
-The classifier does not read `autoMode` from shared project settings in `.claude/settings.json`, so a checked-in repo cannot inject its own allow rules. Entries from each scope are combined. A developer can extend `environment`, `allow`, and `soft_deny` with personal entries but cannot remove entries that managed settings provide. Because allow rules act as exceptions to block rules inside the classifier, a developer-added `allow` entry can override an organization `soft_deny` entry: the combination is additive, not a hard policy boundary.
+The classifier does not read `autoMode` from shared project settings in `.claude/settings.json`, so a checked-in repo cannot inject its own allow rules. Entries from each scope are combined. A developer can extend `environment`, `allow`, `soft_deny`, and `hard_deny` with personal entries but cannot remove entries that managed settings provide. Because allow rules act as exceptions to soft block rules inside the classifier, a developer-added `allow` entry can override an organization `soft_deny` entry: the combination is additive, not a hard policy boundary.
The classifier is a second gate that runs after the [permissions system](</docs/en/permissions>). For actions that must never run regardless of user intent or classifier configuration, use `permissions.deny` in managed settings, which blocks the action before the classifier is consulted and cannot be overridden.
@@ -89,13 +89,14 @@
Override the block and allow rules
-Two additional fields let you replace the classifier’s built-in rule lists: `autoMode.soft_deny` controls what gets blocked, and `autoMode.allow` controls which exceptions apply. Each is an array of prose descriptions, read as natural-language rules. There is no `autoMode.deny` field; to hard-block an action regardless of intent, use [`permissions.deny`](</docs/en/permissions>), which runs before the classifier. Inside the classifier, precedence works in three tiers:
+Three additional fields let you replace the classifier’s built-in rule lists: `autoMode.hard_deny` for unconditional security boundaries, `autoMode.soft_deny` for destructive actions that user intent can clear, and `autoMode.allow` for exceptions. Each is an array of prose descriptions, read as natural-language rules. For tool-pattern-based hard blocks that run before the classifier, use [`permissions.deny`](</docs/en/permissions>). Inside the classifier, precedence works in four tiers:
- * `soft_deny` rules block first
- * `allow` rules then override matching blocks as exceptions
- * Explicit user intent overrides both: if the user’s message directly and specifically describes the exact action Claude is about to take, the classifier allows it even when a `soft_deny` rule matches
+ * `hard_deny` rules block unconditionally. User intent and `allow` exceptions do not apply.
+ * `soft_deny` rules block next. User intent and `allow` exceptions can override these.
+ * `allow` rules then override matching `soft_deny` rules as exceptions.
+ * Explicit user intent overrides the remaining soft blocks: if the user’s message directly and specifically describes the exact action Claude is about to take, the classifier allows it even when a `soft_deny` rule matches.
-General requests don’t count as explicit intent. Asking Claude to “clean up the repo” does not authorize force-pushing, but asking Claude to “force-push this branch” does. To loosen, add to `allow` when the classifier repeatedly flags a routine pattern the default exceptions don’t cover. To tighten, add to `soft_deny` for risks specific to your environment that the defaults miss. To keep the built-in rules while adding your own, include the literal string `"$defaults"` in the array. The default rules are spliced in at that position, so your custom rules can go before or after them, and you continue to inherit updates as the built-in list changes across releases.
+General requests don’t count as explicit intent. Asking Claude to “clean up the repo” does not authorize force-pushing, but asking Claude to “force-push this branch” does. To loosen, add to `allow` when the classifier repeatedly flags a routine pattern the default exceptions don’t cover. To tighten, add to `soft_deny` for destructive risks specific to your environment that the defaults miss, or to `hard_deny` for security boundaries that must never be crossed. To keep the built-in rules while adding your own, include the literal string `"$defaults"` in the array. The default rules are spliced in at that position, so your custom rules can go before or after them, and you continue to inherit updates as the built-in list changes across releases.
{
"autoMode": {
@@ -112,13 +113,17 @@
"$defaults",
"Never run database migrations outside the migrations CLI, even against dev databases",
"Never modify files under infra/terraform/prod/: production infrastructure changes go through the review workflow"
+ ],
+ "hard_deny": [
+ "$defaults",
+ "Never send repository contents to third-party code-review APIs"
]
}
}
-Setting any of `environment`, `allow`, or `soft_deny` without `"$defaults"` replaces the entire default list for that section. If you set `soft_deny` with a single entry and omit `"$defaults"`, every built-in block rule is discarded: force push, data exfiltration, `curl | bash`, production deploys, and all other default block rules become allowed. Only omit `"$defaults"` when you intend to take full ownership of the list. In that case, run `claude auto-mode defaults` to print the built-in rules, copy them into your settings file, then review each rule against your own pipeline and risk tolerance.
+Setting any of `environment`, `allow`, `soft_deny`, or `hard_deny` without `"$defaults"` replaces the entire default list for that section. A `soft_deny` array without `"$defaults"` discards every built-in soft block rule, including force push, `curl | bash`, and production deploys. A `hard_deny` array without `"$defaults"` discards the built-in data exfiltration and safety-check bypass rules.
-Each section is evaluated independently, so setting `environment` alone leaves the default `allow` and `soft_deny` lists intact.
+Each section is evaluated independently, so setting `environment` alone leaves the default `allow`, `soft_deny`, and `hard_deny` lists intact. Only omit `"$defaults"` when you intend to take full ownership of the list. To do that safely, run `claude auto-mode defaults` to print the built-in rules, copy them into your settings file, then review each rule against your own pipeline and risk tolerance.
##
@@ -126,7 +131,7 @@
Inspect the defaults and your effective config
-Three CLI subcommands help you inspect and validate your configuration. Print the built-in `environment`, `allow`, and `soft_deny` rules as JSON:
+Three CLI subcommands help you inspect and validate your configuration. Print the built-in `environment`, `allow`, `soft_deny`, and `hard_deny` rules as JSON:
claude auto-mode defaults
@@ -134,7 +139,7 @@
claude auto-mode config
-Get AI feedback on your custom `allow` and `soft_deny` rules:
+Get AI feedback on your custom `allow`, `soft_deny`, and `hard_deny` rules:
claude auto-mode critique
--- a/changelog.md
+++ b/changelog.md
@@ -5,6 +5,81 @@
> Use this file to discover all available pages before exploring further.
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.138
+
+May 9, 2026
+
+ * Internal fixes
+
+
+
+2.1.137
+
+May 9, 2026
+
+ * [VSCode] Fixed extension failing to activate on Windows
+
+
+
+2.1.136
+
+May 8, 2026
+
+ * Added `CLAUDE_CODE_ENABLE_FEEDBACK_SURVEY_FOR_OTEL` to re-enable the session quality survey for enterprises capturing responses through OpenTelemetry
+ * Added `settings.autoMode.hard_deny` for auto mode classifier rules that block unconditionally regardless of user intent or allow exceptions
+ * Fixed MCP servers configured in `.mcp.json`, plugins, and claude.ai connectors silently disappearing after `/clear` in the VS Code extension, JetBrains plugin, and Agent SDK
+ * Fixed a rare login loop where a concurrent credential write could overwrite a freshly-rotated OAuth token and force re-login
+ * Fixed MCP OAuth refresh tokens being lost when multiple servers refresh concurrently — users with several remote MCP servers should no longer need daily re-authentication
+ * Fixed an API error (400) when extended thinking emitted a redacted thinking block after a tool call
+ * Fixed `--resume` / `--continue` not finding sessions when the project path contains underscores
+ * Fixed plan mode not blocking file writes when a matching `Edit(...)` allow rule exists
+ * WSL2: image paste from Windows clipboard now works via a PowerShell fallback when xclip/wl-paste cannot read image data
+ * Fixed plugin `Stop`/`UserPromptSubmit` hooks failing when cache cleanup deletes a version still in use by a running session
+ * Improved visual consistency across slash command dialogs: standardized footer hints, dialog spacing, and arrow-key styling, and the dialog frame now appears immediately during loading instead of popping in after
+ * Fixed colors appearing at wrong positions in bash command output and markdown code blocks
+ * Fixed ReasonML diffs rendering corrupted “undefined” text artifacts at word-diff boundaries
+ * Fixed worktree exit dialog warning about uncommitted files in the wrong directory after worktree removal
+ * Fixed `@` file picker not matching files created mid-session in small non-git directories
+ * Fixed `@`-mention file picker not finding files in directories with more than 100 entries
+ * Fixed failed tool calls not being click-to-expand in fullscreen mode when their output was truncated
+ * Fixed Backspace and Ctrl+Backspace getting swapped after using Ctrl+G to open an external editor on terminals with persistent extended-key modes
+ * Fixed `/usage` weekly reset showing time of day instead of the calendar date
+ * Fixed welcome banner ellipsis causing column overflow on CJK terminals
+ * Fixed `/insights` crash when session history contains tool calls with malformed input fields
+ * Fixed a renderer crash when a tool’s collapsibility classification changes mid-session
+ * Fixed a `skills` entry in `plugin.json` hiding the plugin’s default `skills/` directory, and listing a file path now shows an error instead of failing silently
+ * Fixed IDE shell-integration lock files not respecting `CLAUDE_CONFIG_DIR`
+ * Fixed trailing whitespace in copied terminal output during streaming
+ * Fixed plugin uninstall and enable/disable not matching slugs case-insensitively
+ * Fixed tool error truncation marker showing a negative count for surrogate-pair strings
+ * Fixed env vars from `CLAUDE_ENV_FILE` SessionStart hooks going stale after `/resume` or `/clear`
+ * Fixed `/branch` saving a multi-line session title when given a pasted multi-line name
+ * Fixed a stray leading space on the second line of wrapped text at the column boundary
+ * Fixed Esc not dismissing dialogs in `/install-github-app`, `/desktop`, `/resume`, and `/web-setup`
+ * Fixed `/doctor` MCP schema errors not naming the missing field or showing the source file path
+ * Fixed Bash permission prompts showing an internal parser diagnostic instead of a user-readable explanation
+ * Fixed plugin slash commands with spaces (e.g. `/myplugin review`) not resolving to their namespaced form
+ * Fixed `AskUserQuestion` discarding multi-select answers when supplied as an array
+ * Fixed `/clear <name>` not labeling the cleared session for `/resume`
+ * Fixed `CronList` output missing qualifiers and the scheduled prompt
+ * Fixed “Jump to bottom” overlay leaving color artifacts on CJK characters in fullscreen mode
+ * Fixed wide markdown tables leaving a stale bordered render in terminal scrollback while streaming
+ * Fixed pasted text being silently dropped when a long prompt with a pasted-text placeholder was auto-truncated
+ * Fixed `/release-notes` getting stuck on an old version after a failed changelog refresh
+ * Fixed `/mcp` server list not scrolling when there are more servers than fit in the terminal
+ * Fixed mid-input slash command autocomplete not working after an initial slash command
+ * Fixed scrolling to bottom re-engaging auto-follow with `autoScrollEnabled: false`
+ * Fixed prompt suggestions being auto-submitted by Enter on an empty input instead of requiring Tab or arrow to accept
+ * Fixed keyboard shortcut hints not reflecting rebound keys from `keybindings.json`
+ * Fixed `/settings` language change being reverted on Escape after confirming
+ * Fixed `/terminal-setup` only appearing in autocomplete on exact name match instead of partial prefixes
+ * Fixed “Chat about this” on an `AskUserQuestion` dialog erasing the question text
+ * Fixed MCP tool results being invisible when the server returns content blocks
+ * Improved error message when `--worktree` collides with an existing or stale worktree
+ * Changed plugin marketplace removal key to `d` (matching delete elsewhere) instead of `r` which collided with retry
--- a/commands.md
+++ b/commands.md
@@ -4,7 +4,25 @@
>
> Use this file to discover all available pages before exploring further.
-Commands control Claude Code from inside a session. They provide a quick way to switch models, manage permissions, clear context, run a workflow, and more. Type `/` to see every command available to you, or type `/` followed by letters to filter. A command is only recognized at the start of your message. Text that follows the command name is passed to it as arguments. The table below lists all the commands included in Claude Code. Entries marked **[Skill](</docs/en/skills#bundled-skills>)** are bundled skills. They use the same mechanism as skills you write yourself: a prompt handed to Claude, which Claude can also invoke automatically when relevant. Everything else is a built-in command whose behavior is coded into the CLI. To add your own commands, see [skills](</docs/en/skills>). Not every command appears for every user. Availability depends on your platform, plan, and environment. For example, `/desktop` only shows on macOS and Windows, and `/upgrade` only shows on Pro and Max plans. In the table below, `<arg>` indicates a required argument and `[arg]` indicates an optional one.
+Commands control Claude Code from inside a session. They provide a quick way to switch models, manage permissions, clear context, run a workflow, and more. Type `/` to see every command available to you, or type `/` followed by letters to filter. A command is only recognized at the start of your message. Text that follows the command name is passed to it as arguments.
+
+##
+
+
+
+Commands across a typical workflow
+
+Most commands are useful at a specific point in a session, from setting up a project to shipping a change. **First session in a repo.** Run `/init` to generate a starter `CLAUDE.md`, then `/memory` to refine it. Use `/mcp` and `/agents` to set up any servers or subagents the project needs, and `/permissions` to set the approval rules you want. **During a task.** `/plan` switches into plan mode before a large change. `/model` and `/effort` adjust how much reasoning you’re spending. When the conversation gets long, `/context` shows where the window is going and `/compact` summarizes it down; use `/btw` for a quick aside that shouldn’t bloat history. **Before you ship.** `/diff` shows what changed, `/simplify` reviews recent files and applies quality and efficiency fixes, and `/review` or `/security-review` give a deeper read-only pass. **Between sessions.** `/clear` starts fresh on a new task while keeping project memory. `/resume` and `/branch` let you return to or fork an earlier conversation. `/teleport` pulls a web session into this terminal, and `/remote-control` lets you continue this local session from another device. **When something is wrong.** `/rewind` rolls code and conversation back to a checkpoint. `/doctor` and `/debug` diagnose install and runtime issues, and `/feedback` reports a bug with session context attached.
+
+##
+
+
+
+All commands
+
+The table below lists all the commands included in Claude Code. Entries marked **[Skill](</docs/en/skills#bundled-skills>)** are bundled skills. They use the same mechanism as skills you write yourself: a prompt handed to Claude, which Claude can also invoke automatically when relevant. Everything else is a built-in command whose behavior is coded into the CLI. To add your own commands, see [skills](</docs/en/skills>). In the table below, `<arg>` indicates a required argument and `[arg]` indicates an optional one.
+
+Not every command appears for every user. Availability depends on your platform, plan, and environment. For example, `/desktop` only shows on macOS and Windows, and `/upgrade` only shows on Pro and Max plans.
Command| Purpose
---|---
@@ -16,11 +34,11 @@
`/btw <question>`| Ask a quick [side question](</docs/en/interactive-mode#side-questions-with-%2Fbtw>) without adding to the conversation
`/chrome`| Configure [Claude in Chrome](</docs/en/chrome>) settings
`/claude-api [migrate|managed-agents-onboard]`| **[Skill](</docs/en/skills#bundled-skills>).** Load Claude API reference material for your project’s language (Python, TypeScript, Java, Go, Ruby, C#, PHP, or cURL) and Managed Agents reference. Covers tool use, streaming, batches, structured outputs, and common pitfalls. Also activates automatically when your code imports `anthropic` or `@anthropic-ai/sdk`. Run `/claude-api migrate` to upgrade existing Claude API code to a newer model: Claude asks which files to scan and which model to target, then updates model IDs, thinking configuration, and other parameters that changed between versions. Run `/claude-api managed-agents-onboard` for an interactive walkthrough that creates a new Managed Agent from scratch
-`/clear`| Start a new conversation with empty context. The previous conversation stays available in `/resume`. To free up context while continuing the same conversation, use `/compact` instead. Aliases: `/reset`, `/new`
+`/clear [name]`| Start a new conversation with empty context. The previous conversation stays available in `/resume`. Pass a name to label the previous conversation in the `/resume` picker. To free up context while continuing the same conversation, use `/compact` instead. Aliases: `/reset`, `/new`
`/color [color|default]`| Set the prompt bar color for the current session. Available colors: `red`, `blue`, `green`, `yellow`, `purple`, `orange`, `pink`, `cyan`. Use `default` to reset, or run with no argument to pick a random color. When [Remote Control](</docs/en/remote-control>) is connected, the color syncs to claude.ai/code
`/compact [instructions]`| Free up context by summarizing the conversation so far. Optionally pass focus instructions for the summary. See [how compaction handles rules, skills, and memory files](</docs/en/context-window#what-survives-compaction>)
`/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
+`/context [all]`| Visualize current context usage as a colored grid. Shows optimization suggestions for context-heavy tools, memory bloat, and capacity warnings. In [fullscreen mode](</docs/en/fullscreen>) the per-item breakdown is collapsed to keep the grid visible. Pass `all` to expand it
`/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`| Alias for `/usage`
`/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
@@ -58,6 +76,7 @@
`/powerup`| Discover Claude Code features through quick interactive lessons with animated demos
`/pr-comments [PR]`| Removed in v2.1.91. Ask Claude directly to view pull request comments instead. On earlier versions, fetches and displays 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
+`/radio`| Open Claude FM lo-fi radio in your browser. Prints the stream URL when no browser is available. Not available on Bedrock, Vertex, or Foundry
`/recap`| Generate a one-line summary of the current session on demand. See [Session recap](</docs/en/interactive-mode#session-recap>) for the automatic recap that appears after you’ve been away
`/release-notes`| View the changelog in an interactive version picker. Select a specific version to see its release notes, or choose to show all versions
`/reload-plugins`| Reload all active [plugins](</docs/en/plugins>) to apply pending changes without restarting. Reports counts for each reloaded component and flags any load errors
@@ -68,7 +87,7 @@
`/review [PR]`| Review a pull request locally in your current session. For a deeper cloud-based review, see [`/ultrareview`](</docs/en/ultrareview>)
`/rewind`| Rewind the conversation and/or code to a previous point, or summarize from a selected message. See [checkpointing](</docs/en/checkpointing>). Aliases: `/checkpoint`, `/undo`
`/sandbox`| Toggle [sandbox mode](</docs/en/sandboxing>). Available on supported platforms only
-`/schedule [description]`| Create, update, list, or run [routines](</docs/en/routines>). Claude walks you through the setup conversationally. Alias: `/routines`
+`/schedule [description]`| Create, update, list, or run [routines](</docs/en/routines>), which execute on Anthropic-managed cloud infrastructure. Claude walks you through the setup conversationally. Alias: `/routines`
`/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
`/setup-bedrock`| Configure [Amazon Bedrock](</docs/en/amazon-bedrock>) authentication, region, and model pins through an interactive wizard. Only visible when `CLAUDE_CODE_USE_BEDROCK=1` is set. First-time Bedrock users can also access this wizard from the login screen
`/setup-vertex`| Configure [Google Vertex AI](</docs/en/google-vertex-ai>) authentication, project, region, and model pins through an interactive wizard. Only visible when `CLAUDE_CODE_USE_VERTEX=1` is set. First-time Vertex AI users can also access this wizard from the login screen
--- a/env-vars.md
+++ b/env-vars.md
@@ -114,6 +114,7 @@
`CLAUDE_CODE_MAX_RETRIES`| Override the number of times to retry failed API requests (default: 10)
`CLAUDE_CODE_MAX_TOOL_USE_CONCURRENCY`| Maximum number of read-only tools and subagents that can execute in parallel (default: 10). Higher values increase parallelism but consume more resources
`CLAUDE_CODE_MCP_ALLOWLIST_ENV`| Set to `1` to spawn stdio MCP servers with only a safe baseline environment plus the server’s configured `env`, instead of inheriting your shell environment
+`CLAUDE_CODE_NATIVE_CURSOR`| Set to `1` to show the terminal’s own cursor at the input caret instead of a drawn block. The cursor respects the terminal’s blink, shape, and focus settings
`CLAUDE_CODE_NEW_INIT`| Set to `1` to make `/init` run an interactive setup flow. The flow asks which files to generate, including CLAUDE.md, skills, and hooks, before exploring the codebase and writing them. Without this variable, `/init` generates a CLAUDE.md automatically without prompting.
`CLAUDE_CODE_NO_FLICKER`| Set to `1` to enable [fullscreen rendering](</docs/en/fullscreen>), a research preview that reduces flicker and keeps memory flat in long conversations. Equivalent to the [`tui`](</docs/en/settings#available-settings>) setting; you can also switch with `/tui fullscreen`
`CLAUDE_CODE_OAUTH_REFRESH_TOKEN`| OAuth refresh token for Claude.ai authentication. When set, `claude auth login` exchanges this token directly instead of opening a browser. Requires `CLAUDE_CODE_OAUTH_SCOPES`. Useful for provisioning authentication in automated environments
@@ -189,6 +190,7 @@
`DISABLE_TELEMETRY`| Set to `1` to opt out of telemetry. Telemetry events do not include user data like code, file paths, or bash commands
`DISABLE_UPDATES`| Set to `1` to block all updates including manual `claude update` and `claude install`. Stricter than `DISABLE_AUTOUPDATER`. Use when distributing Claude Code through your own channels and users should not self-update
`DISABLE_UPGRADE_COMMAND`| Set to `1` to hide the `/upgrade` command
+`DO_NOT_TRACK`| Set to `1` to opt out of telemetry. Equivalent to setting `DISABLE_TELEMETRY`. Honored as the [standard cross-tool convention](<https://consoledonottrack.com/>)
`ENABLE_CLAUDEAI_MCP_SERVERS`| Set to `false` to disable [claude.ai MCP servers](</docs/en/mcp#use-mcp-servers-from-claude-ai>) in Claude Code. Enabled by default for logged-in users
`ENABLE_PROMPT_CACHING_1H`| Set to `1` to request a 1-hour prompt cache TTL instead of the default 5 minutes. Intended for API key, [Bedrock](</docs/en/amazon-bedrock>), [Vertex](</docs/en/google-vertex-ai>), and [Foundry](</docs/en/microsoft-foundry>) users. Subscription users receive 1-hour TTL automatically. 1-hour cache writes are billed at a higher rate
`ENABLE_PROMPT_CACHING_1H_BEDROCK`| Deprecated. Use `ENABLE_PROMPT_CACHING_1H` instead
--- a/errors.md
+++ b/errors.md
@@ -29,6 +29,7 @@
`Not logged in · Please run /login`| Authentication
`Invalid API key`| Authentication
`This organization has been disabled`| Authentication
+`Routines are disabled by your organization's policy`| Authentication
`OAuth token revoked` / `OAuth token has expired`| Authentication
`does not meet scope requirement user:profile`| Authentication
`Unable to connect to API`| Network
@@ -276,6 +277,21 @@
+Routines are disabled by your organization’s policy
+
+Your Team or Enterprise admin has turned off routines at the organization level. The error appears when you try to create or run a routine, including from `/schedule` and the [Routines](</docs/en/routines>) UI on claude.ai/code.
+
+ Routines are disabled by your organization's policy.
+
+This is a server-side setting, so it cannot be overridden from local settings, environment variables, or CLI flags. **What to do:**
+
+ * Ask your admin to enable the **Routines** toggle at [claude.ai/admin-settings/claude-code](<https://claude.ai/admin-settings/claude-code>)
+ * For one-off scheduled work that does not require organization-level routines, see [scheduled tasks](</docs/en/scheduled-tasks>)
+
+###
+
+
+
OAuth token revoked or expired
Your saved login is no longer valid. A revoked token means you signed out everywhere or an admin removed access; an expired token means the automatic refresh failed mid-session.
--- a/hooks.md
+++ b/hooks.md
@@ -1240,7 +1240,7 @@
There is no timeout or retry limit. The session remains on disk until you resume it, subject to the [`cleanupPeriodDays`](</docs/en/settings#available-settings>) retention sweep that deletes session files after 30 days by default. If the answer is not ready when you resume, the hook can return `"defer"` again and the process exits the same way. The calling process controls when to break the loop by eventually returning `"allow"` or `"deny"` from the hook. `"defer"` only works when Claude makes a single tool call in the turn. If Claude makes several tool calls at once, `"defer"` is ignored with a warning and the tool proceeds through the normal permission flow. The constraint exists because resume can only re-run one tool: there is no way to defer one call from a batch without leaving the others unresolved. If the deferred tool is no longer available when you resume, the process exits with `stop_reason: "tool_deferred_unavailable"` and `is_error: true` before the hook fires. This happens when an MCP server that provided the tool is not connected for the resumed session. The `deferred_tool_use` payload is still included so you can identify which tool went missing.
-`--resume` does not restore the permission mode from the prior session. Pass the same `--permission-mode` flag on resume that was active when the tool was deferred. Claude Code logs a warning if the modes differ.
+`--resume` restores the permission mode that was active when the tool was deferred, so you do not need to pass `--permission-mode` again. The exceptions are `plan` and `bypassPermissions`, which are never carried over. Passing `--permission-mode` explicitly on resume overrides the restored value.
###
--- a/index.md
+++ b/index.md
@@ -5,6 +5,26 @@
> Use this file to discover all available pages before exploring further.
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 19
+
+v2.1.128–v2.1.136
+
+May 4–8, 2026
+
+**Plugins load from`.zip` archives and URLs**: `--plugin-dir` now accepts `.zip` files, and `--plugin-url` fetches a plugin archive for the current session.Also this week: **`worktree.baseRef`** chooses whether new worktrees branch from the remote default or local `HEAD`; **auto mode hard deny rules** block actions unconditionally regardless of allow exceptions; and **hooks see the active effort level** via `effort.level` and `$CLAUDE_EFFORT`.[Read the Week 19 digest →](</docs/en/whats-new/2026-w19>)
+
+
+
+Week 18
+
+v2.1.120–v2.1.126
+
+April 27 – May 1, 2026
+
+**Windows without Git Bash** : Git for Windows is no longer required, and Claude Code uses PowerShell as the shell tool when Bash is absent.Also this week: **`claude ultrareview`** brings cloud code review to CI and scripts; **`claude project purge`** cleans up local state for a project; and pasting a **PR URL into`/resume`** finds the session that created it.[Read the Week 18 digest →](</docs/en/whats-new/2026-w18>)
@@ -24,7 +44,7 @@
April 13–17, 2026
-**Claude Opus 4.7** lands as the new default on Max and Team Premium, with a new `xhigh` effort level that’s the recommended setting for most coding work and an interactive `/effort` slider to dial it in.Also this week: **Routines** on Claude Code on the web fire templated cloud agents from a schedule, GitHub event, or API call; `/ultrareview` runs parallel multi-agent code review in the cloud; `/usage` shows what’s driving your limits; and the CLI moves to native binaries.[Read the Week 16 digest →](</docs/en/whats-new/2026-w16>)
+**Claude Opus 4.7** lands as the new default on Max and Team Premium, with a new `xhigh` effort level that’s the recommended setting for most coding work and an interactive `/effort` slider to dial it in.Also this week: **Routines** on Claude Code on the web fire templated cloud agents from a schedule, GitHub event, or API call; **mobile push notifications** ping your phone when a long task finishes or Claude needs you; `/usage` shows what’s driving your limits; and the CLI moves to native binaries.[Read the Week 16 digest →](</docs/en/whats-new/2026-w16>)
--- a/interactive-mode.md
+++ b/interactive-mode.md
@@ -353,7 +353,7 @@
When you first open a session, a grayed-out example command appears in the prompt input to help you get started. Claude Code picks this from your project’s git history, so it reflects files you’ve been working on recently. After Claude responds, suggestions continue to appear based on your conversation history, such as a follow-up step from a multi-part request or a natural continuation of your workflow.
- * Press **Tab** or **Right arrow** to accept the suggestion, or press **Enter** to accept and submit
+ * Press **Tab** or **Right arrow** to place the suggestion in the prompt input, then **Enter** to submit
* Start typing to dismiss it
The suggestion runs as a background request that reuses the parent conversation’s prompt cache, so the additional cost is minimal. Claude Code skips suggestion generation when the cache is cold to avoid unnecessary cost. Suggestions are automatically skipped after the first turn of a conversation, in non-interactive mode, and in plan mode. To disable prompt suggestions entirely, set the environment variable or toggle the setting in `/config`:
--- a/mcp.md
+++ b/mcp.md
@@ -58,6 +58,8 @@
# Example with Bearer token
claude mcp add --transport http secure-api https://api.example.com/mcp \
--header "Authorization: Bearer your-token"
+
+When configuring MCP servers via JSON in `.mcp.json`, `~/.claude.json`, or `claude mcp add-json`, the `type` field accepts `streamable-http` as an alias for `http`. The MCP specification uses the name `streamable-http` for this transport, so configurations copied from server documentation work without modification.
###
--- a/monitoring-usage.md
+++ b/monitoring-usage.md
@@ -701,10 +701,10 @@
* `tool_use_id`: Unique identifier for this tool invocation. Matches the `tool_use_id` passed to hooks, allowing correlation between OTel events and hook-captured data.
* `decision`: Either `"accept"` or `"reject"`
* `source`: Where the decision came from:
- * `"config"`: Decided automatically without prompting, based on project settings, enterprise managed policy, `--allowedTools` or `--disallowedTools` flags, the active permission mode, or because the tool is inherently safe.
+ * `"config"`: Decided automatically without prompting, based on project settings, allow rules in the user’s personal settings, enterprise managed policy, `--allowedTools` or `--disallowedTools` flags, the active permission mode, a session-scoped grant from an earlier prompt in the same interactive CLI session, or because the tool is inherently safe. The event does not indicate which of these sources matched.
* `"hook"`: A `PreToolUse` or `PermissionRequest` hook returned the decision.
- * `"user_permanent"`: Emitted when the user chose “Always allow” when prompted, saving a rule to their personal settings. Also emitted for later calls that match that saved rule. Treated as an accept.
- * `"user_temporary"`: Emitted when the user chose “Yes” or “Yes, for this session” when prompted, without saving a rule. Also emitted for later calls in the same session that match that session-scoped allow. Treated as an accept.
+ * `"user_permanent"`: Emitted when the user chose “Yes, and don’t ask again for …” at a permission prompt, which saves an allow rule to their personal settings. In the interactive CLI this is emitted only for that choice itself; later calls that match the saved rule emit `"config"` instead. In Agent SDK or non-interactive `-p` sessions, both the initial choice and later rule matches emit `"user_permanent"`. Treated as an accept.
+ * `"user_temporary"`: Emitted when the user chose “Yes” at a permission prompt for a one-time approval, or chose one of the ”… during this session” options on a file edit or read prompt. In the interactive CLI this is emitted only for the choice itself; later calls allowed by that session-scoped grant emit `"config"` instead. In Agent SDK or non-interactive `-p` sessions, both the choice and later matches emit `"user_temporary"`. Treated as an accept.
* `"user_abort"`: Emitted when the user dismissed the permission prompt without answering. Treated as a reject.
* `"user_reject"`: Emitted when the user chose “No” when prompted, or a call matched a deny rule in their personal settings. Treated as a reject.
--- a/permissions.md
+++ b/permissions.md
@@ -232,6 +232,13 @@
* `Edit(//tmp/scratch.txt)`: edits the absolute path `/tmp/scratch.txt`
* `Read(src/**)`: reads from `<current-directory>/src/`
+A rule only matches files under its anchor, so the anchor determines how far a deny rule reaches. Bare filenames follow gitignore semantics and match at any depth, so `Read(.env)` and `Read(**/.env)` are equivalent:
+
+Deny rule| Blocks| Does not block
+---|---|---
+`Read(.env)` or `Read(**/.env)`| any `.env` at or under the current directory| `.env` in a parent directory or another project
+`Read(//**/.env)`| any `.env` anywhere on the filesystem| nothing; the rule is anchored at the filesystem root
+
In gitignore patterns, `*` matches files in a single directory while `**` matches recursively across directories. To allow all file access, use just the tool name without parentheses: `Read`, `Edit`, or `Write`.
When Claude accesses a symlink, permission rules check two paths: the symlink itself and the file it resolves to. Allow and deny rules treat that pair differently: allow rules fall back to prompting you, while deny rules block outright.
--- a/plugins-reference.md
+++ b/plugins-reference.md
@@ -405,7 +405,7 @@
Field| Type| Description| Example
---|---|---|---
-`skills`| string|array| Custom skill directories containing `<name>/SKILL.md` (replaces default `skills/`)| `"./custom/skills/"`
+`skills`| string|array| Custom skill directories containing `<name>/SKILL.md` (in addition to default `skills/`)| `"./custom/skills/"`
`commands`| string|array| Custom flat `.md` skill files or directories (replaces default `commands/`)| `"./custom/cmd.md"` or `["./cmd1.md"]`
`agents`| string|array| Custom agent files (replaces default `agents/`)| `"./custom/agents/reviewer.md"`
`hooks`| string|array|object| Hook config paths or inline config| `"./my-extra-hooks.json"`
@@ -502,12 +502,17 @@
Path behavior rules
-For `skills`, `commands`, `agents`, `outputStyles`, `experimental.themes`, and `experimental.monitors`, a custom path replaces the default. If the manifest specifies `skills`, the default `skills/` directory is not scanned; if it specifies `experimental.monitors`, the default `monitors/monitors.json` is not loaded. Hooks, MCP servers, and LSP servers have different semantics for handling multiple sources.
+Whether a custom path replaces or extends the plugin’s default directory depends on the field:
+
+ * **Replaces the default** : `commands`, `agents`, `outputStyles`, `experimental.themes`, `experimental.monitors`. For example, when the manifest specifies `commands`, the default `commands/` directory is not scanned. To keep the default and add more, list it explicitly: `"commands": ["./commands/", "./extras/"]`
+ * **Adds to the default** : `skills`. The default `skills/` directory is always scanned, and directories listed in `skills` are loaded alongside it
+ * **Own merge rules** : hooks, MCP servers, and LSP servers. See each section for how multiple sources combine
+
+For all path fields:
* 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 skills, commands, agents, or output styles, include the default in your array: `"skills": ["./skills/", "./extras/"]`
* When a skill path points to a directory that contains a `SKILL.md` directly, for example `"skills": ["./"]` pointing to the plugin root, the frontmatter `name` field in `SKILL.md` determines the skill’s invocation name. This gives a stable name regardless of the install directory. If `name` is not set in the frontmatter, the directory basename is used as a fallback.
**Path examples** :
--- a/python.md
+++ b/python.md
@@ -2574,7 +2574,9 @@
"multiSelect": bool, # Set to true to allow multiple selections
}
],
- "answers": dict | None, # User answers populated by the permission system
+ "answers": dict[str, str | list[str]] | None,
+ # User answers populated by the permission system. Multi-select
+ # answers may be a list of labels or a comma-joined string
}
**Output:**
--- a/routines.md
+++ b/routines.md
@@ -12,7 +12,7 @@
* **API** : trigger on demand by sending an HTTP POST to a per-routine endpoint with a bearer token
* **GitHub** : run automatically in response to repository events such as pull requests or releases
-A single routine can combine triggers. For example, a PR review routine can run nightly, trigger from a deploy script, and also react to every new PR. Routines are available on Pro, Max, Team, and Enterprise plans with [Claude Code on the web](</docs/en/claude-code-on-the-web>) enabled. Create and manage them at [claude.ai/code/routines](<https://claude.ai/code/routines>), or from the CLI with `/schedule`. This page covers creating a routine, configuring each trigger type, managing runs, and how usage limits apply.
+A single routine can combine triggers. For example, a PR review routine can run nightly, trigger from a deploy script, and also react to every new PR. Routines are available on Pro, Max, Team, and Enterprise plans with [Claude Code on the web](</docs/en/claude-code-on-the-web>) enabled. Create and manage them at [claude.ai/code/routines](<https://claude.ai/code/routines>), or from the CLI with `/schedule`. Team and Enterprise admins can disable routines for all members with the Routines toggle at [claude.ai/admin-settings/claude-code](<https://claude.ai/admin-settings/claude-code>). When disabled, existing routines stop running and members cannot create new ones. This page covers creating a routine, configuring each trigger type, managing runs, and how usage limits apply.
##
@@ -386,6 +386,20 @@
+Troubleshooting
+
+###
+
+
+
+”Routines are disabled by your organization’s policy”
+
+Your Team or Enterprise admin has likely turned off the **Routines** toggle at [claude.ai/admin-settings/claude-code](<https://claude.ai/admin-settings/claude-code>). This is a server-side organization setting, so it cannot be overridden from your local configuration. Contact your admin to request that routines be enabled for your organization.
+
+##
+
+
+
Related resources
* [`/loop` and in-session scheduling](</docs/en/scheduled-tasks>): schedule local tasks within an open CLI session
--- a/security.md
+++ b/security.md
@@ -89,7 +89,7 @@
* **Network request approval** : Tools that make network requests require user approval by default
* **Isolated context windows** : Web fetch uses a separate context window to avoid injecting potentially malicious prompts
* **Trust verification** : First-time codebase runs and new MCP servers require trust verification
- * Note: Trust verification is disabled when running non-interactively with the `-p` flag
+ * Note: Trust verification is disabled when running non-interactively with the `-p` flag. The exception is [`--worktree`](</docs/en/worktrees>), which still requires that trust has been accepted for the directory
* **Command injection detection** : Suspicious bash commands require manual approval even if previously allowlisted
* **Fail-closed matching** : Unmatched commands default to requiring manual approval
* **Natural language descriptions** : Complex bash commands include explanations for user understanding
--- a/server-managed-settings.md
+++ b/server-managed-settings.md
@@ -51,7 +51,7 @@
Define your settings
-Add your configuration as JSON. All [settings available in `settings.json`](</docs/en/settings#available-settings>) are supported, including [hooks](</docs/en/hooks>), [environment variables](</docs/en/env-vars>), and [managed-only settings](</docs/en/permissions#managed-only-settings>) like `allowManagedPermissionRulesOnly`.This example enforces a permission deny list, prevents users from bypassing permissions, and restricts permission rules to those defined in managed settings:
+Add your configuration as JSON. All [settings available in `settings.json`](</docs/en/settings#available-settings>) are supported except those restricted to OS-level policy delivery; see Current limitations for that short list. This includes [hooks](</docs/en/hooks>), [environment variables](</docs/en/env-vars>), and [managed-only settings](</docs/en/permissions#managed-only-settings>) like `allowManagedPermissionRulesOnly`.This example enforces a permission deny list, prevents users from bypassing permissions, and restricts permission rules to those defined in managed settings:
{
"permissions": {
@@ -93,7 +93,7 @@
}
}
-Because hooks execute shell commands, users see a security approval dialog before they’re applied. See [Configure auto mode](</docs/en/auto-mode-config>) for how the `autoMode` entries affect what the classifier blocks and important warnings about the `allow` and `soft_deny` fields.
+Because hooks execute shell commands, users see a security approval dialog before they’re applied. See [Configure auto mode](</docs/en/auto-mode-config>) for how the `autoMode` entries affect what the classifier blocks and important warnings about the `environment`, `allow`, `soft_deny`, and `hard_deny` fields.
3
@@ -140,6 +140,7 @@
* Settings apply uniformly to all users in the organization. Per-group configurations are not yet supported.
* [MCP server configurations](</docs/en/mcp#managed-mcp-configuration>) cannot be distributed through server-managed settings.
+ * Settings restricted to OS-level policy sources, such as `policyHelper` and `wslInheritsWindowsSettings`, are not honored. Deploy them through MDM or a system `managed-settings.json` file instead.
##
--- a/settings.md
+++ b/settings.md
@@ -179,7 +179,7 @@
`attribution`| Customize attribution for git commits and pull requests. See Attribution settings| `{"commit": "🤖 Generated with Claude Code", "pr": ""}`
`autoMemoryDirectory`| Custom directory for [auto memory](</docs/en/memory#storage-location>) storage. Accepts an absolute path or a `~/`-prefixed path. Accepted from policy and user settings, and from the `--settings` flag. Not accepted from project or local settings, since a cloned repository could supply either file to redirect memory writes to sensitive locations| `"~/my-memory-dir"`
`autoMemoryEnabled`| Enable [auto memory](</docs/en/memory#enable-or-disable-auto-memory>). When `false`, Claude does not read from or write to the auto memory directory. Default: `true`. You can also toggle this with `/memory` during a session. To disable via environment variable, set [`CLAUDE_CODE_DISABLE_AUTO_MEMORY`](</docs/en/env-vars>) in `env`| `false`
-`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. Include the literal string `"$defaults"` in an array to inherit the built-in rules at that position. See [Configure auto mode](</docs/en/auto-mode-config>). Not read from shared project settings| `{"soft_deny": ["$defaults", "Never run terraform apply"]}`
+`autoMode`| Customize what the [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) classifier blocks and allows. Contains `environment`, `allow`, `soft_deny`, and `hard_deny` arrays of prose rules. Include the literal string `"$defaults"` in an array to inherit the built-in rules at that position. See [Configure auto mode](</docs/en/auto-mode-config>). Not read from shared project settings| `{"soft_deny": ["$defaults", "Never run terraform apply"]}`
`autoScrollEnabled`| In [fullscreen rendering](</docs/en/fullscreen>), follow new output to the bottom of the conversation. Default: `true`. Appears in `/config` as **Auto-scroll**. Permission prompts still scroll into view when this is off| `false`
`autoUpdatesChannel`| Release channel to follow for updates. Use `"stable"` for a version that is typically about one week old and skips versions with major regressions, or `"latest"` (default) for the most recent release. To disable auto-updates entirely, set [`DISABLE_AUTOUPDATER`](</docs/en/setup#disable-auto-updates>) in `env`| `"stable"`
`availableModels`| Restrict which models users can select via `/model`, `--model`, or `ANTHROPIC_MODEL`. Does not affect the Default option. See [Restrict model selection](</docs/en/model-config#restrict-model-selection>)| `["sonnet", "haiku"]`
@@ -225,6 +225,7 @@
`permissions`| See table below for structure of permissions.|
`plansDirectory`| Customize where plan files are stored. Path is relative to project root. Default: `~/.claude/plans`| `"./plans"`
`pluginTrustMessage`| (Managed settings only) Custom message appended to the plugin trust warning shown before installation. Use this to add organization-specific context, for example to confirm that plugins from your internal marketplace are vetted.| `"All plugins from our marketplace are approved by IT"`
+`policyHelper`| Admin-deployed executable that computes managed settings dynamically at startup. Only honored from MDM or a system `managed-settings.json` file. See Compute managed settings with a policy helper. Requires Claude Code v2.1.136 or later| `{"path": "/usr/local/bin/claude-policy"}`
`preferredNotifChannel`| Method for task-complete and permission-prompt notifications: `"auto"`, `"terminal_bell"`, `"iterm2"`, `"iterm2_with_bell"`, `"kitty"`, `"ghostty"`, or `"notifications_disabled"`. Default: `"auto"`, which sends a desktop notification in iTerm2, Ghostty, and Kitty and does nothing in other terminals. Set `"terminal_bell"` to ring the bell character in any terminal. Appears in `/config` as **Notifications**. See [Get a terminal bell or notification](</docs/en/terminal-config#get-a-terminal-bell-or-notification>)| `"terminal_bell"`
`prefersReducedMotion`| Reduce or disable UI animations (spinners, shimmer, flash effects) for accessibility| `true`
`prUrlTemplate`| URL template for the PR badge shown in the footer and in tool-result summaries. Substitutes `{host}`, `{owner}`, `{repo}`, `{number}`, and `{url}` from the `gh`-reported PR URL. Use to point PR links at an internal code-review tool instead of `github.com`. Does not affect `#123` autolinks in Claude’s prose| `"https://reviews.example.com/{owner}/{repo}/pull/{number}"`
@@ -486,6 +487,32 @@
+Compute managed settings with a policy helper
+
+The `policyHelper` setting points at an executable that computes managed settings at startup, so admins can derive policy from device posture, identity, or a remote service instead of a static file. Configure it from MDM or a system `managed-settings.json` file. Claude Code ignores `policyHelper` when it appears in any other scope, including user settings, project settings, the HKCU registry hive, and [server-managed settings](</docs/en/server-managed-settings>). The setting accepts these keys:
+
+Key| Type| Description
+---|---|---
+`path`| string| Absolute path to the helper executable
+`timeoutMs`| number| How long to wait for the helper before treating the run as failed
+`refreshIntervalMs`| number| How often to re-run the helper in the background. Set to `0` to disable refresh, or to at least `60000`
+
+The helper writes a JSON envelope to stdout. Put the settings under a `managedSettings` key rather than at the top level, since a bare settings object parses with `managedSettings` undefined and applies nothing:
+
+ {
+ "managedSettings": {
+ "permissions": { "deny": ["Read(//etc/secrets/**)"] }
+ },
+ "claudeMd": "# Organization context\n...",
+ "appendSystemPrompt": "Always cite the internal style guide."
+ }
+
+When the helper emits `managedSettings`, that object replaces the file-based managed settings for the run. When the helper exits non-zero at startup, Claude Code prints the error and refuses to start, so a helper that needs outage resilience should serve from its own cache and exit `0`.
+
+###
+
+
+
Settings precedence
Settings apply in order of precedence. From highest to lowest:
--- a/setup.md
+++ b/setup.md
@@ -338,7 +338,7 @@
npm install -g @anthropic-ai/claude-code
-The npm package installs the same native binary as the standalone installer. npm pulls the binary in through a per-platform optional dependency such as `@anthropic-ai/claude-code-darwin-arm64`, and a postinstall step links it into place. The installed `claude` binary does not itself invoke Node. Supported npm install platforms are `darwin-arm64`, `darwin-x64`, `linux-x64`, `linux-arm64`, `linux-x64-musl`, `linux-arm64-musl`, `win32-x64`, and `win32-arm64`. Your package manager must allow optional dependencies. See [troubleshooting](</docs/en/troubleshoot-install#native-binary-not-found-after-npm-install>) if the binary is missing after install.
+The npm package installs the same native binary as the standalone installer. npm pulls the binary in through a per-platform optional dependency such as `@anthropic-ai/claude-code-darwin-arm64`, and a postinstall step links it into place. The installed `claude` binary does not itself invoke Node. Supported npm install platforms are `darwin-arm64`, `darwin-x64`, `linux-x64`, `linux-arm64`, `linux-x64-musl`, `linux-arm64-musl`, `win32-x64`, and `win32-arm64`. Your package manager must allow optional dependencies. See [troubleshooting](</docs/en/troubleshoot-install#native-binary-not-found-after-npm-install>) if the binary is missing after install. To upgrade an npm installation, run `npm install -g @anthropic-ai/claude-code@latest`. Avoid `npm update -g`, which respects the semver range from the original install and may not move you to the newest release.
Do NOT use `sudo npm install -g` as this can lead to permission issues and security risks. If you encounter permission errors, see [troubleshooting permission errors](</docs/en/troubleshoot-install#permission-errors-during-installation>).
--- a/terminal-config.md
+++ b/terminal-config.md
@@ -109,7 +109,7 @@
set -s extended-keys on
set -as terminal-features 'xterm*:extkeys'
-The `allow-passthrough` line lets notifications and progress updates reach iTerm2, Ghostty, or Kitty instead of being swallowed by tmux. The `extended-keys` lines let tmux distinguish Shift+Enter from plain Enter so the newline shortcut works.
+The `allow-passthrough` line lets notifications and progress updates reach the outer terminal instead of being swallowed by tmux. The `extended-keys` lines let tmux distinguish Shift+Enter from plain Enter so the newline shortcut works.
##
Show diff (115 lines)
--- a/typescript.md
+++ b/typescript.md
@@ -385,6 +385,67 @@
`sessionId`| `string`| required| UUID of the session to tag
`tag`| `string | null`| required| Tag string, or `null` to clear
`options.dir`| `string`| `undefined`| Project directory path. When omitted, searches all project directories
+
+###
+
+
+
+`resolveSettings()`
+
+Resolves the effective Claude Code settings for a given directory using the same merge engine as the CLI, without spawning the Claude CLI. Use it to inspect what configuration a `query()` call would see before invoking one.
+
+This function is alpha and its API may change before stabilization. It reads MDM sources, including macOS plist and Windows HKLM/HKCU, for parity with CLI startup, but does not execute the admin-configured `policyHelper` subprocess. The `permissions.defaultMode` field is returned as-is from all tiers including project settings. The trust filter the CLI applies before honoring escalating permission modes is not applied.
+
+ function resolveSettings(
+ options?: ResolveSettingsOptions
+ ): Promise<ResolvedSettings>;
+
+####
+
+
+
+Parameters
+
+`resolveSettings()` accepts a single options object. All fields are optional.
+
+Parameter| Type| Default| Description
+---|---|---|---
+`options.cwd`| `string`| `process.cwd()`| Directory to resolve project and local settings relative to
+`options.settingSources`| `SettingSource``[]`| All sources| Which filesystem sources to load. Pass `[]` to skip user, project, and local settings. Managed policy settings load in all cases
+`options.managedSettings`| `Settings`| `undefined`| Restrictive policy-tier settings merged at the managed-policy precedence level. Non-restrictive keys such as `model` are silently dropped
+`options.serverManagedSettings`| `Settings`| `undefined`| Server-managed settings payload from `/api/claude_code/settings`. Non-restrictive keys pass through unfiltered
+
+####
+
+
+
+Return type: `ResolvedSettings`
+
+`resolveSettings()` returns an object describing the merged settings and the source that contributed each key.
+
+Property| Type| Description
+---|---|---
+`effective`| `Settings`| Merged settings after applying all enabled sources in precedence order
+`provenance`| `Partial<Record<keyof Settings, ProvenanceEntry>>`| For each top-level key in `effective`, which source supplied the value
+`sources`| `Array<{ source, settings, path?, policyOrigin? }>`| Per-source raw settings, ordered from lowest to highest precedence
+
+####
+
+
+
+Example
+
+The example below resolves settings for a project directory and prints the source that controls the cleanup period.
+
+ import { resolveSettings } from "@anthropic-ai/claude-agent-sdk";
+
+ const { effective, provenance } = await resolveSettings({
+ cwd: "/path/to/project",
+ settingSources: ["user", "project", "local"],
+ });
+
+ console.log(`Cleanup period: ${effective.cleanupPeriodDays} days`);
+ console.log(`Set by: ${provenance.cleanupPeriodDays?.source}`);
##
@@ -991,6 +1052,7 @@
| SDKFilesPersistedEvent
| SDKToolUseSummaryMessage
| SDKRateLimitEvent
+ | SDKPermissionDeniedMessage
| SDKPromptSuggestionMessage;
###
@@ -1189,6 +1251,36 @@
uuid: UUID;
session_id: string;
};
+
+###
+
+
+
+`SDKPermissionDeniedMessage`
+
+Stream event emitted when the permission system auto-denies a tool call without an interactive prompt. Use it to render the denial in your UI as it happens, rather than only observing the `is_error` tool result that follows. The interactive ask path reaches your application separately through the `canUseTool` callback. Denials issued by a `PreToolUse` hook are not reported through this event. This event requires Claude Code v2.1.136 or later.
+
+ type SDKPermissionDeniedMessage = {
+ type: "system";
+ subtype: "permission_denied";
+ tool_name: string;
+ tool_use_id: string;
+ agent_id?: string;
+ decision_reason_type?: string;
+ decision_reason?: string;
+ message: string;
+ uuid: UUID;
+ session_id: string;
+ };
+
+Field| Type| Description
+---|---|---
+`tool_name`| `string`| Name of the tool that was denied
+`tool_use_id`| `string`| ID of the `tool_use` block this denial answers
+`agent_id`| `string`| Subagent ID when the denied call originated inside a subagent. Mirrors the field on `can_use_tool` for host-side routing
+`decision_reason_type`| `string`| Discriminator for the component that decided, such as `"rule"`, `"mode"`, `"classifier"`, or `"asyncAgent"`
+`decision_reason`| `string`| Human-readable reason from the deciding component, when available
+`message`| `string`| Rejection message returned to the model in the `tool_result`
###
--- a/user-input.md
+++ b/user-input.md
@@ -324,7 +324,7 @@
`question` field (e.g., `"How should I format the output?"`)| Key
Selected option’s `label` field (e.g., `"Summary"`)| Value
-For multi-select questions, join multiple labels with `", "`. If you support free-text input, use the user’s custom text as the value.
+For multi-select questions, pass an array of labels or join them with `", "`. If you support free-text input, use the user’s custom text as the value.
Python
@@ -335,7 +335,7 @@
"questions": input_data.get("questions", []),
"answers": {
"How should I format the output?": "Summary",
- "Which sections should I include?": "Introduction, Conclusion",
+ "Which sections should I include?": ["Introduction", "Conclusion"],
},
}
)
@@ -425,7 +425,7 @@
`questions`| Pass through the original questions array (required for tool processing)
`answers`| Object where keys are question text and values are selected labels
-For multi-select questions, join multiple labels with `", "`. For free-text input, use the user’s custom text directly.
+For multi-select questions, pass an array of labels or join them with `", "`. For free-text input, use the user’s custom text directly.
{
"questions": [
@@ -433,7 +433,7 @@
],
"answers": {
"How should I format the output?": "Summary",
- "Which sections should I include?": "Introduction, Conclusion"
+ "Which sections should I include?": ["Introduction", "Conclusion"]
}
}
--- a/vs-code.md
+++ b/vs-code.md
@@ -332,7 +332,7 @@
`environmentVariables`| `[]`| Set environment variables for the Claude process. Use Claude Code settings instead for shared config.
`disableLoginPrompt`| `false`| Skip authentication prompts (for third-party provider setups)
`allowDangerouslySkipPermissions`| `false`| Adds [Auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) and Bypass permissions to the mode selector. Auto mode has [plan, admin, model, and provider requirements](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>), so it may remain unavailable even with this toggle on. Use Bypass permissions only in sandboxes with no internet access.
-`claudeProcessWrapper`| -| Executable path used to launch the Claude process
+`claudeProcessWrapper`| -| Executable used to launch the Claude process. The bundled binary path is passed as an argument when present. Set this to a separately installed `claude` binary if the extension build doesn’t include one for your platform.
##