Changes on
31 changes detected
Show diff (103 lines)
--- a/agent-view.md
+++ b/agent-view.md
@@ -123,7 +123,7 @@
Row summaries
-The one-line summary in each row is generated by a [Haiku-class model](</docs/en/model-config>) so the row can tell you what the session is doing, what it needs, or what it produced without opening the transcript. While a session is actively working, the summary refreshes at most once every 15 seconds, plus once when each turn ends. Each refresh is one short Haiku-class request through your normal provider, billed and handled under the same [data usage terms](</docs/en/data-usage>) as the session itself.
+The one-line summary in each row is generated by a [Haiku-class model](</docs/en/model-config>) so the row can tell you what the session is doing, what it needs, or what it produced without opening the transcript. While a session is actively working, the summary refreshes at most once every 15 seconds, plus once when each turn ends. Each refresh is one short Haiku-class request through your normal provider, billed and handled under the same [data usage terms](</docs/en/data-usage>) as the session itself. On third-party providers such as Bedrock, Vertex AI, Microsoft Foundry, and custom gateways, the request falls back to the session’s main model when no Haiku model is configured. Set [`ANTHROPIC_DEFAULT_HAIKU_MODEL`](</docs/en/model-config#environment-variables>) to choose the model for these summaries on those providers.
###
@@ -148,7 +148,7 @@
Peek and reply
-Press `Space` on a selected row to open the peek panel. It shows what the session needs from you, its most recent output, and any pull requests it opened. Most of the time this is enough, and you never need to open the full transcript. Type a reply in the peek panel and press `Enter` to send it to that session. When the session is asking a multiple-choice question, the peek panel shows the options and you can press a number key to pick one. For other blocked sessions, press `Tab` to fill the input with a suggested reply you can edit before sending. Prefix a reply with `!` to send a Bash command instead. Use `↑` and `↓` to peek at adjacent sessions without closing the panel, or `→` to attach.
+Press `Space` on a selected row to open the peek panel. It shows what the session needs from you, its most recent output, and any pull requests it opened. Most of the time this is enough, and you never need to open the full transcript. Type a reply in the peek panel and press `Enter` to send it to that session. When the session is asking a multiple-choice question, the peek panel shows the options and you can press a number key to pick one. For other blocked sessions, press `Tab` to fill the input with a suggested reply you can edit before sending. Prefix a reply with `!` to send a Bash command instead. With [voice dictation](</docs/en/voice-dictation>) enabled, hold or tap your push-to-talk key while the reply input is focused to dictate a reply instead of typing it. The same works in the dispatch input at the bottom of agent view. Use `↑` and `↓` to peek at adjacent sessions without closing the panel, or `→` to attach.
###
@@ -240,7 +240,7 @@
`#<number>` or a pull request URL| If a session is already working on that PR, select it instead of dispatching
`Shift+Enter`| Dispatch and immediately attach to the new session
-Packaging a recurring task as a [skill](</docs/en/skills>) lets you start the same workflow from agent view repeatedly without retyping the prompt. When the same `@name` matches both a subagent and a sibling repository, the subagent takes precedence. The bare first-word match also applies, so a prompt that happens to begin with one of your subagent names dispatches that subagent rather than treating the word as plain text. Use the `@` form when you want to be explicit, or start the prompt with a different word to avoid the match.
+A small set of commands run in agent view itself instead of dispatching: `/exit` and `/quit` close agent view, and `/logout` signs you out. Every other command and skill is sent to a new background session as its first prompt. Packaging a recurring task as a [skill](</docs/en/skills>) lets you start the same workflow from agent view repeatedly without retyping the prompt. When the same `@name` matches both a subagent and a sibling repository, the subagent takes precedence. The bare first-word match also applies, so a prompt that happens to begin with one of your subagent names dispatches that subagent rather than treating the word as plain text. Use the `@` form when you want to be explicit, or start the prompt with a different word to avoid the match.
####
@@ -337,7 +337,7 @@
The `worktree.bgIsolation` setting requires Claude Code v2.1.143 or later.
-Outside a git repository, sessions write to the working directory directly and aren’t isolated from each other, so avoid dispatching parallel sessions that edit the same files. If you use a different version control system, configure a [`WorktreeCreate` hook](</docs/en/worktrees#non-git-version-control>) and Claude isolates edits the same way it does for git. Deleting a session in agent view (`Ctrl+X` twice) removes a worktree Claude created for it, including any uncommitted changes, so merge or push the changes you want to keep first. Deleting from the shell with `claude rm` keeps a worktree that has uncommitted changes and prints its path so you can clean it up yourself. A worktree you created yourself and started the session inside is left in place either way. To find a session’s worktree path, peek the session or attach and check its working directory. To make a subagent always run in its own worktree regardless of how it was started, set [`isolation: worktree`](</docs/en/sub-agents#supported-frontmatter-fields>) in its frontmatter.
+Outside a git repository, sessions write to the working directory directly and aren’t isolated from each other, so avoid dispatching parallel sessions that edit the same files. If you use a different version control system, configure a [`WorktreeCreate` hook](</docs/en/worktrees#non-git-version-control>) and Claude isolates edits the same way it does for git. Deleting a session in agent view (`Ctrl+X` twice) removes a worktree Claude created for it, including any uncommitted changes, so merge or push the changes you want to keep first. Deleting from the shell with `claude rm` keeps a worktree that has uncommitted changes and prints its path so you can clean it up yourself. A worktree you created yourself and started the session inside is left in place either way. To find a session’s worktree path, peek the session or attach and check its working directory. A [subagent](</docs/en/sub-agents>) the background session spawns inherits the session’s working directory, so its file edits land in the session’s worktree rather than your working copy. To give a subagent its own separate worktree instead, set [`isolation: worktree`](</docs/en/sub-agents#supported-frontmatter-fields>) in its frontmatter or pass `isolation: "worktree"` when spawning it.
###
@@ -357,7 +357,7 @@
Permission mode, model, and effort
-A background session reads its [settings](</docs/en/settings>) from the directory it runs in, the same as if you had started `claude` there. The [permission mode](</docs/en/permissions>) depends on how you started the session. Backgrounding an existing session with `/bg` or `←` keeps the current permission mode, so a session you switched to `acceptEdits` or `auto` stays in that mode after detaching. Dispatching from the agent view input or running `claude --bg` from your shell uses the `defaultMode` from that directory’s settings, or the `permissionMode` from the dispatched [subagent’s frontmatter](</docs/en/sub-agents#supported-frontmatter-fields>). The permission mode you start a background session with persists when the supervisor later stops and restarts the session’s process. A session you launched with `claude --bg --dangerously-skip-permissions` or `claude --bg --permission-mode bypassPermissions` stays in `bypassPermissions` after that restart instead of falling back to the directory’s `defaultMode`. To set defaults for every session you dispatch from agent view, pass any of `--permission-mode`, `--model`, `--effort`, or `--agent` when opening it:
+A background session reads its [settings](</docs/en/settings>) from the directory it runs in, the same as if you had started `claude` there. The [permission mode](</docs/en/permissions>) depends on how you started the session. Backgrounding an existing session with `/bg` or `←` keeps the current permission mode, so a session you switched to `acceptEdits` or `auto` stays in that mode after detaching. Dispatching from the agent view input or running `claude --bg` from your shell uses the `defaultMode` from that directory’s settings, or the `permissionMode` from the dispatched [subagent’s frontmatter](</docs/en/sub-agents#supported-frontmatter-fields>). The permission mode, model, and effort a background session was started with, along with the configuration flags it carries, all persist when the supervisor later stops and restarts its process. A session you launched with `claude --bg --dangerously-skip-permissions` or `claude --bg --permission-mode bypassPermissions` stays in `bypassPermissions` after that restart instead of falling back to the directory’s `defaultMode`, and a model or effort you changed mid-session with `/model` or `/effort` is kept. To set defaults for every session you dispatch from agent view, pass any of `--permission-mode`, `--model`, `--effort`, or `--agent` when opening it:
claude agents --permission-mode plan --model opus --effort high
@@ -411,6 +411,7 @@
`claude respawn --all`| Restart every running session, e.g. to move all sessions onto an updated Claude Code binary at once
`claude rm <id>`| Remove a session from the list. Removes a worktree Claude created for the session if it has no uncommitted changes; otherwise prints the worktree path so you can clean it up. Leaves a worktree you created yourself in place. The conversation transcript stays on your local machine and remains available through `claude --resume`
`claude daemon status`| Print the supervisor’s state, version, socket directory, and worker count
+`claude daemon stop --any`| Stop the supervisor process and the background sessions it hosts. Pass `--keep-workers` to leave background sessions running so the next supervisor reconnects to them. The next `claude agents` or `claude --bg` starts a fresh supervisor
##
@@ -426,7 +427,7 @@
The supervisor process
-Background sessions are hosted by a per-user supervisor process, separate from your terminal and from agent view. The supervisor starts automatically the first time you background a session or open agent view, and you don’t manage it directly. The supervisor and its sessions authenticate with the same credentials as your interactive sessions and make no additional network connections beyond the model API. Each background session is its own Claude Code process, managed by the supervisor rather than tied to your terminal. A session that’s actively working, waiting for your input, or has a terminal attached keeps its process running. A running background shell command, subagent, dynamic workflow, or monitor counts as active work, so a long-running process such as a dev server keeps the session alive. Once a session finishes and sits unattached for about an hour, the supervisor stops its process to free resources. A session you have pinned with `Ctrl+T` is exempt and keeps its process running while idle. The transcript and state stay on disk either way, and the next time you attach, peek, or reply to a stopped session, the supervisor starts a fresh process from where it left off. When every session has finished and no terminal is connected, the supervisor itself exits and starts again the next time you need it. When the host runs low on memory, the supervisor stops idle non-pinned sessions first and stops idle pinned ones only if that freed nothing. The supervisor watches the installed Claude Code binary on disk and restarts into the new version after the regular [auto-updater](</docs/en/setup#auto-updates>) replaces it. This is a local file watch, not a network check. Background sessions are detached processes, so they keep running through the restart and the new supervisor reconnects to them. An idle pinned session is also restarted in place onto the new version so it picks up the update without you reattaching.
+Background sessions are hosted by a per-user supervisor process, separate from your terminal and from agent view. The supervisor starts automatically the first time you background a session or open agent view, and you don’t manage it directly. The supervisor and its sessions authenticate with the same credentials as your interactive sessions and make no additional network connections beyond the model API. Each background session is its own Claude Code process, managed by the supervisor rather than tied to your terminal. A session that’s actively working, waiting for your input, or has a terminal attached keeps its process running. A running background shell command, subagent, dynamic workflow, or monitor counts as active work, so a long-running process such as a dev server keeps the session alive. Once a session finishes and sits unattached for about an hour, the supervisor stops its process to free resources. A session you have pinned with `Ctrl+T` is exempt and keeps its process running while idle. The transcript and state stay on disk either way, and the next time you attach, peek, or reply to a stopped session, the supervisor starts a fresh process from where it left off. When every session has finished and no terminal is connected, the supervisor itself exits and starts again the next time you need it. An empty row left over from pressing `←` that was never given a prompt is removed entirely after about five minutes so the list clears on its own. Sessions started with `claude --bg` and sessions waiting on a setup prompt such as a trust dialog are not removed this way. When the host runs low on memory, the supervisor stops idle non-pinned sessions first and stops idle pinned ones only if that freed nothing. The supervisor watches the installed Claude Code binary on disk and restarts into the new version after the regular [auto-updater](</docs/en/setup#auto-updates>) replaces it. This is a local file watch, not a network check. Background sessions are detached processes, so they keep running through the restart and the new supervisor reconnects to them. An idle pinned session is also restarted in place onto the new version so it picks up the update without you reattaching.
###
@@ -441,8 +442,9 @@
`~/.claude/daemon.log`| Supervisor log
`~/.claude/daemon/roster.json`| List of running background sessions, used to reconnect after a restart
`~/.claude/jobs/<id>/state.json`| Per-session state shown in agent view
-
-To inspect this state without reading the files directly, run `claude daemon status`. It reports whether the supervisor is reachable, its process ID and version, the socket directory, and how many background sessions are live. `/doctor` includes a summary of the same check. On Windows, `claude daemon status` surfaces the underlying file error when the daemon’s pipe-key file is locked or unreadable instead of reporting a generic connection failure.
+`~/.claude/jobs/<id>/tmp/`| Per-session scratch directory. Writes here don’t prompt for permission. Removed when the session is deleted
+
+Each background session has the `CLAUDE_JOB_DIR` environment variable set to its `~/.claude/jobs/<id>` directory, so shell commands the session runs can write temporary files to `$CLAUDE_JOB_DIR/tmp` without colliding with parallel sessions. To inspect this state without reading the files directly, run `claude daemon status`. It reports whether the supervisor is reachable, its process ID and version, the socket directory, and how many background sessions are live. `/doctor` includes a summary of the same check. On Windows, `claude daemon status` surfaces the underlying file error when the daemon’s pipe-key file is locked or unreadable instead of reporting a generic connection failure.
###
@@ -497,6 +499,26 @@
Sessions show as failed after shutdown
Shutting down or restarting your machine stops running background sessions, so they show as failed when you next open agent view. Attach, peek, or reply to any of them and the session restarts from where it left off. Sleep alone does not cause this. Sessions are preserved across sleep and the supervisor reconnects to them on wake.
+
+###
+
+
+
+Agent view says the background service did not respond
+
+If attaching, peeking, or `claude logs` reports that the background service did not respond, the supervisor process has likely stalled. Stop it and let the next `claude agents` start a fresh one. To keep your background sessions running through the restart, pass `--keep-workers`:
+
+ claude daemon stop --any --keep-workers
+
+The new supervisor reconnects to the running sessions. Without `--keep-workers`, the command ends the background sessions too. The `--any` flag confirms you want to stop a supervisor that started on demand rather than as an installed service, which is the default. On Windows, if the supervisor does not respond to the stop request, the command prints its process ID. End that process with `taskkill /PID <pid>` to finish the recovery. Background sessions are still preserved when you passed `--keep-workers`.
+
+###
+
+
+
+Background sessions cannot read Desktop, Documents, or Downloads on macOS
+
+On macOS, the background session host runs as its own process and requests access to protected folders separately from your terminal. If a background session reports `Operation not permitted` when reading `~/Desktop`, `~/Documents`, `~/Downloads`, or another protected location, grant access in System Settings under Privacy & Security > Files and Folders, or enable Full Disk Access for the entry. With the native installer, the entry appears as Claude Code and the grant persists across updates. With other install methods such as Homebrew or npm, the entry shows the binary path and may need to be granted again after updating.
###
--- a/changelog.md
+++ b/changelog.md
@@ -5,6 +5,40 @@
> 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.160
+
+June 2, 2026
+
+ * Added a prompt before writing to shell startup files (`.zshenv`, `.zlogin`, `.bash_login`) and `~/.config/git/`, which could otherwise lead to unintended command execution
+ * `acceptEdits` mode now prompts before writing build-tool config files that grant code execution (`.npmrc`, `.yarnrc*`, `bunfig.toml`, `.bazelrc`, `.pre-commit-config.yaml`, `.devcontainer/`, etc.)
+ * Edit no longer requires a separate Read after viewing a file with `grep`: single-file `grep`/`egrep`/`fgrep` commands now satisfy the read-before-edit check
+ * Fixed copy-on-select not writing to the Windows clipboard on WSL — now uses PowerShell interop instead of OSC 52, which terminals like MobaXterm don’t support
+ * Fixed restoring a completed session from `claude agents` dropping chat history and re-running the original prompt
+ * Fixed background sessions re-attached after overnight retire losing their conversation and re-running the original prompt
+ * Fixed `claude --bg` occasionally failing with “socket missing” when the background daemon was cold-starting on a loaded machine
+ * Fixed an issue on Windows where the directory a background session was started in could not be deleted after `claude rm` until the background daemon exited
+ * Fixed background agents that resumed work being shown under Completed in the agents list
+ * Fixed `claude agents` freezing for several seconds when returning to the session list due to the auto-updater re-checking on every exit
+ * Fixed Esc, arrow keys, and typing becoming unresponsive on Windows when attached to a background session or in the agent view while the host is under heavy CPU load
+ * Fixed background agents emitting terminal sync-output markers to terminals that don’t support them (Apple Terminal, tmux), causing render artifacts when entering a running agent
+ * Fixed mouse wheel scrolling prompt history instead of the transcript right after opening a session from the agents list
+ * Fixed CJK IME composition appearing at the bottom-left of the screen instead of at the input caret in the `claude agents` view
+ * Fixed valid `file:///C:/...` links being rewritten to a broken path on Windows terminals with hyperlink support
+ * Fixed voice mode failing to connect when the project directory or branch name contains non-ASCII or special characters
+ * Fixed the auto mode unavailability message on third-party providers (Bedrock/Vertex/Foundry) to point to the `CLAUDE_CODE_ENABLE_AUTO_MODE` opt-in instead of incorrectly blaming the model
+ * Fixed `/effort ultracode` incorrectly blaming the dynamic workflows setting when the model cannot run xhigh; ultracode is no longer offered on models that do not support it
+ * Fixed model-not-found errors suggesting `--model` when running via the SDK or other hosts where the CLI flag doesn’t apply
+ * Fixed Claude’s past replies disappearing from scrollback when resuming a brief mode session with brief mode turned off
+ * Fixed vim mode `p` pasting on the line below instead of at the cursor when the register was yanked with `v$`
+ * Improved performance of opening recently-inactive background agent sessions in `claude agents`
+ * Improved auto mode classifier latency by reducing reasoning on routine actions, lowering the chance of “could not evaluate this action” blocks
+ * Improved background-session teardown (`claude rm`/`stop`, idle reap) to send SIGTERM to running shell subprocesses before SIGKILL, so cleanup handlers run
+ * Removed `CLAUDE_CODE_OPUS_4_6_FAST_MODE_OVERRIDE`; the environment variable is now a no-op
+ * Removed the JetBrains plugin install suggestion from startup
+ * Renamed the dynamic-workflow trigger keyword from `workflow` to `ultracode`. The word “workflow” no longer triggers a run; asking for one in your own words still works. The trigger keyword is highlighted in violet in the prompt input
--- a/claude-code-features.md
+++ b/claude-code-features.md
@@ -60,6 +60,7 @@
Managed policy settings| Always loaded when present on the host| Remove the managed settings file
`~/.claude.json` global config| Always read| Relocate with `CLAUDE_CONFIG_DIR` in `env`
Auto memory at `~/.claude/projects/<project>/memory/`| Loaded by default into the system prompt| Set `autoMemoryEnabled: false` in settings, or `CLAUDE_CODE_DISABLE_AUTO_MEMORY=1` in `env`
+[claude.ai MCP connectors](</docs/en/mcp#use-mcp-servers-from-claude-ai>)| Loaded when the active authentication method is a claude.ai subscription. Passing `mcpServers: {}` does not suppress them| Set `strictMcpConfig: true`, or `ENABLE_CLAUDEAI_MCP_SERVERS=false` in `env`
Do not rely on default `query()` options for multi-tenant isolation. Because the inputs above are read regardless of `settingSources`, an SDK process can pick up host-level configuration and per-directory memory. For multi-tenant deployments, run each tenant in its own filesystem and set `settingSources: []` plus `CLAUDE_CODE_DISABLE_AUTO_MEMORY=1` in `env`. See [Secure deployment](</docs/en/agent-sdk/secure-deployment>).
@@ -99,7 +100,7 @@
Skills
-Skills are markdown files that give your agent specialized knowledge and invocable workflows. Unlike `CLAUDE.md` (which loads every session), skills load on demand. The agent receives skill descriptions at startup and loads the full content when relevant. Skills are discovered from the filesystem through `settingSources`. When the `skills` option on `query()` is omitted, discovered user and project skills are enabled and the Skill tool is available, matching CLI behavior. To control which skills are enabled, pass `skills` as `"all"`, a list of skill names, or `[]` to disable all. The SDK enables the Skill tool automatically when `skills` is set, so you do not need to add it to `allowedTools`.
+Skills are markdown files that give your agent specialized knowledge and invocable workflows. Unlike `CLAUDE.md` (which loads every session), skills load on demand. The agent receives skill descriptions at startup and loads the full content when relevant. Skills are discovered from the filesystem through `settingSources`. When the `skills` option on `query()` is omitted, discovered user and project skills are enabled and the Skill tool is available, matching CLI behavior. To control which skills are enabled, pass `skills` as `"all"`, a list of skill names, or `[]` to disable all. When `skills` is set, the SDK adds the Skill tool to `allowedTools` automatically. If you also pass an explicit `tools` list, include `"Skill"` in that list so Claude can invoke skills.
Python
@@ -135,7 +136,7 @@
* **Filesystem hooks:** shell commands defined in `settings.json`, loaded when `settingSources` includes the relevant source. These are the same hooks you’d configure for [interactive Claude Code sessions](</docs/en/hooks-guide>).
* **Programmatic hooks:** callback functions passed directly to `query()`. These run in your application process and can return structured decisions. See [Control execution with hooks](</docs/en/agent-sdk/hooks>).
-Both types execute during the same hook lifecycle. If you already have hooks in your project’s `.claude/settings.json` and you set `settingSources: ["project"]`, those hooks run automatically in the SDK with no extra configuration. Hook callbacks receive the tool input and return a decision dict. Returning `{}` (an empty dict) means allow the tool to proceed. Returning `{"decision": "block", "reason": "..."}` prevents execution and the reason is sent to Claude as the tool result. See the [hooks guide](</docs/en/agent-sdk/hooks>) for the full callback signature and return types.
+Both types execute during the same hook lifecycle. If you already have hooks in your project’s `.claude/settings.json` and you set `settingSources: ["project"]`, those hooks run automatically in the SDK with no extra configuration. Hook callbacks receive the tool input and return a decision dict. Returning `{}` means allow the tool to proceed. To block execution, return a `hookSpecificOutput` object with `permissionDecision: "deny"` and a `permissionDecisionReason`. The reason is sent to Claude as the tool result. The top-level `decision` and `reason` fields are deprecated for `PreToolUse`. See the [hooks guide](</docs/en/agent-sdk/hooks>) for the full callback signature and return types.
Python
@@ -150,7 +151,13 @@
async def audit_bash(input_data, tool_use_id, context):
command = input_data.get("tool_input", {}).get("command", "")
if "rm -rf" in command:
- return {"decision": "block", "reason": "Destructive command blocked"}
+ return {
+ "hookSpecificOutput": {
+ "hookEventName": "PreToolUse",
+ "permissionDecision": "deny",
+ "permissionDecisionReason": "Destructive command blocked",
+ }
+ }
return {} # Empty dict: allow the tool to proceed
# Filesystem hooks from .claude/settings.json run automatically
@@ -178,7 +185,7 @@
Hook type| Best for
---|---
**Filesystem** (`settings.json`)| Sharing hooks between CLI and SDK sessions. Supports `"command"` (shell scripts), `"http"` (POST to an endpoint), `"mcp_tool"` (call a connected MCP server’s tool), `"prompt"` (LLM evaluates a prompt), and `"agent"` (spawns a verifier agent). These fire in the main agent and any subagents it spawns.
-**Programmatic** (callbacks in `query()`)| Application-specific logic; returning structured decisions; in-process integration. Scoped to the main session only.
+**Programmatic** (callbacks in `query()`)| Application-specific logic, structured decisions, and in-process integration. These also fire inside subagents. The callback receives `agent_id` and `agent_type` to distinguish.
The TypeScript SDK supports additional hook events beyond Python, including `SessionStart`, `SessionEnd`, `TeammateIdle`, and `TaskCompleted`. See the [hooks guide](</docs/en/agent-sdk/hooks>) for the full event compatibility table.
--- a/cli-reference.md
+++ b/cli-reference.md
@@ -30,6 +30,7 @@
`claude attach <id>`| Attach to a [background session](</docs/en/agent-view#manage-sessions-from-the-shell>) in this terminal| `claude attach 7c5dcf5d`
`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 daemon status`| Print the background-session [supervisor’s](</docs/en/agent-view#the-supervisor-process>) state, version, socket directory, and worker count for diagnostics. Exits 1 if the supervisor isn’t running| `claude daemon status`
+`claude daemon stop --any`| Stop the background-session [supervisor](</docs/en/agent-view#the-supervisor-process>) and the sessions it hosts. Pass `--keep-workers` to leave background sessions running so the next supervisor reconnects to them. `--any` confirms stopping an on-demand supervisor, which is the default. Use this to recover from an [unresponsive supervisor](</docs/en/agent-view#agent-view-says-the-background-service-did-not-respond>)| `claude daemon stop --any --keep-workers`
`claude logs <id>`| Print recent output from a [background session](</docs/en/agent-view#manage-sessions-from-the-shell>)| `claude logs 7c5dcf5d`
`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`
--- a/desktop.md
+++ b/desktop.md
@@ -757,7 +757,7 @@
* **[Settings](</docs/en/settings>)** in `~/.claude.json` and `~/.claude/settings.json` are shared. Permission rules, allowed tools, and other settings in `settings.json` apply to Desktop sessions.
* **Models** : Sonnet, Opus, and Haiku are available in both. In Desktop, select the model from the dropdown next to the send button. You can change the model mid-session from the same dropdown.
-**MCP servers: desktop chat app vs Claude Code** : MCP servers configured for the Claude Desktop chat app in `claude_desktop_config.json` are separate from Claude Code and will not appear in the Code tab. To use MCP servers in Claude Code, configure them in `~/.claude.json` or your project’s `.mcp.json` file. See [MCP configuration](</docs/en/mcp#installing-mcp-servers>) for details.
+**MCP servers from the Claude Desktop chat app** : the Desktop app loads MCP servers from `claude_desktop_config.json` into Code tab sessions, alongside servers from `~/.claude.json` and `.mcp.json`. A server defined in `claude_desktop_config.json` is available in both the Desktop chat surface and the Code tab.The standalone CLI does not read `claude_desktop_config.json`. On macOS and WSL, run `claude mcp add-from-claude-desktop` to copy those servers into `~/.claude.json`. See [Import MCP servers from Claude Desktop](</docs/en/mcp#import-mcp-servers-from-claude-desktop>) for the import flow and scope options.
###
--- a/discover-plugins.md
+++ b/discover-plugins.md
@@ -339,7 +339,7 @@
/reload-plugins
-Claude Code reloads all active plugins and shows counts for plugins, skills, agents, hooks, plugin MCP servers, and plugin LSP servers.
+Claude Code reloads all active plugins and shows counts for plugins, skills, agents, hooks, plugin MCP servers, and plugin LSP servers. Reloading has a token cost on the next request: newly loaded components announce themselves in content appended to the conversation, while the existing history still reads from the prompt cache. A plugin that provides MCP servers costs more when its tools aren’t deferred by [tool search](</docs/en/mcp#scale-with-mcp-tool-search>): the change invalidates the cache and the next request re-reads the entire conversation. See [enabling or disabling a plugin](</docs/en/prompt-caching#enabling-or-disabling-a-plugin>) for details.
##
--- a/features-overview.md
+++ b/features-overview.md
@@ -300,7 +300,7 @@
## Hooks
-Automate workflows with hooks
+Automate actions with hooks
## Plugins
--- a/glossary.md
+++ b/glossary.md
@@ -118,7 +118,7 @@
CLAUDE.md
-A markdown file of persistent instructions you write for Claude, loaded at the start of every session as a user message after the system prompt. Put project conventions, architecture notes, and “always do X” rules here. CLAUDE.md survives compaction and is re-read fresh from disk afterward. You can place CLAUDE.md at project scope in `./CLAUDE.md` or `./.claude/CLAUDE.md`, at user scope in `~/.claude/CLAUDE.md`, or as managed policy for your organization. More specific locations take precedence. Learn more: [CLAUDE.md files](</docs/en/memory#claude-md-files>)
+A markdown file of persistent instructions you write for Claude, loaded at the start of every session as a user message after the system prompt. Put project conventions, architecture notes, and “always do X” rules here. Project-root CLAUDE.md survives compaction and is re-read fresh from disk afterward. You can place CLAUDE.md at project scope in `./CLAUDE.md` or `./.claude/CLAUDE.md`, at user scope in `~/.claude/CLAUDE.md`, or as managed policy for your organization. All discovered files are concatenated into context rather than overriding each other, ordered from broadest scope to most specific. Learn more: [CLAUDE.md files](</docs/en/memory#claude-md-files>)
###
--- a/goal.md
+++ b/goal.md
@@ -15,7 +15,7 @@
This page covers how to:
- * Compare autonomous workflow approaches: `/loop`, Stop hooks, and auto mode
+ * Compare ways to keep a session running: `/loop`, Stop hooks, and auto mode
* Set a goal and write an effective condition
* Check status, clear early, and run non-interactively
* See how evaluation works and requirements
@@ -24,7 +24,7 @@
-Compare to other autonomous workflows
+Compare ways to keep a session running
Three approaches keep the current session running between prompts. Pick based on what should start the next turn:
Show diff (119 lines)
--- a/hooks.md
+++ b/hooks.md
@@ -4,7 +4,7 @@
>
> Use this file to discover all available pages before exploring further.
-For a quickstart guide with examples, see [Automate workflows with hooks](</docs/en/hooks-guide>).
+For a quickstart guide with examples, see [Automate actions with hooks](</docs/en/hooks-guide>).
Hooks are user-defined shell commands, HTTP endpoints, or LLM prompts that execute automatically at specific points in Claude Code’s lifecycle. Use this reference to look up event schemas, configuration options, JSON input/output formats, and advanced features like async hooks, HTTP hooks, and MCP tool hooks. If you’re setting up hooks for the first time, start with the [guide](</docs/en/hooks-guide>) instead.
@@ -302,7 +302,7 @@
---|---|---
`type`| yes| `"command"`, `"http"`, `"mcp_tool"`, `"prompt"`, or `"agent"`
`if`| no| Permission rule syntax to filter when this hook runs, such as `"Bash(git *)"` or `"Edit(*.ts)"`. The hook only spawns if the tool call matches the pattern, or if a Bash command is too complex to parse. Only evaluated on tool events: `PreToolUse`, `PostToolUse`, `PostToolUseFailure`, `PermissionRequest`, and `PermissionDenied`. On other events, a hook with `if` set never runs. Uses the same syntax as [permission rules](</docs/en/permissions>)
-`timeout`| no| Seconds before canceling. Defaults: 600 for `command`, `http`, and `mcp_tool`; 30 for `prompt`; 60 for `agent`. `UserPromptSubmit` lowers the `command`, `http`, and `mcp_tool` default to 30
+`timeout`| no| Seconds before canceling. Defaults: 600 for `command`, `http`, and `mcp_tool`; 30 for `prompt`; 60 for `agent`. `UserPromptSubmit` lowers the `command`, `http`, and `mcp_tool` default to 30, and `MessageDisplay` lowers it to 10
`statusMessage`| no| Custom spinner message displayed while the hook runs
`once`| no| If `true`, runs once per session then is removed. Only honored for hooks declared in skill frontmatter; ignored in settings files and agent frontmatter
@@ -1028,7 +1028,7 @@
UserPromptSubmit
-Runs when the user submits a prompt, before Claude processes it. This allows you to add additional context based on the prompt/conversation, validate prompts, or block certain types of prompts. `UserPromptSubmit` hooks have a default timeout of 30 seconds for `command`, `http`, and `mcp_tool` types, shorter than the 600-second default for those types on other events. Because this hook runs before every prompt and blocks model processing until it completes, a stuck hook stalls the session. If your hook needs more time, set the `timeout` field in the hook entry.
+Runs when the user submits a prompt, before Claude processes it. This allows you to add additional context based on the prompt/conversation, validate prompts, or block certain types of prompts. `UserPromptSubmit` hooks have a default timeout of 30 seconds for `command`, `http`, and `mcp_tool` types, shorter than the 600-second default for those types on most other events. Because this hook runs before every prompt and blocks model processing until it completes, a stuck hook stalls the session. If your hook needs more time, set the `timeout` field in the hook entry.
####
@@ -1138,7 +1138,13 @@
MessageDisplay
-Runs while an assistant message streams to the screen. Claude Code displays the message in increments: each time a batch of newly completed lines is ready to render, the hook runs once with those lines and Claude Code renders the hook’s replacement text in their place. A long message produces several calls; a short message may produce only one. Use this to reformat, redact, or condense Claude’s responses as they appear on screen. MessageDisplay is display-only: the replacement text changes only what is rendered on screen. The transcript and what Claude sees keep the original text, so Claude never sees the replacement, and verbose mode shows the original. MessageDisplay does not support matchers and fires for every assistant message that streams text; messages with no text, such as tool-call-only responses, do not trigger it. In non-interactive runs, including Agent SDK queries and `claude -p`, MessageDisplay runs once per assistant message instead of once per batch of lines. The single call arrives after the message completes and carries the full message text: `index` is `0`, `final` is `true`, and `delta` holds the entire message. A hook that collects the `delta` text for each message receives the same total text in both modes.
+Runs while an assistant message streams to the screen. Claude Code displays the message in increments: each time a batch of newly completed lines is ready to render, the hook runs once with those lines and Claude Code renders the hook’s replacement text in their place. A long message produces several calls; a short message may produce only one. Use MessageDisplay to:
+
+ * strip markdown for a minimal display
+ * transform the text an Agent SDK application shows its users
+ * redact API keys or internal hostnames from Claude’s responses
+
+Claude Code holds each batch until your hook returns, so keep the hook fast. If the hook fails or times out, Claude Code displays the original text. The default timeout for this event is 10 seconds; if your hook needs more time, set the `timeout` field in the hook entry. MessageDisplay is display-only: the replacement text changes only what is rendered on screen. The transcript and what Claude sees keep the original text, so Claude never sees the replacement, and verbose mode shows the original. The hook receives assistant message text only, so tool results and the text you type render unchanged. MessageDisplay does not support matchers and fires for every assistant message that streams text; messages with no text, such as tool-call-only responses, do not trigger it. In non-interactive runs, including Agent SDK queries and `claude -p`, MessageDisplay runs once per assistant message instead of once per batch of lines. The single call arrives after the message completes and carries the full message text: `index` is `0`, `final` is `true`, and `delta` holds the entire message. A hook that collects the `delta` text for each message receives the same total text in both modes.
####
@@ -1180,7 +1186,73 @@
---|---
`displayContent`| Text displayed in place of the delta. Omit it to display the original
-MessageDisplay hooks have no decision control. They cannot block the message or change what is stored in the transcript or sent to Claude.
+MessageDisplay hooks have no decision control. They cannot block the message or change what is stored in the transcript or sent to Claude. This example strips markdown formatting from Claude’s responses for a plain-text display. The script reads each batch from stdin, removes bold markers and inline code backticks from `delta`, and returns the result as `displayContent`.
+
+ * macOS/Linux
+
+ * Windows (PowerShell)
+
+Register a command hook for the event in your settings file:
+
+ {
+ "hooks": {
+ "MessageDisplay": [
+ {
+ "hooks": [
+ {
+ "type": "command",
+ "command": "${CLAUDE_PROJECT_DIR}/.claude/hooks/plain-display.sh",
+ "args": []
+ }
+ ]
+ }
+ ]
+ }
+ }
+
+Save this script to `.claude/hooks/plain-display.sh` in your project and make it executable with `chmod +x`:
+
+ #!/bin/bash
+ jq '{hookSpecificOutput: {hookEventName: "MessageDisplay", displayContent: (.delta | gsub("\\*\\*"; "") | gsub("`"; ""))}}'
+
+The script needs `jq` on your `PATH`.
+
+Register a command hook that runs the script through PowerShell:
+
+ {
+ "hooks": {
+ "MessageDisplay": [
+ {
+ "hooks": [
+ {
+ "type": "command",
+ "command": "powershell.exe",
+ "args": [
+ "-NoProfile",
+ "-ExecutionPolicy",
+ "Bypass",
+ "-File",
+ "${CLAUDE_PROJECT_DIR}/.claude/hooks/plain-display.ps1"
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ }
+
+The `-NoProfile` flag skips loading your PowerShell profile so the hook starts fast, and `-ExecutionPolicy Bypass` lets PowerShell run the local script file.Save this script to `.claude/hooks/plain-display.ps1` in your project:
+
+ $batch = [Console]::In.ReadToEnd() | ConvertFrom-Json
+ $text = $batch.delta -replace '\*\*', '' -replace '`', ''
+ @{
+ hookSpecificOutput = @{
+ hookEventName = "MessageDisplay"
+ displayContent = $text
+ }
+ } | ConvertTo-Json
+
+Batches with no markdown pass through unchanged. If the script fails, for example because `jq` is missing, Claude Code displays the original text and notes the failure only in debug output, not in the session.
###
--- a/hooks-guide.md
+++ b/hooks-guide.md
@@ -831,7 +831,7 @@
* Command hooks communicate through stdout, stderr, and exit codes only. They cannot trigger `/` commands or tool calls. Text returned via `additionalContext` is injected as a system reminder that Claude reads as plain text. HTTP hooks communicate through the response body instead.
* Hook timeouts vary by type. Override per hook with the `timeout` field in seconds.
- * `command`, `http`, `mcp_tool`: 10 minutes. `UserPromptSubmit` lowers these to 30 seconds.
+ * `command`, `http`, `mcp_tool`: 10 minutes. `UserPromptSubmit` lowers these to 30 seconds, and `MessageDisplay` lowers them to 10 seconds.
* `prompt`: 30 seconds.
* `agent`: 60 seconds.
* `PostToolUse` hooks cannot undo actions since the tool has already executed.
--- a/large-codebases.md
+++ b/large-codebases.md
@@ -366,7 +366,7 @@
Recommend the right plugin at session start
-Once conventions live in plugins, a teammate starting Claude in an unfamiliar part of the tree has no signal about which plugin that area’s owners maintain. A [`SessionStart` hook](</docs/en/hooks#sessionstart>) can close that gap, since anything the hook prints to stdout is added to Claude’s context before the first prompt. For example, you can write a script that reads the launch directory from the [hook input](</docs/en/hooks#common-input-fields>), looks it up in a path-to-plugin map committed to the repository, and prints the recommendation for Claude to relay in its first reply. See [Automate workflows with hooks](</docs/en/hooks-guide>) to write and register the hook.
+Once conventions live in plugins, a teammate starting Claude in an unfamiliar part of the tree has no signal about which plugin that area’s owners maintain. A [`SessionStart` hook](</docs/en/hooks#sessionstart>) can close that gap, since anything the hook prints to stdout is added to Claude’s context before the first prompt. For example, you can write a script that reads the launch directory from the [hook input](</docs/en/hooks#common-input-fields>), looks it up in a path-to-plugin map committed to the repository, and prints the recommendation for Claude to relay in its first reply. See [Automate actions with hooks](</docs/en/hooks-guide>) to write and register the hook.
##
--- a/mcp.md
+++ b/mcp.md
@@ -4,7 +4,7 @@
>
> Use this file to discover all available pages before exploring further.
-Claude Code can connect to hundreds of external tools and data sources through the [Model Context Protocol (MCP)](<https://modelcontextprotocol.io/introduction>), an open source standard for AI-tool integrations. MCP servers give Claude Code access to your tools, databases, and APIs. Connect a server when you find yourself copying data into chat from another tool, like an issue tracker or a monitoring dashboard. Once connected, Claude can read and act on that system directly instead of working from what you paste.
+Claude Code can connect to hundreds of external tools and data sources through the [Model Context Protocol (MCP)](<https://modelcontextprotocol.io/introduction>), an open source standard for AI-tool integrations. MCP servers give Claude Code access to your tools, databases, and APIs. Connect a server when you find yourself copying data into chat from another tool, like an issue tracker or a monitoring dashboard. Once connected, Claude can read and act on that system directly instead of working from what you paste. If you’re connecting your first server, start with the [MCP quickstart](</docs/en/mcp-quickstart>) for a step-by-step walkthrough. This page is the full reference.
##
@@ -910,7 +910,7 @@
Scale with MCP Tool Search
-Tool search keeps MCP context usage low by deferring tool definitions until Claude needs them. Only tool names load at session start, so adding more MCP servers has minimal impact on your context window.
+Tool search keeps MCP context usage low by deferring tool definitions until Claude needs them. Only tool names and server instructions load at session start, so adding more MCP servers has minimal impact on your context window.
###
Show diff (370 lines)
--- a/mcp-quickstart.md
+++ b/mcp-quickstart.md
@@ -0,0 +1,367 @@
+> ## 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.
+
+The [Model Context Protocol (MCP)](<https://modelcontextprotocol.io/introduction>) lets Claude Code use tools beyond its built-in set, such as searching an issue tracker, querying a database, or controlling a web browser. These tools come from MCP servers, which run on your machine or as hosted services. This guide walks you through connecting one MCP server end to end with the Claude Code CLI. By the end, you’ll have a server connected and responding, know where its configuration lives on disk, and know how to fix the most common connection errors.
+
+You can also add MCP servers from other surfaces, including the desktop app, VS Code, and the web. See Connect from other surfaces.
+
+For every way to connect and configure MCP servers in Claude Code, see the [MCP reference](</docs/en/mcp>).
+
+##
+
+
+
+Before you begin
+
+Make sure you have:
+
+ * [Claude Code installed](</docs/en/quickstart>) and authenticated
+ * A terminal open in a project directory. Any directory works, including an empty one.
+
+##
+
+
+
+Add and verify a server
+
+The example below connects to the [Claude Code documentation MCP server](<https://code.claude.com/docs/mcp>), a hosted server with full-text search over the Claude Code docs. It doesn’t require authentication or any special configuration, so it works well as a first server to test the setup flow with. The steps are the same for any server: add it, check the connection status, then use it in a session, with an optional cleanup step at the end. Some servers add a step, like a browser sign-in, shown in Additional MCP server examples. For more servers to connect, browse the [Anthropic Directory](</docs/en/mcp#find-and-build-mcp-servers>).
+
+1
+
+Add the MCP server
+
+Register the server with Claude Code. Run this in your terminal, not inside a `claude` session: you’re configuring the server before starting a conversation.
+
+ claude mcp add --transport http claude-code-docs https://code.claude.com/docs/mcp
+
+The parts of the command:
+
+ * `claude mcp add`: registers a server with Claude Code.
+ * `--transport http`: the server is hosted at a URL rather than run as a local process.
+ * `claude-code-docs`: a name you make up. Calling the same server `docs` would work identically. Claude Code uses whatever name you pick to label the server’s tools in Claude’s output and to refer to the server in commands like `claude mcp remove`.
+ * `https://code.claude.com/docs/mcp`: the URL where the server is hosted.
+
+The command prints a confirmation like `Added HTTP MCP server claude-code-docs with URL: https://code.claude.com/docs/mcp to local config`. The `local config` part means the server is registered to you, in this project: if you start Claude Code in a different project, this server isn’t active there. To register a server once for all your projects, add it at user scope, covered in Change server scope.
+
+2
+
+Check the connection status
+
+Confirm the server appears in your server list and check its status:
+
+ claude mcp list
+
+The server appears with a status indicator:
+
+Status| Meaning
+---|---
+`✓ Connected`| Ready to use. This is what you should see for `claude-code-docs`
+`! Needs authentication`| The server is reachable but needs a browser sign-in, or a token passed with `--header`. See Connect a server that requires sign-in
+`✗ Failed to connect`| Server didn’t respond. See Troubleshooting
+`✗ Connection error`| The connection attempt threw an error. See Troubleshooting
+`⏸ Pending approval`| A project-scoped server you haven’t approved yet. See Edit .mcp.json directly
+
+3
+
+Use the server
+
+Start a session and ask Claude to use the new server by name:
+
+ claude
+
+ Use the claude-code-docs server to look up what MCP_TIMEOUT does
+
+You don’t normally need to name a server in your prompt, since Claude chooses relevant tools on its own. Naming it here guarantees the demonstration goes through the new server rather than another tool, such as web fetch, that could answer the same question.
+
+The first time Claude calls the server, it asks for permission to use the new tool. Approve it to continue. The tool call in Claude’s output is labeled with the server name, which is how you confirm the answer came from the MCP server rather than Claude’s built-in knowledge.
+
+4
+
+Remove the server
+
+This step is optional. When you’re done experimenting, you can remove the server:
+
+ claude mcp remove claude-code-docs
+
+Each connected server takes some space in [Claude’s context window](</docs/en/how-claude-code-works#the-context-window>) because its tool names and server instructions load into every session. Removing servers you no longer use keeps that space free.
+
+##
+
+
+
+Where servers are saved
+
+The `claude mcp add` command writes the server’s details to a configuration file. By default it registers the server at `local` scope: private to you, active only in the current project. Pass `--scope user` to register it once for all your projects, or `--scope project` to share it with teammates. Change server scope walks through both.
+
+`claude mcp add` works the same in every shell, including PowerShell and Command Prompt. Inside a `claude` session, use the `/mcp` command to check and manage servers you’ve already added.
+
+There are other ways to add a server, each covered later on this page:
+
+ * Add a local server: run a program on your machine instead of connecting to a URL.
+ * Edit `.mcp.json` directly: write the JSON entry yourself instead of using the command.
+ * Connect a server that requires sign-in: add a hosted server that needs a browser sign-in before its tools work.
+
+###
+
+
+
+Find your configuration on disk
+
+The `claude mcp add` command writes the server to one of three scopes, stored across two files, depending on the `--scope` flag. You don’t need to edit these files directly, but knowing where they are helps with debugging and version control.
+
+Scope| File| Available to
+---|---|---
+`local`| `~/.claude.json`, under the entry for this project| Only you, only this project. The default
+`project`| `.mcp.json` in your project root| Everyone who clones the project
+`user`| `~/.claude.json`, under the top-level `mcpServers` key| Only you, all projects
+
+On Windows, `~/.claude.json` resolves to `%USERPROFILE%\.claude.json`, typically `C:\Users\YourName\.claude.json`. If you’ve set [`CLAUDE_CONFIG_DIR`](</docs/en/env-vars>), Claude Code reads `.claude.json` from inside that directory instead. Run `claude mcp get claude-code-docs` to see which scope holds a server’s definition. For how the scopes interact when the same server is defined in more than one, see [MCP installation scopes](</docs/en/mcp#mcp-installation-scopes>).
+
+##
+
+
+
+Change server scope
+
+A server’s scope is fixed when you add it, so changing scope means removing the entry and re-adding it at the new one. Both cases below start by removing the local entry from the first walkthrough, so the server has only one definition. If you already removed it at the end of that walkthrough, skip this command:
+
+ claude mcp remove claude-code-docs --scope local
+
+###
+
+
+
+Use a server in all your projects
+
+Re-add the server at `user` scope to make it active in every project you open, still private to you:
+
+ claude mcp add --scope user --transport http claude-code-docs https://code.claude.com/docs/mcp
+
+###
+
+
+
+Share a server with your team
+
+Re-add the server at `project` scope, which writes to `.mcp.json` in the project root:
+
+ claude mcp add --scope project --transport http claude-code-docs https://code.claude.com/docs/mcp
+
+Commit `.mcp.json` to version control. Teammates who clone the repository and start Claude Code see a prompt to approve the server, then it connects for them too.
+
+##
+
+
+
+Additional MCP server examples
+
+The first walkthrough used a hosted server that connects without any sign-in. The examples below cover the other two common shapes, with the same add, check, use flow.
+
+###
+
+
+
+Add a local server
+
+A local stdio server is a program Claude Code starts as a subprocess on your machine, rather than a service it reaches over a URL. Use one for tools that need access to local resources like a browser, your filesystem, or a database socket. The [Playwright MCP server](<https://github.com/microsoft/playwright-mcp>) is a good one to try: it gives Claude a browser it can navigate, click, and read, and it needs no account. It runs through `npx`, so it requires [Node.js](<https://nodejs.org/en/download>) 18 or later.
+
+1
+
+Add the Playwright server
+
+Register the server with the command Claude Code should run to start it:
+
+ claude mcp add playwright -- npx -y @playwright/mcp@latest
+
+This command differs from the hosted example in three ways:
+
+ * There’s no `--transport` flag, because local servers use the default `stdio` transport.
+ * Everything after the `--` separator is the command Claude Code runs to start the server.
+ * `-y` tells `npx` to install the package without prompting.
+
+Playwright drives whichever Chrome is already installed on your machine. To use a different browser, append `--browser` with the browser name, for example `--browser firefox`, after `@playwright/mcp@latest`.
+
+2
+
+Check the connection
+
+The `Added` confirmation means the entry was saved, not that the command runs. Check the connection:
+
+ claude mcp list
+
+The first check can show `✗ Failed to connect` while `npx` downloads the package, so wait a moment and run it again.
+
+3
+
+Use the browser
+
+Give Claude a task that needs the browser:
+
+ Use playwright to open https://example.com and tell me the page title
+
+A browser window opens so you can watch it work, and the tool calls in Claude’s output are labeled with the `playwright` server name and the action, like `browser_navigate`.Try pointing it at your local dev server to check that a page still renders after a change, or have it walk through a bug report step by step.
+
+###
+
+
+
+Connect a server that requires sign-in
+
+Hosted services like Sentry, Linear, and Notion run their MCP servers behind OAuth: you add the server’s URL, then sign in through your browser. The steps below use Sentry as the example. To connect a different service, substitute its URL, which you can find in the [Anthropic Directory](</docs/en/mcp#find-and-build-mcp-servers>) or the service’s documentation.
+
+1
+
+Add the server
+
+The `add` command is the same as for the docs server, with Sentry’s URL:
+
+ claude mcp add --transport http sentry https://mcp.sentry.dev/mcp
+
+After adding, `claude mcp list` shows the server with `! Needs authentication`. That’s expected: the next step completes the sign-in.
+
+2
+
+Authenticate in your browser
+
+Start a Claude Code session and open the MCP panel:
+
+ /mcp
+
+Select `sentry` from the list, press Enter, and choose `Authenticate`. Your browser opens to Sentry’s sign-in page. Approve the connection there.Back in Claude Code, the server’s status changes to connected. If sign-in fails or the browser doesn’t open, see Troubleshooting.
+
+3
+
+Use the server
+
+Ask Claude something that needs the service, like `What Sentry projects do I have access to?`, and look for tool calls labeled with the `sentry` server name in its output.
+
+Servers that authenticate with a static token instead of OAuth take the token at add time with `--header "Authorization: Bearer <token>"`. See the [GitHub example](</docs/en/mcp#example-connect-to-github-for-code-reviews>) for a worked version.
+
+##
+
+
+
+Edit .mcp.json directly
+
+Every file in the scope table uses the same JSON format for server entries. This section edits `.mcp.json`, the project-scope file. It’s the one most worth writing by hand because it’s checked into the repository, where it doubles as configuration-as-code for your team. Create `.mcp.json` in your project root. The example below defines both servers from this guide, the hosted docs server reached over HTTP and the Playwright server as a local `stdio` process:
+
+ {
+ "mcpServers": {
+ "claude-code-docs": {
+ "type": "http",
+ "url": "https://code.claude.com/docs/mcp"
+ },
+ "playwright": {
+ "type": "stdio",
+ "command": "npx",
+ "args": ["-y", "@playwright/mcp@latest"]
+ }
+ }
+ }
+
+The fields differ by server type:
+
+ * For HTTP servers, `url` is the endpoint Claude Code connects to.
+ * For stdio servers, `command` and `args` are the program it runs.
+
+After saving the file, start a new Claude Code session in the project. Claude Code reads `.mcp.json` at startup. The first time Claude Code sees a project-scoped server, it asks you to approve it. The prompt exists so a repository you clone can’t launch processes on your machine without your consent. Approve the prompt, or run `/mcp` to approve later if you missed it. Once you’ve approved, run `/mcp` and check that the servers show as connected. If one shows an error instead, see Troubleshooting.
+
+##
+
+
+
+Connect from other surfaces
+
+This guide uses the `claude mcp` CLI commands, but every Claude Code surface can connect to MCP servers:
+
+ * **Claude Code desktop app** : add servers through the [Connectors UI](</docs/en/desktop#connect-external-tools>).
+ * **Claude Desktop chat app** : a separate app from Claude Code. To copy servers from its `claude_desktop_config.json` into the CLI, run `claude mcp add-from-claude-desktop` on macOS or WSL.
+ * **VS Code** : see [Connect to external tools with MCP](</docs/en/vs-code#connect-to-external-tools-with-mcp>).
+ * **Claude Code on the web** : reads `.mcp.json` from your repository. See Edit .mcp.json directly.
+ * **Claude.ai** : connectors you add at [claude.ai/customize/connectors](<https://claude.ai/customize/connectors>) load automatically in the CLI when you sign in with that account. See [Use MCP servers from Claude.ai](</docs/en/mcp#use-mcp-servers-from-claude-ai>).
+
+##
+
+
+
+Troubleshooting
+
+If a server doesn’t connect, check its status with `/mcp` inside a session or `claude mcp list` from your shell, then match the symptom below. The `/mcp` panel also lets you reconnect or authenticate without leaving the session.
+
+/mcp shows No MCP servers configured
+
+Claude Code didn’t find any servers for the current directory. The most common causes:
+
+ * You ran `claude mcp add` from a different project. Local-scoped servers are tied to the project where you added them: the repository root, or the exact directory if you weren’t in a git repository. Re-add the server from the project you’re in now, or add it with `--scope user` so it isn’t tied to a project.
+ * You edited a configuration file at the wrong path. The correct files are `~/.claude.json` and `<project>/.mcp.json`. Claude Code doesn’t read paths such as `~/.claude/config/mcp.json`, `~/.claude/mcp.json`, or `%APPDATA%\Claude\mcp.json`.
+
+Status shows Failed to connect or Connection error
+
+Both statuses mean the server didn’t start or the URL didn’t respond. They can also appear for HTTP servers that expect a token rather than the browser sign-in covered in Connect a server that requires sign-in.For HTTP servers, confirm the URL is reachable from your machine:
+
+ curl -I https://mcp.sentry.dev/mcp
+
+In PowerShell, use `curl.exe` instead of `curl` so the request goes to the real curl binary rather than the `Invoke-WebRequest` alias.The response tells you which kind of problem you have:
+
+ * A `404` or `405`: the server is up. Many MCP endpoints answer only POST requests, so this still confirms the URL is reachable from your machine.
+ * A `401` or `403`: the server is up and you need to authenticate. Use the browser sign-in in Connect a server that requires sign-in, or for servers that take a token instead, like GitHub’s, pass it with `--header "Authorization: Bearer <token>"` on the `claude mcp add` command.
+ * No response at all: check the URL and your network.
+
+For stdio servers, run the configured command directly in your terminal to see the underlying error. For the Playwright server from this guide, run:
+
+ npx -y @playwright/mcp@latest
+
+What happens next tells you where the problem is:
+
+ * The command starts and waits for input: the server itself works. Run `claude mcp get <name>` and confirm the command shown there matches what you just ran. If the command shown differs from what you typed, you likely omitted the `--` separator before the server command. Remove the server and re-add it with `--` in place. If you wrote `.mcp.json` by hand, check its syntax and location.
+ * The command errors: the message names what’s missing, such as Node.js or a browser.
+
+Connection timed out at startup
+
+The server took longer than the default 30-second startup timeout. A stdio server’s first run can be slow while `npx` downloads the package. Increase the limit with the [`MCP_TIMEOUT`](</docs/en/env-vars>) environment variable, in milliseconds:
+
+ MCP_TIMEOUT=60000 claude
+
+In PowerShell, set the variable before the command on the same line:
+
+ $env:MCP_TIMEOUT = "60000"; claude
+
+Server already exists
+
+You’ve already added a server with that name at the same scope. Either remove the existing entry first or choose a different name:
+
+ claude mcp remove claude-code-docs
+
+If the name exists at more than one scope, `remove` reports `exists in multiple scopes`. Pass `--scope` to choose which copy to delete, for example `claude mcp remove claude-code-docs --scope local`.
+
+Server connects but no tools appear
+
+Run `/mcp` inside a session and select the server to see its tool list. If the list is empty, the server started but didn’t register any tools, which usually means it’s missing a required environment variable such as an API key.Pass the variable with `--env KEY=value` on `claude mcp add`, or in the `env` field of the server’s `.mcp.json` entry. The server’s documentation lists the variables it needs.
+
+Changes to .mcp.json don't take effect
+
+Claude Code reads `.mcp.json` at session start. Exit and restart the session after editing the file.If your servers still don’t appear, run `/mcp` and look for a parse warning. Claude Code skips malformed entries and shows the offending field there.If you previously rejected the server when prompted, reset project approvals:
+
+ claude mcp reset-project-choices
+
+OAuth sign-in fails or browser doesn't open
+
+Run `/mcp`, select the server, and choose `Authenticate` again. If the browser doesn’t open automatically, copy the URL shown in the terminal and open it manually. See [Authenticate with remote MCP servers](</docs/en/mcp#authenticate-with-remote-mcp-servers>) for fixed callback ports and pre-configured credentials.
+
+##
+
+
+
+Next steps
+
+With one server connected, explore the rest of what MCP enables:
+
+ * [Find more MCP servers](</docs/en/mcp#find-and-build-mcp-servers>) in the Anthropic Directory
+ * [Share servers with your team](</docs/en/mcp#mcp-installation-scopes>) using installation scopes
+ * [Manage MCP access for an organization](</docs/en/managed-mcp>) with managed settings and policy controls
+ * [Reference MCP resources](</docs/en/mcp#use-mcp-resources>) in prompts with @ mentions
+ * [Run MCP prompts as commands](</docs/en/mcp#use-mcp-prompts-as-commands>) from the `/` menu
+ * [Build your own server](<https://modelcontextprotocol.io/quickstart/server>) with the MCP SDK
--- a/model-config.md
+++ b/model-config.md
@@ -343,7 +343,7 @@
export ANTHROPIC_DEFAULT_OPUS_MODEL='claude-opus-4-8[1m]'
-The `[1m]` suffix applies the 1M context window to all usage of that alias, including `opusplan`.
+The `[1m]` suffix applies the 1M context window to all usage of the `opus` and `sonnet` aliases. It does not extend the plan-mode Opus phase of `opusplan`, which remains capped at 200K.
* Claude Code strips the suffix before sending the model ID to your provider.
* Only append `[1m]` when the underlying model [supports 1M context](<https://platform.claude.com/docs/en/build-with-claude/context-windows#1m-token-context-window>).
--- a/overview.md
+++ b/overview.md
@@ -114,7 +114,7 @@
Connect your tools with MCP
-The [Model Context Protocol (MCP)](</docs/en/mcp>) is an open standard for connecting AI tools to external data sources. With MCP, Claude Code can read your design docs in Google Drive, update tickets in Jira, pull data from Slack, or use your own custom tooling.
+The [Model Context Protocol (MCP)](</docs/en/mcp>) is an open standard for connecting AI tools to external data sources. With MCP, Claude Code can read your design docs in Google Drive, update tickets in Jira, pull data from Slack, or use your own custom tooling. The [MCP quickstart](</docs/en/mcp-quickstart>) connects your first server end to end.
Customize with instructions, skills, and hooks
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -208,7 +208,7 @@
Each action goes through a fixed decision order. The first matching step wins:
- 1. Actions matching your [allow or deny rules](</docs/en/permissions#manage-permissions>) resolve immediately
+ 1. Actions matching your [allow or deny rules](</docs/en/permissions#manage-permissions>) resolve immediately, except writes to protected paths, which route to the classifier even when an allow rule matches
2. Read-only actions and file edits in your working directory are auto-approved, except writes to protected paths
3. Everything else goes to the classifier
4. If the classifier blocks, Claude receives the reason and tries an alternative
--- a/plugins.md
+++ b/plugins.md
@@ -17,7 +17,7 @@
Approach| Skill names| Best for
---|---|---
**Standalone** (`.claude/` directory)| `/hello`| Personal workflows, project-specific customizations, quick experiments
-**Plugins** (directories with `.claude-plugin/plugin.json`)| `/plugin-name:hello`| Sharing with teammates, distributing to community, versioned releases, reusable across projects
+**Plugins** (self-contained directories with skills, agents, hooks, or a `.claude-plugin/plugin.json` manifest)| `/plugin-name:hello`| Sharing with teammates, distributing to community, versioned releases, reusable across projects
**Use standalone configuration when** :
@@ -64,7 +64,7 @@
Create the plugin directory
-Every plugin lives in its own directory containing a manifest and your skills, agents, or hooks. Create one now:
+Every plugin lives in its own directory containing your skills, agents, or hooks, optionally alongside a `.claude-plugin/plugin.json` manifest. Create one now:
mkdir my-first-plugin
--- a/plugins-reference.md
+++ b/plugins-reference.md
@@ -224,8 +224,6 @@
`settings`| Settings passed via `workspace/didChangeConfiguration`
`workspaceFolder`| Workspace folder path for the server
`startupTimeout`| Max time to wait for server startup (milliseconds)
-`shutdownTimeout`| Max time to wait for graceful shutdown (milliseconds)
-`restartOnCrash`| Whether to automatically restart the server if it crashes
`maxRestarts`| Maximum number of restart attempts before giving up
**You must install the language server binary separately.** LSP plugins configure how Claude Code connects to a language server, but they don’t include the server itself. If you see `Executable not found in $PATH` in the `/plugin` Errors tab, install the required binary for your language.
--- a/prompt-caching.md
+++ b/prompt-caching.md
@@ -16,7 +16,7 @@
Layer| Content| Changes when
---|---|---
-System prompt| Core instructions, tool definitions, output style| An MCP server connects or disconnects, or Claude Code is upgraded
+System prompt| Core instructions, tool definitions, output style| The set of loaded tool definitions changes, or Claude Code is upgraded
Project context| CLAUDE.md, auto memory, unscoped rules| Session starts, or after `/clear` or `/compact`
Conversation| Your messages, Claude’s responses, tool results| Every turn
@@ -25,7 +25,7 @@
* **Model** : each model has its own cache. Switching models recomputes the entire request even when the content is identical. See Switching models below.
* **Effort level** : each effort level has its own cache for the same model. Changing it mid-session recomputes the entire request, and Claude Code asks you to confirm before applying the change. See Changing effort level below.
-Pick your model, effort level, and MCP servers at the top of a session, then save `/compact` for natural breaks between tasks. The fewer changes you make mid-task, the higher your cache hit rate.
+Pick your model and effort level at the top of a session, then save `/compact` for natural breaks between tasks. The fewer changes you make mid-task, the higher your cache hit rate.
###
@@ -48,11 +48,12 @@
Actions that invalidate the cache
-These actions cause the next request to miss part or all of the cache. You see a one-time slower, more expensive turn, after which the new prefix is cached. Most of them are avoidable mid-task once you know they have a cost. A model switch or an MCP reconnect can feel free until you notice the slower turn that follows.
+These actions cause the next request to miss part or all of the cache. You see a one-time slower, more expensive turn, after which the new prefix is cached. Most of them are avoidable mid-task once you know they have a cost. A model switch can feel free until you notice the slower turn that follows.
* Switching models
* Changing effort level
* Connecting or disconnecting an MCP server
+ * Enabling or disabling a plugin
* Denying an entire tool
* Compacting the conversation
* Upgrading Claude Code
@@ -79,7 +80,20 @@
Connecting or disconnecting an MCP server
-Tool definitions sit in the system prompt layer, so the cache invalidates when the set of MCP tools available to Claude changes between turns. The most common cause is an [MCP server](</docs/en/mcp>) connecting or disconnecting mid-session, which can happen without any action on your part: a stdio server’s process exits, an HTTP session expires, or a server [reconnects automatically after a transient failure](</docs/en/mcp#automatic-reconnection>). A connected server can also push a [dynamic tool update](</docs/en/mcp#dynamic-tool-updates>) that changes its tool list. Editing your MCP config does not by itself change the cache. The new config takes effect only after a restart, which is when the server connects or disconnects. [MCP tool search](</docs/en/mcp#scale-with-mcp-tool-search>) reduces how much each tool contributes to the prefix by deferring full tool definitions, but the set of tool names still has to stay stable for the cache to remain valid.
+Tool definitions sit in the system prompt layer, so the cache invalidates when the set of tool definitions in the request changes between turns. Whether an [MCP server](</docs/en/mcp>) change does this depends on whether its tools are deferred by [tool search](</docs/en/mcp#scale-with-mcp-tool-search>) or loaded into the prefix:
+
+ * **Deferred tools** , the default on supported models: a server connecting, disconnecting, or changing its tool list only appends new content and doesn’t disturb anything already cached.
+ * **Tools loaded into the prefix** : any change to them invalidates the cache. This happens when [tool search is unavailable or disabled](</docs/en/mcp#configure-tool-search>), such as on Haiku models, on Vertex AI, or with a custom `ANTHROPIC_BASE_URL` gateway. It also happens for a server or tool marked [`alwaysLoad`](</docs/en/mcp#exempt-a-server-from-deferral>), and for definitions kept upfront by [threshold-based loading](</docs/en/mcp#configure-tool-search>).
+
+When tools load into the prefix, the most common cause of an invalidation is a server connecting or disconnecting mid-session, which can happen without any action on your part: a stdio server’s process exits, an HTTP session expires, or a server [reconnects automatically after a transient failure](</docs/en/mcp#automatic-reconnection>). A connected server can also push a [dynamic tool update](</docs/en/mcp#dynamic-tool-updates>) that changes its tool list. Editing your MCP config does not by itself change the cache. The new config takes effect only after a restart, which is when the server connects or disconnects.
+
+###
+
+
+
+Enabling or disabling a plugin
+
+[Plugins](</docs/en/plugins>) bundle several component types, and the cost of a change depends on which components the plugin provides. Skills, commands, agents, hooks, LSP servers, monitors, and themes never invalidate the cache: anything they add to the request is appended after the existing conversation, so the next request pays for the new content but still reads everything before it from the cache. The exception is a plugin that provides [MCP servers](</docs/en/plugins-reference#mcp-servers>). Enabling or disabling one follows the same rules as connecting or disconnecting an MCP server: the cache survives when the server’s tools are deferred, and the next request re-reads the entire conversation when they load into the prefix. Plugin changes apply when you run [`/reload-plugins`](</docs/en/discover-plugins#apply-plugin-changes-without-restarting>) or start a new session. The cost, whether appended announcements or a full re-read, shows up on the first turn after the reload, not when you run `/plugin install`, `/plugin enable`, or `/plugin disable`. Disabling a plugin you enabled earlier in the session restores the previous request shape. If that prefix is still within its cache lifetime, the next request reads the older cache entry instead of rebuilding.
###
@@ -87,7 +101,7 @@
Denying an entire tool
-Adding a bare tool name like `Bash` or `WebFetch` as a [deny rule](</docs/en/permissions#manage-permissions>) removes that tool from Claude’s context entirely. Tool definitions sit in the system prompt layer, so adding or removing one of these rules mid-session invalidates the cache the same way an MCP server connecting or disconnecting does. The change takes effect on the next turn whether you add it through `/permissions` or by [editing a settings file directly](</docs/en/settings#when-edits-take-effect>). Only a bare tool name, or the equivalent `Bash(*)` form, has this effect. Scoped deny rules like `Bash(rm *)`, and all allow and ask rules, don’t change which tools Claude sees. Claude Code checks them when Claude attempts a call, leaving the prefix intact.
+Adding a bare tool name like `Bash` or `WebFetch` as a [deny rule](</docs/en/permissions#manage-permissions>) removes that tool from Claude’s context entirely. Built-in tool definitions load into the system prompt layer, so adding or removing one of these rules mid-session invalidates the cache. The change takes effect on the next turn whether you add it through `/permissions` or by [editing a settings file directly](</docs/en/settings#when-edits-take-effect>). Only a bare tool name, or the equivalent `Bash(*)` form, has this effect. Scoped deny rules like `Bash(rm *)`, and all allow and ask rules, don’t change which tools Claude sees. Claude Code checks them when Claude attempts a call, leaving the prefix intact.
###
--- a/python.md
+++ b/python.md
@@ -919,7 +919,7 @@
`allowed_tools`| `list[str]`| `[]`| Tools to auto-approve without prompting. This does not restrict Claude to only these tools; unlisted tools fall through to `permission_mode` and `can_use_tool`. Use `disallowed_tools` to block tools. See [Permissions](</docs/en/agent-sdk/permissions#allow-and-deny-rules>)
`system_prompt`| `str | SystemPromptPreset | None`| `None`| System prompt configuration. Pass a string for custom prompt, or use `{"type": "preset", "preset": "claude_code"}` for Claude Code’s system prompt. Add `"append"` to extend the preset
`mcp_servers`| `dict[str, McpServerConfig] | str | Path`| `{}`| MCP server configurations or path to config file
-`strict_mcp_config`| `bool`| `False`| When `True`, use only the servers passed in `mcp_servers` and ignore project `.mcp.json`, user settings, and plugin-provided MCP servers. Maps to the CLI `--strict-mcp-config` flag
+`strict_mcp_config`| `bool`| `False`| When `True`, use only the servers passed in `mcp_servers` and ignore project `.mcp.json`, user settings, plugin-provided MCP servers, and [claude.ai connectors](</docs/en/mcp#use-mcp-servers-from-claude-ai>). Maps to the CLI `--strict-mcp-config` flag
`permission_mode`| `PermissionMode | None`| `None`| Permission mode for tool usage
`continue_conversation`| `bool`| `False`| Continue the most recent conversation
`resume`| `str | None`| `None`| Session ID to resume
@@ -951,7 +951,7 @@
`plugins`| `list[SdkPluginConfig]`| `[]`| Load custom plugins from local paths. See [Plugins](</docs/en/agent-sdk/plugins>) for details
`sandbox`| `SandboxSettings` ` | None`| `None`| Configure sandbox behavior programmatically. See Sandbox settings for details
`setting_sources`| `list[SettingSource] | None`| `None` (CLI defaults: all sources)| Control which filesystem settings to load. Pass `[]` to disable user, project, and local settings. Managed policy settings load regardless. See [Use Claude Code features](</docs/en/agent-sdk/claude-code-features#what-settingsources-does-not-control>)
-`skills`| `list[str] | Literal["all"] | None`| `None`| Skills available to the session. Pass `"all"` to enable every discovered skill, or a list of skill names. When set, the SDK enables the Skill tool automatically without listing it in `allowed_tools`. See [Skills](</docs/en/agent-sdk/skills>)
+`skills`| `list[str] | Literal["all"] | None`| `None`| Skills available to the session. Pass `"all"` to enable every discovered skill, or a list of skill names. When set, the SDK adds the Skill tool to `allowed_tools` automatically. If you also pass `tools`, include `"Skill"` in that list. See [Skills](</docs/en/agent-sdk/skills>)
`max_thinking_tokens`| `int | None`| `None`| _Deprecated_ \- Maximum tokens for thinking blocks. Use `thinking` instead
`thinking`| `ThinkingConfig` ` | None`| `None`| Controls extended thinking behavior. Takes precedence over `max_thinking_tokens`
`effort`| `EffortLevel` ` | None`| `None`| Effort level for thinking depth
@@ -3066,7 +3066,7 @@
ListMcpResources
-**Tool name:** `ListMcpResources` **Input:**
+**Tool name:** `ListMcpResourcesTool` **Input:**
{
"server": str | None # Optional server name to filter resources by
@@ -3093,7 +3093,7 @@
ReadMcpResource
-**Tool name:** `ReadMcpResource` **Input:**
+**Tool name:** `ReadMcpResourceTool` **Input:**
{
"server": str, # The MCP server name
@@ -3527,7 +3527,7 @@
`SandboxNetworkConfig`
-Network-specific configuration for sandbox mode.
+Network-specific configuration for sandbox mode. These settings apply to sandboxed Bash commands when `enabled` is `True` in the parent `SandboxSettings`. They do not restrict the WebFetch tool, which uses [permission rules](</docs/en/permissions#webfetch>) instead.
class SandboxNetworkConfig(TypedDict, total=False):
allowedDomains: list[str]
--- a/scheduled-tasks.md
+++ b/scheduled-tasks.md
@@ -44,7 +44,7 @@
Prompt only| `/loop check the deploy`| Your prompt runs at an interval Claude chooses each iteration
Interval only, or nothing| `/loop`| The built-in maintenance prompt runs, or your `loop.md` if one exists
-You can also pass another command as the prompt, for example `/loop 20m /review-pr 1234`, to re-run a packaged workflow each iteration.
+You can also pass another command as the prompt, for example `/loop 20m /review-pr 1234`, to re-run a saved skill or command each iteration.
###
--- a/security-guidance.md
+++ b/security-guidance.md
@@ -273,5 +273,5 @@
To go deeper on the pieces this page touches:
* [Code Review](</docs/en/code-review>): set up the PR-time multi-agent review
- * [Automate workflows with hooks](</docs/en/hooks-guide>): build your own checks at the same lifecycle points
+ * [Automate actions with hooks](</docs/en/hooks-guide>): build your own checks at the same lifecycle points
* [Discover and install plugins](</docs/en/discover-plugins#official-anthropic-marketplace>): browse other official plugins
--- a/settings.md
+++ b/settings.md
@@ -564,7 +564,7 @@
Verify active settings
-Run `/status` inside Claude Code to see which settings sources are active. The Status tab includes a `Setting sources` line that lists each layer Claude Code loaded for the current session, such as `User settings` or `Project local settings`. When [managed settings](</docs/en/managed-settings>) are in effect, the entry shows the delivery channel in parentheses, for example `Enterprise managed settings (remote)`, `(plist)`, `(HKLM)`, `(HKCU)`, or `(file)`. A layer appears in the list only when that source is loaded with at least one key, so an empty list means no settings sources were found. The `Setting sources` line confirms which sources are being read. It does not show which layer supplied each individual key. The Config tab in the same dialog is an editor for a fixed set of toggles such as theme and verbose output, not a view of your `settings.json` contents. If a settings file contains errors, such as invalid JSON or a value that fails validation, `/status` reports the issue so you can fix it.
+Run `/status` inside Claude Code to see which settings sources are active. The Status tab includes a `Setting sources` line that lists each layer Claude Code loaded for the current session, such as `User settings` or `Project local settings`. When [managed settings](</docs/en/admin-setup#decide-how-settings-reach-devices>) are in effect, the entry shows the delivery channel in parentheses, for example `Enterprise managed settings (remote)`, `(plist)`, `(HKLM)`, `(HKCU)`, or `(file)`. A layer appears in the list only when that source is loaded with at least one key, so an empty list means no settings sources were found. The `Setting sources` line confirms which sources are being read. It does not show which layer supplied each individual key. The Config tab in the same dialog is an editor for a fixed set of toggles such as theme and verbose output, not a view of your `settings.json` contents. If a settings file contains errors, such as invalid JSON or a value that fails validation, `/status` reports the issue so you can fix it.
###
--- a/slash-commands.md
+++ b/slash-commands.md
@@ -216,7 +216,7 @@
description: Fix a GitHub issue
---
- Fix issue #$1 with priority $2.
+ Fix issue #$0 with priority $1.
Check the issue description and implement the necessary changes.
Use in SDK:
@@ -232,7 +232,7 @@
prompt: "/fix-issue 123 high",
options: { maxTurns: 5 }
})) {
- // Command will process with $1="123" and $2="high"
+ // Command will process with $0="123" and $1="high"
if (message.type === "result" && message.subtype === "success") {
console.log("Issue fixed:", message.result);
}
--- a/streaming-output.md
+++ b/streaming-output.md
@@ -262,9 +262,6 @@
Known limitations
-Some SDK features are incompatible with streaming:
-
- * **Extended thinking** : when you explicitly set `max_thinking_tokens` (Python) or `maxThinkingTokens` (TypeScript), `StreamEvent` messages are not emitted. You’ll only receive complete messages after each turn. Note that thinking is disabled by default in the SDK, so streaming works unless you enable it.
* **Structured output** : the JSON result appears only in the final `ResultMessage.structured_output`, not as streaming deltas. See [structured outputs](</docs/en/agent-sdk/structured-outputs>) for details.
##
--- a/streaming-vs-single-mode.md
+++ b/streaming-vs-single-mode.md
@@ -48,10 +48,6 @@
## Tool Integration
Full access to all tools and custom MCP servers during the session
-
-## Hooks Support
-
-Use lifecycle hooks to customize behavior at various points
## Real-time Feedback
@@ -142,7 +138,7 @@
Use single message input when:
* You need a one-shot response
- * You do not need image attachments, hooks, etc.
+ * You do not need image attachments or mid-session control methods
* You need to operate in a stateless environment, such as a lambda function
###
@@ -156,7 +152,6 @@
* Direct image attachments in messages
* Dynamic message queueing
* Real-time interruption
- * Hook integration
* Natural multi-turn conversations
###
--- a/troubleshooting.md
+++ b/troubleshooting.md
@@ -12,7 +12,7 @@
Login loops, OAuth errors, `403 Forbidden`, “organization disabled”, Bedrock/Vertex/Foundry credentials| [Troubleshoot installation and login](</docs/en/troubleshoot-install#login-and-authentication>)
Settings not applying, hooks not firing, MCP servers not loading| [Debug your configuration](</docs/en/debug-your-config>)
`API Error: 5xx`, `529 Overloaded`, `429`, request validation errors| [Error reference](</docs/en/errors>)
-`model not found` or `you may not have access to it`| [Error reference](</docs/en/errors#theres-an-issue-with-the-selected-model>)
+`model not found` or `you may not have access to it`| [Error reference](</docs/en/errors#there%E2%80%99s-an-issue-with-the-selected-model>)
VS Code extension not connecting or detecting Claude| [VS Code integration](</docs/en/vs-code#fix-common-issues>)
JetBrains plugin or IDE not detected| [JetBrains integration](</docs/en/jetbrains#troubleshooting>)
High CPU or memory, slow responses, hangs, search not finding files| Performance and stability below
--- a/typescript.md
+++ b/typescript.md
@@ -540,10 +540,10 @@
`sessionStoreFlush`| `'batched' | 'eager'`| `'batched'`| _Alpha._ Flush mode for `sessionStore`. Ignored when `sessionStore` is not set
`settings`| `string | Settings`| `undefined`| Inline [settings](</docs/en/settings>) object or path to a settings file. Populates the flag-settings layer in the [precedence order](</docs/en/settings#settings-precedence>). Change at runtime with `applyFlagSettings()`
`settingSources`| `SettingSource``[]`| CLI defaults (all sources)| Control which filesystem settings to load. Pass `[]` to disable user, project, and local settings. Managed policy settings load regardless. See [Use Claude Code features](</docs/en/agent-sdk/claude-code-features#what-settingsources-does-not-control>)
-`skills`| `string[] | 'all'`| `undefined`| Skills available to the session. Pass `'all'` to enable every discovered skill, or a list of skill names. When set, the SDK enables the Skill tool automatically without listing it in `allowedTools`. See [Skills](</docs/en/agent-sdk/skills>)
+`skills`| `string[] | 'all'`| `undefined`| Skills available to the session. Pass `'all'` to enable every discovered skill, or a list of skill names. When set, the SDK adds the Skill tool to `allowedTools` automatically. If you also pass `tools`, include `'Skill'` in that list. See [Skills](</docs/en/agent-sdk/skills>)
`spawnClaudeCodeProcess`| `(options: SpawnOptions) => SpawnedProcess`| `undefined`| Custom function to spawn the Claude Code process. Use to run Claude Code in VMs, containers, or remote environments
`stderr`| `(data: string) => void`| `undefined`| Callback for stderr output
-`strictMcpConfig`| `boolean`| `false`| Use only the servers passed in `mcpServers` and ignore project `.mcp.json`, user settings, and plugin-provided MCP servers
+`strictMcpConfig`| `boolean`| `false`| Use only the servers passed in `mcpServers` and ignore project `.mcp.json`, user settings, plugin-provided MCP servers, and [claude.ai connectors](</docs/en/mcp#use-mcp-servers-from-claude-ai>)
`systemPrompt`| `string | { type: 'preset'; preset: 'claude_code'; append?: string; excludeDynamicSections?: boolean }`| `undefined` (minimal prompt)| System prompt configuration. Pass a string for custom prompt, or `{ type: 'preset', preset: 'claude_code' }` to use Claude Code’s system prompt. When using the preset object form, add `append` to extend it with additional instructions, and set `excludeDynamicSections: true` to move per-session context into the first user message for [better prompt-cache reuse across machines](</docs/en/agent-sdk/modifying-system-prompts#improve-prompt-caching-across-users-and-machines>)
`taskBudget`| `{ total: number }`| `undefined`| _Alpha._ API-side task budget in tokens. When set, the model is told its remaining token budget so it can pace tool use and wrap up before the limit
`thinking`| `ThinkingConfig`| `{ type: 'adaptive' }` for supported models| Controls Claude’s thinking/reasoning behavior. See `ThinkingConfig` for options
@@ -2309,7 +2309,7 @@
ListMcpResources
-**Tool name:** `ListMcpResources`
+**Tool name:** `ListMcpResourcesTool`
type ListMcpResourcesInput = {
server?: string;
@@ -2323,7 +2323,7 @@
ReadMcpResource
-**Tool name:** `ReadMcpResource`
+**Tool name:** `ReadMcpResourceTool`
type ReadMcpResourceInput = {
server: string;
@@ -2902,7 +2902,7 @@
ListMcpResources
-**Tool name:** `ListMcpResources`
+**Tool name:** `ListMcpResourcesTool`
type ListMcpResourcesOutput = Array<{
uri: string;
@@ -2920,7 +2920,7 @@
ReadMcpResource
-**Tool name:** `ReadMcpResource`
+**Tool name:** `ReadMcpResourceTool`
type ReadMcpResourceOutput = {
contents: Array<{
@@ -3724,7 +3724,7 @@
`SandboxNetworkConfig`
-Network-specific configuration for sandbox mode.
+Network-specific configuration for sandbox mode. These settings apply to sandboxed Bash commands when `enabled` is `true` in the parent `SandboxSettings`. They do not restrict the WebFetch tool, which uses [permission rules](</docs/en/permissions#webfetch>) instead.
type SandboxNetworkConfig = {
allowedDomains?: string[];
--- a/voice-dictation.md
+++ b/voice-dictation.md
@@ -7,6 +7,8 @@
Speak your prompts instead of typing them in the Claude Code CLI. Your speech is transcribed live into the prompt input, so you can mix voice and typing in the same message. Enable dictation with `/voice`, then either hold a key while you speak or tap once to start and again to send.
Voice dictation requires Claude Code v2.1.69 or later. Tap mode requires v2.1.116 or later. Check your version with `claude --version`.
+
+Dictation also works in [agent view](</docs/en/agent-view#peek-and-reply>). Hold or tap your push-to-talk key while the dispatch input or a peek-panel reply is focused to dictate to a background session.
##
--- a/workflows.md
+++ b/workflows.md
@@ -19,18 +19,18 @@
When to use a workflow
-[Subagents](</docs/en/sub-agents>), [skills](</docs/en/skills>), and workflows can all run a multi-step task. The difference is who holds the plan:
-
-| Subagents| Skills| Workflows
----|---|---|---
-What it is| A worker Claude spawns| Instructions Claude follows| A script the runtime executes
-Who decides what runs next| Claude, turn by turn| Claude, following the prompt| The script
-Where intermediate results live| Claude’s context window| Claude’s context window| Script variables
-What’s repeatable| The worker definition| The instructions| The orchestration itself
-Scale| A few delegated tasks per turn| Same as subagents| Dozens to hundreds of agents per run
-Interruption| Restarts the turn| Restarts the turn| Resumable in the same session
-
-A workflow moves the plan into code. With subagents and skills, Claude is the orchestrator: it decides turn by turn what to spawn next, and every result lands in Claude’s context. A workflow script holds the loop, the branching, and the intermediate results itself, so Claude’s context holds only the final answer. Moving the plan into code also lets a workflow apply a repeatable quality pattern, not just run more agents: it can have independent agents adversarially review each other’s findings before they’re reported, or draft a plan from several angles and weigh them against each other, so you get a more trustworthy result than a single pass.
+[Subagents](</docs/en/sub-agents>), [skills](</docs/en/skills>), [agent teams](</docs/en/agent-teams>), and workflows can all run a multi-step task. The difference is who holds the plan:
+
+| Subagents| Skills| Agent teams| Workflows
+---|---|---|---|---
+What it is| A worker Claude spawns| Instructions Claude follows| A lead agent supervising peer sessions| A script the runtime executes
+Who decides what runs next| Claude, turn by turn| Claude, following the prompt| The lead agent, turn by turn| The script
+Where intermediate results live| Claude’s context window| Claude’s context window| A shared task list| Script variables
+What’s repeatable| The worker definition| The instructions| The team definition| The orchestration itself
+Scale| A few delegated tasks per turn| Same as subagents| A handful of long-running peers| Dozens to hundreds of agents per run
+Interruption| Restarts the turn| Restarts the turn| Teammates keep running| Resumable in the same session
+
+A workflow moves the plan into code. With subagents, skills, and agent teams, Claude is the orchestrator: it decides turn by turn what to spawn or assign next, and every result lands in a context window. A workflow script holds the loop, the branching, and the intermediate results itself, so Claude’s context holds only the final answer. Moving the plan into code also lets a workflow apply a repeatable quality pattern, not just run more agents: it can have independent agents adversarially review each other’s findings before they’re reported, or draft a plan from several angles and weigh them against each other, so you get a more trustworthy result than a single pass.
##
@@ -132,7 +132,7 @@
Run a workflow to audit every API endpoint under src/routes/ for missing auth checks
-Claude Code highlights the word in your input and Claude writes a workflow script for the task instead of working through it turn by turn. If the run does what you wanted, you can save it as a command afterward. If Claude Code highlights the word when you didn’t mean to trigger one, press `alt+w` to ignore it for this prompt, or press backspace while the cursor is right after the highlighted word. To stop the word from triggering at all, turn off Workflow keyword trigger in `/config`.
+Claude Code highlights the word in your input and Claude writes a workflow script for the task instead of working through it turn by turn. If you didn’t mean to start a workflow, press `Option+W` on macOS or `Alt+W` on Windows and Linux to dismiss the highlight for this prompt, or press backspace while the cursor is right after the highlighted word. To stop the word from triggering at all, turn off Workflow keyword trigger in `/config`. If the run does what you wanted, you can save it as a command afterward. If you already have an orchestrator built another way, such as a folder of subagent prompts or a skill that fans work out, you can point Claude at it and ask for a workflow that does the same thing.
###
@@ -182,13 +182,25 @@
Press Enter to save. The workflow runs as `/<name>` in future sessions from either location. If a project workflow and a personal workflow share a name, the project one runs.
+###
+
+
+
+Pass input to a saved workflow
+
+A saved workflow can accept input through the `args` parameter. The script reads it as a global named `args`. Use this to supply a research question, a list of target paths, or a configuration object at invocation time instead of editing the script for each run. The following prompt runs a saved workflow with a list of issue numbers:
+
+ > Run /triage-issues on issues 1024, 1025, and 1030
+
+Claude passes the list as structured data, so the script can call array and object methods on `args` directly without parsing it first. If `args` is omitted, the global is `undefined` inside the script.
+
##
How a workflow runs
-The workflow runtime executes the script in an isolated environment, separate from your conversation. Intermediate results stay in script variables instead of landing in Claude’s context. The runtime tracks each agent’s result as the run progresses, which is what makes a run resumable within the same session.
+The workflow runtime executes the script in an isolated environment, separate from your conversation. Intermediate results stay in script variables instead of landing in Claude’s context. Every run writes its script to a file under your session’s directory in `~/.claude/projects/`. Claude receives the path when the run starts, so you can ask for it. You can open that file to read the orchestration Claude wrote, diff it against a previous run’s script, or edit it and ask Claude to relaunch from the edited version. The runtime tracks each agent’s result as the run progresses, which is what makes a run resumable within the same session.
###
@@ -227,7 +239,7 @@
Cost
-A workflow spawns many agents, so a single run can use meaningfully more tokens than working through the same task in conversation. Runs count toward your plan’s usage and rate limits like any other session. You can stop a running workflow from `/workflows` at any time without losing completed work. Every agent in a workflow uses your session’s model unless the script routes a stage to a different one. To control the model cost:
+A workflow spawns many agents, so a single run can use meaningfully more tokens than working through the same task in conversation. Runs count toward your plan’s usage and rate limits like any other session. To gauge the spend before committing to a large task, run the workflow on a small slice first: one directory instead of the whole repo, or a narrow question instead of a broad one. The `/workflows` view shows each agent’s token usage as the run progresses, and you can stop the run there at any time without losing completed work. The runtime’s agent caps limit how many agents a single run can spawn, which bounds the cost of a runaway script. Every agent in a workflow uses your session’s model unless the script routes a stage to a different one. To control the model cost:
* Check `/model` before a large run if you usually switch to a smaller model for routine work
* Ask Claude to use a smaller model for stages that don’t need the strongest one when you describe the task