modified Manage multiple agents with agent view View current →
--- a/agent-view.md +++ b/agent-view.md @@ -66,7 +66,7 @@ Monitor sessions with agent view -Run `claude agents` to open agent view. It takes over the full terminal and lists every session grouped by state, with pinned sessions and the ones that need you at the top. Each row shows the session’s name, current activity, and how long ago it last changed. The list shows every background session you’ve started, across all your projects. A session working in one repository and another in a different worktree both appear here, regardless of which directory you opened agent view from. Interactive sessions you have open in other terminals don’t appear until you background them. [Subagents](</docs/en/sub-agents>) and [teammates](</docs/en/agent-teams>) a session spawns aren’t listed as separate rows. +Run `claude agents` to open agent view. It takes over the full terminal and lists every session grouped by state, with pinned sessions and the ones that need you at the top. Each row shows the session’s name, current activity, and how long ago it last changed. The list shows every background session you’ve started, across all your projects. A session working in one repository and another in a different worktree both appear here, regardless of which directory you opened agent view from. Interactive sessions you have open in other terminals don’t appear until you background them. [Subagents](</docs/en/sub-agents>) and [teammates](</docs/en/agent-teams>) a session spawns aren’t listed as separate rows. To scope the view to one project, launch with `claude agents --cwd <path>`. Only sessions started under that directory appear, including any running in a [worktree](</docs/en/worktrees>) dispatched from it. Pinned ✽ clawd walk cycle Write assets/sprites/clawd-walk.png 3m @@ -273,6 +273,10 @@ claude --agent code-reviewer --bg "address review comments on PR 1234" +Pass `--name` to set the session’s display name in agent view instead of the auto-generated one: + + claude --bg --name "flaky-test-fix" "investigate the flaky SettingsChangeDetector test" + After backgrounding, Claude prints the session’s short ID and the commands for managing it: backgrounded · 7c5dcf5d @@ -307,9 +311,11 @@ Permission mode, model, and effort -A dispatched session reads its [settings](</docs/en/settings>) and [permission mode](</docs/en/permissions>) from the directory it runs in, the same as if you had started `claude` there. To set defaults for every session you dispatch from agent view, pass any of `--permission-mode`, `--model`, or `--effort` 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>). To set defaults for every session you dispatch from agent view, pass any of `--permission-mode`, `--model`, or `--effort` when opening it: claude agents --permission-mode plan --model opus --effort high + +Passing `--permission-mode`, `--model`, or `--effort` to `claude agents` requires Claude Code v2.1.142 or later. Earlier versions reject these flags with an unknown-option error. The active defaults appear in the footer below the dispatch input. Without these flags, the session uses the `defaultMode` from that directory’s settings or the `permissionMode` from the dispatched [subagent’s frontmatter](</docs/en/sub-agents#supported-frontmatter-fields>), and the model shown in the agent view header. Using `bypassPermissions` or `auto` is refused until you have accepted that mode by running `claude` with it once interactively, since those modes let a session you aren’t watching act without approval. The same applies whether you pass the mode to `claude agents` or to `claude --bg --permission-mode`. @@ -343,7 +349,7 @@ Command| Purpose ---|--- -`claude agents`| Open agent view +`claude agents`| Open agent view. Pass `--cwd <path>` to list only sessions started under that directory `claude attach <id>`| Attach to a session in this terminal `claude logs <id>`| Print the session’s recent output `claude stop <id>`| Stop a session. Also accepts `claude kill`
modified Claude Code on Amazon Bedrock View current →
--- a/amazon-bedrock.md +++ b/amazon-bedrock.md @@ -108,7 +108,10 @@ Advanced credential configuration -Claude Code supports automatic credential refresh for AWS SSO and corporate identity providers. Add these settings to your Claude Code settings file (see [Settings](</docs/en/settings>) for file locations). When Claude Code detects that your AWS credentials are expired (either locally based on their timestamp or when Bedrock returns a credential error), it will automatically run your configured `awsAuthRefresh` and/or `awsCredentialExport` commands to obtain new credentials before retrying the request. +Claude Code supports automatic credential refresh for AWS SSO and corporate identity providers. Add these settings to your Claude Code settings file (see [Settings](</docs/en/settings>) for file locations). These two settings have different trigger conditions: + + * **`awsAuthRefresh`** : runs only when Claude Code detects that your AWS credentials are expired, either locally based on their timestamp or when Bedrock returns a credential error, then retries the request with refreshed credentials. + * **`awsCredentialExport`** : runs at session start and on each credential reload, even when the credentials in your AWS default credential provider chain are still valid. Use this when your Bedrock account requires cross-account credentials that differ from the ones the default provider chain would resolve. ##### Example configuration @@ -121,7 +124,7 @@ ##### Configuration settings explained -**`awsAuthRefresh`** : Use this for commands that modify the `.aws` directory, such as updating credentials, SSO cache, or config files. The command’s output is displayed to the user, but interactive input isn’t supported. This works well for browser-based SSO flows where the CLI displays a URL or code and you complete authentication in the browser. **`awsCredentialExport`** : Only use this if you can’t modify `.aws` and must directly return credentials. Output is captured silently and not shown to the user. The command must output JSON in this format: +**`awsAuthRefresh`** : Use this for commands that modify the `.aws` directory, such as updating credentials, SSO cache, or config files. The command’s output is displayed to the user, but interactive input isn’t supported. This works well for browser-based SSO flows where the CLI displays a URL or code and you complete authentication in the browser. **`awsCredentialExport`** : Only use this if you can’t modify `.aws` and must directly return credentials. This command runs whenever credentials need to be refreshed, not only when credentials are expired. Output is captured silently and not shown to the user. The command must output JSON in this format: { "Credentials": {
modified Best practices for Claude Code View current →
--- a/best-practices.md +++ b/best-practices.md @@ -400,7 +400,7 @@ * Use `/clear` frequently between tasks to reset the context window entirely * When auto compaction triggers, Claude summarizes what matters most, including code patterns, file states, and key decisions * For more control, run `/compact <instructions>`, like `/compact Focus on the API changes` - * To compact only part of the conversation, use `Esc + Esc` or `/rewind`, select a message checkpoint, and choose **Summarize from here**. This condenses messages from that point forward while keeping earlier context intact. + * To compact only part of the conversation, use `Esc + Esc` or `/rewind`, select a message checkpoint, and choose **Summarize from here** or **Summarize up to here**. The first condenses messages from that point forward while keeping earlier context intact; the second condenses earlier messages while keeping recent ones in full. See [Restore vs. summarize](</docs/en/checkpointing#restore-vs-summarize>). * Customize compaction behavior in CLAUDE.md with instructions like `"When compacting, always preserve the full list of modified files and any test commands"` to ensure critical context survives summarization * For quick questions that don’t need to stay in context, use [`/btw`](</docs/en/interactive-mode#side-questions-with-%2Fbtw>). The answer appears in a dismissible overlay and never enters conversation history, so you can check a detail without growing context. @@ -427,9 +427,9 @@ Rewind with checkpoints -Every action Claude makes creates a checkpoint. You can restore conversation, code, or both to any previous checkpoint. - -Claude automatically checkpoints before changes. Double-tap `Escape` or run `/rewind` to open the rewind menu. You can restore conversation only, restore code only, restore both, or summarize from a selected message. See [Checkpointing](</docs/en/checkpointing>) for details. Instead of carefully planning every move, you can tell Claude to try something risky. If it doesn’t work, rewind and try a different approach. Checkpoints persist across sessions, so you can close your terminal and still rewind later. +Every prompt you send creates a checkpoint. You can restore conversation, code, or both to any previous checkpoint. + +Claude automatically snapshots files before each change so a checkpoint can restore them. Double-tap `Escape` or run `/rewind` to open the rewind menu. You can restore conversation only, restore code only, restore both, or summarize from a selected message. See [Checkpointing](</docs/en/checkpointing>) for details. Instead of carefully planning every move, you can tell Claude to try something risky. If it doesn’t work, rewind and try a different approach. Checkpoints persist across sessions, so you can close your terminal and still rewind later. Checkpoints only track changes made _by Claude_ , not external processes. This isn’t a replacement for git.
modified Changelog View current →
--- a/changelog.md +++ b/changelog.md @@ -5,6 +5,37 @@ > 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.142 + +May 14, 2026 + + * Added new `claude agents` flags: `--add-dir`, `--settings`, `--mcp-config`, `--plugin-dir`, `--permission-mode`, `--model`, `--effort`, and `--dangerously-skip-permissions` to configure dispatched background sessions + * Fast mode now uses Opus 4.7 by default (previously Opus 4.6). Set `CLAUDE_CODE_OPUS_4_6_FAST_MODE_OVERRIDE=1` to pin fast mode to Opus 4.6 + * Plugins with a root-level `SKILL.md` and no `skills/` subdirectory are now surfaced as a skill + * The `/plugin` details pane and `claude plugin details` now show LSP servers a plugin provides + * `/web-setup` warns before replacing an existing GitHub App connection + * Fixed `MCP_TOOL_TIMEOUT` not raising the per-request fetch timeout for remote HTTP and SSE MCP servers, which capped tool calls at 60 seconds regardless of the configured value + * Fixed background sessions not recognizing pre-existing git worktrees, blocking Edit while EnterWorktree refused to create a duplicate + * Fixed background sessions disappearing and daemon reconnect failing after macOS sleep/wake — the daemon now detects clock jumps instead of treating them as elapsed idle time + * Fixed daemon not exiting cleanly after the binary is upgraded (e.g. `brew upgrade`), causing dispatched agents to crash-loop on the deleted path + * Fixed background agents crash-looping when the Claude-in-Chrome extension is connected without a shared tab + * Fixed clicking links in an attached `claude agents` session — the background worker’s headless browser shim no longer applies while attached + * Fixed `claude agents` “v to open in editor” using the daemon’s default editor instead of your shell’s `$EDITOR`/`$VISUAL` + * Fixed `claude agents` deadlocking on Windows with network-drive working directories; Ctrl+C now works during startup + * Fixed background-color bleed when attaching to a `claude agents` session from Apple Terminal or other 256-color-only terminals + * Fixed `claude --bg --dangerously-skip-permissions` not persisting across retire/wake + * Fixed session titles being derived from the URL when the first message is a link + * Fixed redundant `set_model` requests from remote clients injecting duplicate `/model` breadcrumbs into the transcript + * Fixed plugins using `skills: ["./"]` showing a false “path escapes plugin directory” error + * Fixed plugin cache cleanup deleting the active plugin version directory when no installation metadata is present + * Fixed `/plugin` browse pane showing “0 installs” for newly published plugins + * Fixed plugin advisories not naming every `plugin.json` key that shadows a default folder + * Improved reactive compaction: the first summarize attempt now seeds from the original request’s overflow size, avoiding a wasted near-full-context retry + * Improved hook configuration error: configuring a prompt- or agent-type hook for `SessionStart`/`Setup`/`SubagentStart` now shows a clear “use a command-type hook instead” error + * Removed stale `/model claude-sonnet-4-20250514` suggestion from Usage Policy refusal messages ​
modified Checkpointing View current →
--- a/checkpointing.md +++ b/checkpointing.md @@ -38,9 +38,10 @@ * **Restore conversation** : rewind to that message while keeping current code * **Restore code** : revert file changes while keeping the conversation * **Summarize from here** : compress the conversation from this point forward into a summary, freeing context window space + * **Summarize up to here** : compress the conversation before this point into a summary, keeping later messages intact * **Never mind** : return to the message list without making changes -After restoring the conversation or summarizing, the original prompt from the selected message is restored into the input field so you can re-send or edit it. +After restoring the conversation or choosing Summarize from here, the original prompt from the selected message is restored into the input field so you can re-send or edit it. Choosing Summarize up to here leaves you at the end of the conversation with the input empty. #### @@ -48,14 +49,12 @@ Restore vs. summarize -The three restore options revert state: they undo code changes, conversation history, or both. “Summarize from here” works differently: +The restore options revert state: they undo code changes, conversation history, or both. The summarize options compress part of the conversation into an AI-generated summary without changing files on disk: - * Messages before the selected message stay intact - * The selected message and all subsequent messages get replaced with a compact AI-generated summary - * No files on disk are changed - * The original messages are preserved in the session transcript, so Claude can reference the details if needed + * **Summarize from here** : messages before the selected message stay intact. The selected message and everything after it are replaced with a summary. Use this to discard a side discussion while keeping early context in full detail. + * **Summarize up to here** : messages before the selected message are replaced with a summary. The selected message and everything after it stay intact, and you remain at the end of the conversation. Use this to compress early setup discussion while keeping recent work in full detail. -This is similar to `/compact`, but targeted: instead of summarizing the entire conversation, you keep early context in full detail and only compress the parts that are using up space. You can type optional instructions to guide what the summary focuses on. +In both cases the original messages are preserved in the session transcript, so Claude can reference the details if needed. You can type optional instructions to guide what the summary focuses on. This is similar to `/compact`, but targeted: instead of summarizing the entire conversation, you choose which side of the selected message to compress. Summarize keeps you in the same session and compresses context. If you want to branch off and try a different approach while preserving the original session intact, use [fork](</docs/en/sessions#branch-a-session>) instead (`claude --continue --fork-session`).
modified Use Claude Code on the web View current →
--- a/claude-code-on-the-web.md +++ b/claude-code-on-the-web.md @@ -840,7 +840,7 @@ Remote Control session expired or access denied -`--teleport` connects through the same Remote Control session infrastructure that cloud sessions use, so authentication and session-expiry errors surface with Remote Control wording. You may see `Remote Control session has expired` or `Access denied`. The connection token is short-lived and scoped to your account. +`--teleport` connects through the same Remote Control session infrastructure that cloud sessions use, so authentication and session-expiry errors surface with Remote Control wording. You may see `Remote Control session expired` or `Access denied`. The connection token is short-lived and scoped to your account. * Run `/login` locally to refresh your credentials, then reconnect * Confirm you are signed in to the same account that owns the session
modified CLI reference View current →
--- a/cli-reference.md +++ b/cli-reference.md @@ -26,7 +26,7 @@ `claude auth login`| Sign in to your Anthropic account. Use `--email` to pre-fill your email address, `--sso` to force SSO authentication, and `--console` to sign in with Anthropic Console for API usage billing instead of a Claude subscription| `claude auth login --console` `claude auth logout`| Log out from your Anthropic account| `claude auth logout` `claude auth status`| Show authentication status as JSON. Use `--text` for human-readable output. Exits with code 0 if logged in, 1 if not| `claude auth status` -`claude agents`| Open [agent view](</docs/en/agent-view>) to monitor and dispatch parallel background sessions. When output is piped, lists configured [subagents](</docs/en/sub-agents>) instead| `claude agents` +`claude agents`| Open [agent view](</docs/en/agent-view>) to monitor and dispatch parallel background sessions. Use `--cwd <path>` to show only sessions started under that directory| `claude agents` `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 logs <id>`| Print recent output from a [background session](</docs/en/agent-view#manage-sessions-from-the-shell>)| `claude logs 7c5dcf5d`
modified Commands View current →
--- a/commands.md +++ b/commands.md @@ -12,7 +12,7 @@ Commands across a typical workflow -Most commands are useful at a specific point in a session, from setting up a project to shipping a change. **First session in a repo.** Run `/init` to generate a starter `CLAUDE.md`, then `/memory` to refine it. Use `/mcp` and `/agents` to set up any servers or subagents the project needs, and `/permissions` to set the approval rules you want. **During a task.** `/plan` switches into plan mode before a large change. `/model` and `/effort` adjust how much reasoning you’re spending. When the conversation gets long, `/context` shows where the window is going and `/compact` summarizes it down; use `/btw` for a quick aside that shouldn’t bloat history. **Running work in parallel.** `/agents` opens the manager for the [subagents](</docs/en/sub-agents>) Claude can delegate side tasks to, and `/tasks` lists what’s running in the background of the current session. `/background` detaches the whole session to keep running as a [background agent](</docs/en/agent-view>) and frees your terminal. For a large change that spans the codebase, `/batch` decomposes it into independent units and runs each in its own [worktree](</docs/en/worktrees>). See [Run agents in parallel](</docs/en/agents>) for how these approaches relate. **Before you ship.** `/diff` shows what changed, `/simplify` reviews recent files and applies quality and efficiency fixes, and `/review` or `/security-review` give a deeper read-only pass. **Between sessions.** `/clear` starts fresh on a new task while keeping project memory. `/resume` and `/branch` let you return to or fork an earlier conversation. `/teleport` pulls a web session into this terminal, and `/remote-control` lets you continue this local session from another device. **When something is wrong.** `/rewind` rolls code and conversation back to a checkpoint. `/doctor` and `/debug` diagnose install and runtime issues, and `/feedback` reports a bug with session context attached. +Most commands are useful at a specific point in a session, from setting up a project to shipping a change. **First session in a repo.** Run `/init` to generate a starter `CLAUDE.md`, then `/memory` to refine it. Use `/mcp` and `/agents` to set up any servers or subagents the project needs, and `/permissions` to set the approval rules you want. **During a task.** `/plan` switches into plan mode before a large change. `/model` and `/effort` adjust how much reasoning you’re spending. When the conversation gets long, `/context` shows where the window is going and `/compact` summarizes it down; use `/btw` for a quick aside that shouldn’t bloat history. **Running work in parallel.** `/agents` opens the manager for the [subagents](</docs/en/sub-agents>) Claude can delegate side tasks to, and `/tasks` lists what’s running in the background of the current session. `/background` detaches the whole session to keep running as a [background agent](</docs/en/agent-view>) and frees your terminal. For a large change that spans the codebase, `/batch` decomposes it into independent units and runs each in its own [worktree](</docs/en/worktrees>). See [Run agents in parallel](</docs/en/agents>) for how these approaches relate. **Before you ship.** `/diff` shows what changed, `/simplify` reviews recent files and applies quality and efficiency fixes, and `/review` or `/security-review` give a deeper read-only pass. **Between sessions.** `/clear` starts fresh on a new task while keeping project memory. `/resume` and `/branch` let you return to or fork an earlier conversation. `/teleport` pulls a web session into this terminal, and `/remote-control` lets you continue this local session from another device. **When something is wrong.** `/rewind` rolls code and conversation back to a checkpoint, or summarizes part of the conversation. `/doctor` and `/debug` diagnose install and runtime issues, and `/feedback` reports a bug with session context attached. ##
modified Use Claude Code Desktop View current →
--- a/desktop.md +++ b/desktop.md @@ -158,7 +158,7 @@ Run commands in the terminal -The integrated terminal lets you run commands alongside your session without switching to another app. Open it from the **Views** menu or press **Ctrl+`** on macOS or Windows. The terminal opens in your session’s working directory and shares the same environment as Claude, so commands like `npm test` or `git status` see the same files Claude is editing. The terminal is available in local sessions only. +The integrated terminal lets you run commands alongside your session without switching to another app. Open it from the **Views** menu or press **Ctrl+`** on macOS or Windows. The terminal opens in your session’s working directory and shares the same environment as Claude, so commands like `npm test` or `git status` see the same files Claude is editing. To open a second terminal tab, click **+** in the terminal pane header or right-click a folder in the chat to choose **Open in terminal**. The terminal is available in local sessions only. ### @@ -332,7 +332,7 @@ Session isolation requires [Git](<https://git-scm.com/downloads>). Most Macs include Git by default. Run `git --version` in Terminal to check. On Windows, Git is required for the Code tab to work: [download Git for Windows](<https://git-scm.com/downloads/win>), install it, and restart the app. If you run into Git errors, ask Claude in the [Cowork tab](<https://claude.com/product/cowork>) to help troubleshoot your setup. -Use the controls at the top of the sidebar to filter sessions by status, project, or environment, and to group sessions by project. To rename a session, click the session title in the toolbar at the top of the active session. To check context usage, see Check usage. When context fills up, Claude automatically summarizes the conversation and continues working. You can also type `/compact` to trigger summarization earlier and free up context space. See [the context window](</docs/en/how-claude-code-works#the-context-window>) for details on how compaction works. +Use the controls at the top of the sidebar to filter sessions by status, project, or environment, and to group sessions by project. To rename a session, click the session title in the toolbar at the top of the active session. To check context usage, see Check usage. When context fills up, Claude automatically summarizes the conversation and continues working. You can also type `/compact` to trigger summarization earlier and free up context space. See [the context window](</docs/en/how-claude-code-works#the-context-window>) for details on how compaction works. The desktop app sends an OS notification when a Code session finishes a task and you aren’t currently viewing that session. ### @@ -668,6 +668,7 @@ `autoMode`| customize what the auto mode classifier trusts and blocks across your organization. See [Configure auto mode](</docs/en/auto-mode-config>). `sshConfigs`| pre-configure SSH connections that appear in the environment dropdown. Users cannot edit or delete managed connections. `sshHostAllowlist`| restrict SSH sessions to hosts whose resolved hostname matches one of these patterns. An empty array disables SSH sessions. Read from managed settings only. +`managedMcpServers`| push MCP server configurations to all users in a third-party deployment. Each entry specifies a transport of `"http"`, `"sse"`, or `"stdio"`, connection details, and optionally a `toolPolicy` map that restricts which tools in that server users can invoke. Available in third-party (3P) Desktop deployments only. A managed settings file deployed to disk on each machine applies to Desktop sessions. Managed settings pushed remotely through the admin console currently reach CLI and IDE sessions only, so for Desktop deployments either distribute the file via MDM or use the admin console controls above. `permissions.disableBypassPermissionsMode` and `disableAutoMode` also work in user and project settings, but placing them in managed settings prevents users from overriding them. `autoMode` is read from user settings, `.claude/settings.local.json`, and managed settings, but not from the checked-in `.claude/settings.json`: a cloned repo cannot inject its own classifier rules. For the complete list of managed-only settings including `allowManagedPermissionRulesOnly` and `allowManagedHooksOnly`, see [managed-only settings](</docs/en/permissions#managed-only-settings>).
added Desktop changelog View current →
Show diff (121 lines)
--- a/desktop-changelog.md +++ b/desktop-changelog.md @@ -0,0 +1,118 @@ +> ## 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. + +This page covers Claude Code-specific changes in the Desktop app. For changes to the Claude Code CLI bundled inside the app, see the [CLI changelog](</docs/en/changelog>). + +​ + +1.7196.0 + +May 12, 2026 + + * Fixed auto-update hanging indefinitely on Relaunch to Update when popout windows refused to close. + * Fixed local sessions failing to start after a corrupted bundled Claude Code binary was cached. + * Fixed the credential helper opening duplicate browser sign-in tabs when starting a new conversation. + * Fixed Code tab PR status icons showing the wrong state for merged, merge-queued, and draft pull requests. + * Fixed Quick Entry dropping characters entered with a Korean, Japanese, or Chinese input method. + * Added an “Also delete files on disk” option to the scheduled task delete dialog; checking it removes the task’s `SKILL.md` file and associated data from `~/.claude/scheduled-tasks/`. + * Added support for mouse back and forward buttons for navigating the chat view. + +**3P managed deployments** + + * Added an organization banner across the top of the app window, configured by IT administrators. + +​ + +1.6889.0 + +May 8, 2026 + + * Added MCP App widget rendering in Code tab sessions. + * Added an OS notification when a Code session finishes a task and you aren’t currently viewing it. + * Added automatic detection and re-download of corrupted Claude Code CLI binaries on macOS. + * Added support for scheduled tasks to modify their own schedule or prompt during a run using the `update_scheduled_task` MCP tool. + * Updated the list of available MCP tools to reload automatically when the local MCP configuration changes. + * Updated PR auto-fix to post a reply on each review thread it addresses and mark the thread resolved. + * Improved SSH session startup speed by preconnecting saved SSH configurations at app launch. + * Fixed pasting a code block into a busy terminal; the app now opens a new terminal tab when the existing one has a process running. + * Fixed PR bar issues in Code sessions: each row now shows its own diff, and the sidebar status icon updates when a PR is merged. + * Fixed garbled scrollback, such as stray `%` marks and half-wrapped prompts, when opening the terminal pane after running a code block. + * Fixed Code session links opening with overlapping window controls when reached via Handoff or share links. + * Fixed git commit signing failing in local sessions when the signing key is held by 1Password or Secretive. + * Fixed locally installed plugins disappearing from sessions after the plugin registry file became corrupted by concurrent writes. + * Fixed scheduled tasks running with auto-approve echoing tool-use suggestions into the session. + * Fixed SSH plugin sync so a single problematic plugin no longer blocks sync for the rest. + +**3P managed deployments** + + * Added support for stdio-transport local MCP servers via the `managedMcpServers` managed-settings key; the connector detail panel now shows the command and arguments, and environment variable values are masked outside the admin Setup screen. + * Added a managed-settings option to disable `claude://` deep-link handling. + * Added support for customizing model display names in the model picker via `labelOverride`. + * Fixed per-tool MCP server policies set by administrators not being enforced in all session types. + +​ + +1.6608.0 + +May 7, 2026 + + * Fixed scheduled tasks failing to run when a previous run was stuck waiting on a permission prompt. + * Fixed scheduled tasks repeatedly retrying a failed run instead of waiting for the next scheduled time. + * Fixed scheduled-task history incorrectly showing “computer asleep” for runs skipped due to a concurrency limit. + * Added per-plugin auto-install for organization-provisioned plugins via the plugin manifest. + * Added Unarchive to the Code session context menu; sending a message in an archived session now restores it automatically. + * Added a warning when archiving a Code session that has uncommitted changes in its worktree. + * Added a warning when quitting or restarting the app while local Code sessions are running. + * Added csh and tcsh login shell support when connecting to remote SSH hosts. + * Fixed folder permission rules failing to match when the connected folder is a drive root. + * Fixed Windows installs leaving an empty folder under `%LOCALAPPDATA%`. + +​ + +1.6259.0 + +May 5, 2026 + + * Code sessions now default the working directory to the home folder when none is configured. + * `settings.json` project settings now cascade from the SSH host for SSH Code sessions. + * “Always allow” tool permissions now persist across app restarts and display their scope. + * Added automatic detection and re-download of corrupted Claude Code CLI binaries on Windows. + * The PR bar now shows stacked and sibling pull requests alongside the branch’s own PR. + * Messages sent while a turn is running are now queued rather than dropped. + * Opening a Code session link on iOS now continues the session on macOS via Handoff. + +​ + +1.5354.0 + +April 29, 2026 + + * Disabling the org Skills toggle in the admin console now removes the skill management tools `list_skills`, `save_skill`, and `propose_skills` from Code sessions. + * The preview pane now opens automatically when a session’s working directory is a symlink. + * Improved login-shell PATH extraction for more reliable tool discovery. + +​ + +1.5220.0 + +April 28, 2026 + + * Added a multi-tab terminal pane; click **+** in the terminal pane header to open a second tab, or right-click a folder in the chat to choose **Open in terminal**. + * Fixed worktree pool re-lease creating a fresh worktree on checkout failure instead of re-using an existing one. + * Fixed rewind selecting the wrong assistant message after a previous rewind created a fork. + +​ + +1.5186.0 + +April 28, 2026 + + * Added `list_sessions`, `search_session_transcripts`, and `archive_session` MCP tools for managing Code sessions from within a session. + * Improved SSH wake-path reliability and surfaced `ProxyCommand` stderr output for easier debugging. + * Fixed login-shell PATH extraction for fish shell users. It was returning a newline-separated list instead of a colon-separated one. + * Fixed the SSH remote control socket directory permissions so `~/.claude/remote` is no longer world-traversable. + * PR review bodies and issue comments are now forwarded to the auto-fix engine. + * Added a category-driven error UI for Code sessions that groups failures by type and surfaces actionable recovery steps.
modified Schedule recurring tasks in Claude Code Desktop View current →
--- a/desktop-scheduled-tasks.md +++ b/desktop-scheduled-tasks.md @@ -100,9 +100,9 @@ * **Edit** : change the instructions, schedule, folder, or other settings * **Review history** : see every past run, including skipped runs. Hover a skipped entry to see why: your computer was asleep, the previous run was still in progress, or other scheduled tasks were already running. Click **Show more** to load older entries. * **Review allowed permissions** : see and revoke saved tool approvals for this task from the **Always allowed** panel - * **Delete** : remove the task and archive all sessions it created + * **Delete** : remove the task and archive all sessions it created. An **Also delete files on disk** checkbox appears in the confirmation dialog; check it to also remove the task’s `SKILL.md` file and associated data from `~/.claude/scheduled-tasks/`. -You can also list, create, edit, and pause tasks by asking Claude in any Desktop session. For example, “pause my dependency-audit task” or “show me my scheduled tasks.” To delete a task, use the **Delete** button on its detail page. To edit a task’s prompt on disk, open `~/.claude/scheduled-tasks/<task-name>/SKILL.md` (or under [`CLAUDE_CONFIG_DIR`](</docs/en/env-vars>) if set). The file uses YAML frontmatter for `name` and `description`, with the prompt as the body. Changes take effect on the next run. Schedule, folder, model, and enabled state are not in this file: change them through the Edit form or ask Claude. +You can also list, create, edit, and pause tasks by asking Claude in any Desktop session. For example, “pause my dependency-audit task” or “show me my scheduled tasks.” To delete a task, use the **Delete** button on its detail page. A scheduled task can also modify its own schedule or prompt from within a running session using the `update_scheduled_task` MCP tool. This lets a task reschedule itself based on what it finds, for example, rescheduling a code review to run earlier when it detects a release branch has been created. To edit a task’s prompt on disk, open `~/.claude/scheduled-tasks/<task-name>/SKILL.md` (or under [`CLAUDE_CONFIG_DIR`](</docs/en/env-vars>) if set). The file uses YAML frontmatter for `name` and `description`, with the prompt as the body. Changes take effect on the next run. Schedule, folder, model, and enabled state are not in this file: change them through the Edit form or ask Claude. ##
modified Environment variables View current →
--- a/env-vars.md +++ b/env-vars.md @@ -43,6 +43,7 @@ `ANTHROPIC_SMALL_FAST_MODEL_AWS_REGION`| Override AWS region for the Haiku-class model when using Bedrock or Bedrock Mantle `ANTHROPIC_VERTEX_BASE_URL`| Override the Vertex AI endpoint URL. Use for custom Vertex endpoints or when routing through an [LLM gateway](</docs/en/llm-gateway>). See [Google Vertex AI](</docs/en/google-vertex-ai>) `ANTHROPIC_VERTEX_PROJECT_ID`| GCP project ID for Vertex AI requests. Overridden by `GCLOUD_PROJECT`, `GOOGLE_CLOUD_PROJECT`, or the project in your `GOOGLE_APPLICATION_CREDENTIALS` credential file. See [Google Vertex AI](</docs/en/google-vertex-ai>) +`ANTHROPIC_WORKSPACE_ID`| Workspace ID for [workload identity federation](<https://platform.claude.com/docs/en/manage-claude/workload-identity-federation>). Set this when your federation rule is scoped to more than one workspace so the token exchange knows which workspace to target `API_TIMEOUT_MS`| Timeout for API requests in milliseconds (default: 600000, or 10 minutes; maximum: 2147483647). Increase this when requests time out on slow networks or when routing through a proxy. Values above the maximum overflow the underlying timer and cause requests to fail immediately `AWS_BEARER_TOKEN_BEDROCK`| Bedrock API key for authentication (see [Bedrock API keys](<https://aws.amazon.com/blogs/machine-learning/accelerate-ai-development-with-amazon-bedrock-api-keys/>)) `BASH_DEFAULT_TIMEOUT_MS`| Default timeout for long-running bash commands (default: 120000, or 2 minutes) @@ -66,7 +67,7 @@ `CLAUDE_CODE_CLIENT_CERT`| Path to client certificate file for mTLS authentication `CLAUDE_CODE_CLIENT_KEY`| Path to client private key file for mTLS authentication `CLAUDE_CODE_CLIENT_KEY_PASSPHRASE`| Passphrase for encrypted CLAUDE_CODE_CLIENT_KEY (optional) -`CLAUDE_CODE_DEBUG_LOGS_DIR`| Override the debug log file path. Despite the name, this is a file path, not a directory. Requires debug mode to be enabled separately via `--debug` or `/debug`: setting this variable alone does not enable logging. The [`--debug-file`](</docs/en/cli-reference#cli-flags>) flag does both at once. Defaults to `~/.claude/debug/<session-id>.txt` +`CLAUDE_CODE_DEBUG_LOGS_DIR`| Override the debug log file path. Despite the name, this is a file path, not a directory. Requires debug mode to be enabled separately via `--debug`, `/debug`, or the `DEBUG` environment variable: setting this variable alone does not enable logging. The [`--debug-file`](</docs/en/cli-reference#cli-flags>) flag does both at once. Defaults to `~/.claude/debug/<session-id>.txt` `CLAUDE_CODE_DEBUG_LOG_LEVEL`| Minimum log level written to the debug log file. Values: `verbose`, `debug` (default), `info`, `warn`, `error`. Set to `verbose` to include high-volume diagnostics like full status line command output, or raise to `error` to reduce noise `CLAUDE_CODE_DISABLE_1M_CONTEXT`| Set to `1` to disable [1M context window](</docs/en/model-config#extended-context>) support. When set, 1M model variants are unavailable in the model picker. Useful for enterprise environments with compliance requirements `CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING`| Set to `1` to disable [adaptive reasoning](</docs/en/model-config#adjust-effort-level>) on Opus 4.6 and Sonnet 4.6 and fall back to the fixed thinking budget controlled by `MAX_THINKING_TOKENS`. Has no effect on Opus 4.7, which always uses adaptive reasoning @@ -136,6 +137,7 @@ `CLAUDE_CODE_PLUGIN_CACHE_DIR`| Override the plugins root directory. Despite the name, this sets the parent directory, not the cache itself: marketplaces and the plugin cache live in subdirectories under this path. Defaults to `~/.claude/plugins` `CLAUDE_CODE_PLUGIN_GIT_TIMEOUT_MS`| Timeout in milliseconds for git operations when installing or updating plugins (default: 120000). Increase this value for large repositories or slow network connections. See [Git operations time out](</docs/en/plugin-marketplaces#git-operations-time-out>) `CLAUDE_CODE_PLUGIN_KEEP_MARKETPLACE_ON_FAILURE`| Set to `1` to keep the existing marketplace cache when a `git pull` fails instead of wiping and re-cloning. Useful in offline or airgapped environments where re-cloning would fail the same way. See [Marketplace updates fail in offline environments](</docs/en/plugin-marketplaces#marketplace-updates-fail-in-offline-environments>) +`CLAUDE_CODE_PLUGIN_PREFER_HTTPS`| Set to `1` to clone GitHub `owner/repo` plugin sources over HTTPS instead of SSH. Useful in CI runners, containers, or any environment without a configured SSH key for `github.com` `CLAUDE_CODE_PLUGIN_SEED_DIR`| Path to one or more read-only plugin seed directories, separated by `:` on Unix or `;` on Windows. Use this to bundle a pre-populated plugins directory into a container image. Claude Code registers marketplaces from these directories at startup and uses pre-cached plugins without re-cloning. See [Pre-populate plugins for containers](</docs/en/plugin-marketplaces#pre-populate-plugins-for-containers>) `CLAUDE_CODE_PROVIDER_MANAGED_BY_HOST`| Set by host platforms that embed Claude Code and manage model provider routing on its behalf. When set, provider-selection, endpoint, and authentication variables such as `CLAUDE_CODE_USE_BEDROCK`, `ANTHROPIC_BASE_URL`, and `ANTHROPIC_API_KEY` in settings files are ignored so user settings cannot override the host’s routing. The automatic telemetry opt-out for Bedrock, Vertex, and Foundry is also skipped, so telemetry follows the standard `DISABLE_TELEMETRY` opt-out. See [Default behaviors by API provider](</docs/en/data-usage#default-behaviors-by-api-provider>) `CLAUDE_CODE_PROXY_RESOLVES_HOSTS`| Set to `1` to allow the proxy to perform DNS resolution instead of the caller. Opt-in for environments where the proxy should handle hostname resolution @@ -150,7 +152,7 @@ `CLAUDE_CODE_SHELL`| Override automatic shell detection. Useful when your login shell differs from your preferred working shell (for example, `bash` vs `zsh`) `CLAUDE_CODE_SHELL_PREFIX`| Command prefix that wraps shell commands Claude Code spawns: Bash tool calls, [hook](</docs/en/hooks>) commands, and stdio [MCP server](</docs/en/mcp>) startup commands. Useful for logging or auditing. Example: setting `/path/to/logger.sh` runs each command as `/path/to/logger.sh <command>` `CLAUDE_CODE_SIMPLE`| Set to `1` to run with a minimal system prompt and only the Bash, file read, and file edit tools. MCP tools from `--mcp-config` are still available. Disables auto-discovery of hooks, skills, plugins, MCP servers, auto memory, and CLAUDE.md. The [`--bare`](</docs/en/headless#start-faster-with-bare-mode>) CLI flag sets this -`CLAUDE_CODE_SIMPLE_SYSTEM_PROMPT`| Set to `1` to use a shorter system prompt and abbreviated tool descriptions on Opus 4.7. Has no effect on other models. The full tool set, hooks, MCP servers, and CLAUDE.md discovery remain enabled +`CLAUDE_CODE_SIMPLE_SYSTEM_PROMPT`| Set to `1` to use a shorter system prompt and abbreviated tool descriptions on any model. Set to `0`, `false`, `no`, or `off` to opt out even on models where the experiment or server configuration would otherwise enable it. The full tool set, hooks, MCP servers, and CLAUDE.md discovery remain enabled `CLAUDE_CODE_SKIP_ANTHROPIC_AWS_AUTH`| Skip client-side authentication for [Claude Platform on AWS](</docs/en/claude-platform-on-aws>), for gateways that sign requests themselves `CLAUDE_CODE_SKIP_BEDROCK_AUTH`| Skip AWS authentication for Bedrock (for example, when using an LLM gateway) `CLAUDE_CODE_SKIP_FOUNDRY_AUTH`| Skip Azure authentication for Microsoft Foundry (for example, when using an LLM gateway) @@ -180,6 +182,7 @@ `CLAUDE_ENV_FILE`| Path to a shell script whose contents Claude Code runs before each Bash command in the same shell process, so exports in the file are visible to the command. Use to persist virtualenv or conda activation across commands. Also populated dynamically by [SessionStart](</docs/en/hooks#persist-environment-variables>), [Setup](</docs/en/hooks#setup>), [CwdChanged](</docs/en/hooks#cwdchanged>), and [FileChanged](</docs/en/hooks#filechanged>) hooks `CLAUDE_REMOTE_CONTROL_SESSION_NAME_PREFIX`| Prefix for auto-generated [Remote Control](</docs/en/remote-control>) session names when no explicit name is provided. Defaults to your machine’s hostname, producing names like `myhost-graceful-unicorn`. The `--remote-control-session-name-prefix` CLI flag sets the same value for a single invocation `CLAUDE_STREAM_IDLE_TIMEOUT_MS`| Timeout in milliseconds before the streaming idle watchdog closes a stalled connection. Default and minimum `300000` (5 minutes) for both the byte-level and event-level watchdogs; lower values are silently clamped to absorb extended thinking pauses and proxy buffering. For third-party providers, requires `CLAUDE_ENABLE_STREAM_WATCHDOG=1` +`DEBUG`| Set to `1` to enable debug mode, equivalent to launching with [`--debug`](</docs/en/cli-reference#cli-flags>). Debug logs are written to `~/.claude/debug/<session-id>.txt`, or to the path set by `CLAUDE_CODE_DEBUG_LOGS_DIR`. Only the truthy values `1`, `true`, `yes`, and `on` enable debug mode, so namespace patterns like `DEBUG=express:*` set for other tools do not trigger it `DISABLE_AUTOUPDATER`| Set to `1` to disable automatic background updates. Manual `claude update` still works. Use `DISABLE_UPDATES` to block both `DISABLE_AUTO_COMPACT`| Set to `1` to disable automatic compaction when approaching the context limit. The manual `/compact` command remains available. Use when you want explicit control over when compaction occurs `DISABLE_COMPACT`| Set to `1` to disable all compaction: both automatic compaction and the manual `/compact` command
modified Claude Code GitHub Actions View current →
--- a/github-actions.md +++ b/github-actions.md @@ -180,6 +180,13 @@ Using skills +The `prompt` input accepts a [skill](</docs/en/skills>) invocation as well as plain text: + + * For a skill in your repository’s `.claude/skills/` directory, run `actions/checkout` before the action step and pass `/skill-name`. + * For a skill packaged in a plugin, install the plugin with the `plugin_marketplaces` and `plugins` inputs and pass the namespaced `/plugin-name:skill-name`. + +The following workflow installs the `code-review` plugin and runs its skill on each new or updated pull request: + name: Code Review on: pull_request: @@ -191,8 +198,9 @@ - uses: anthropics/claude-code-action@v1 with: anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} - prompt: "Review this pull request for code quality, correctness, and security. Analyze the diff, then post your findings as review comments." - claude_args: "--max-turns 5" + plugin_marketplaces: "https://github.com/anthropics/claude-code.git" + plugins: "code-review@claude-code-plugins" + prompt: "/code-review:code-review ${{ github.repository }}/pull/${{ github.event.pull_request.number }}" ### @@ -695,6 +703,8 @@ ---|---|--- `prompt`| Instructions for Claude (plain text or a [skill](</docs/en/skills>) name)| No* `claude_args`| CLI arguments passed to Claude Code| No +`plugin_marketplaces`| Newline-separated list of plugin marketplace Git URLs| No +`plugins`| Newline-separated list of plugin names to install before execution| No `anthropic_api_key`| Claude API key| Yes** `github_token`| GitHub token for API access| No `trigger_phrase`| Custom trigger phrase (default: “@claude”)| No
modified Glossary View current →
--- a/glossary.md +++ b/glossary.md @@ -102,7 +102,7 @@ Checkpoint -An automatic snapshot of your code captured before each edit Claude makes. Press `Esc` twice or run `/rewind` to restore code, conversation, or both to an earlier point. Checkpoints are local to the session, separate from git, and don’t track changes made through the Bash tool. Learn more: [Checkpointing](</docs/en/checkpointing>) +A restore point created at each prompt you send. Claude Code snapshots files before every edit so a checkpoint can revert them. Press `Esc` twice or run `/rewind` to restore code, conversation, or both to an earlier point, or to summarize part of the conversation from a selected message. Checkpoints are local to the session, separate from git, and don’t track changes made through the Bash tool. Learn more: [Checkpointing](</docs/en/checkpointing>) ###
modified Keep Claude working toward a goal View current →
--- a/goal.md +++ b/goal.md @@ -3,6 +3,8 @@ > Fetch the complete documentation index at: <https://code.claude.com/docs/llms.txt> > > Use this file to discover all available pages before exploring further. + +`/goal` requires Claude Code v2.1.139 or later. The `/goal` command sets a completion condition and Claude keeps working toward it without you prompting each step. After each turn, a small fast model checks whether the condition holds. If not, Claude starts another turn instead of returning control to you. The goal clears automatically once the condition is met. Use a goal for substantial work with a verifiable end state: @@ -118,7 +120,7 @@ Run non-interactively -`/goal` works in [non-interactive mode](</docs/en/headless>) and through [Remote Control](</docs/en/remote-control>). Setting a goal with `-p` runs the loop to completion in a single invocation: +`/goal` works in [non-interactive mode](</docs/en/headless>), in the [desktop app](</docs/en/desktop>), and through [Remote Control](</docs/en/remote-control>). Setting a goal with `-p` runs the loop to completion in a single invocation: claude -p "/goal CHANGELOG.md has an entry for every PR merged this week"
modified Hooks reference View current →
Show diff (128 lines)
--- a/hooks.md +++ b/hooks.md @@ -301,7 +301,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, 30 for prompt, 60 for agent +`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 `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 @@ -546,7 +546,7 @@ Hook input and output -Command hooks receive JSON data via stdin and communicate results through exit codes, stdout, and stderr. HTTP hooks receive the same JSON as the POST request body and communicate results through the HTTP response body. This section covers fields and behavior common to all events. Each event’s section under Hook events includes its specific input schema and decision control options. +Command hooks receive JSON data via stdin and communicate results through exit codes, stdout, and stderr. HTTP hooks receive the same JSON as the POST request body and communicate results through the HTTP response body. This section covers fields and behavior common to all events. Each event’s section under Hook events includes its specific input schema and decision control options. On macOS and Linux, command hooks run in their own session without a controlling terminal as of v2.1.139. The hook process and any child processes cannot open `/dev/tty` or send escape sequences directly to the Claude Code interface. Windows has no `/dev/tty`. To surface a message to the user on any platform, return `systemMessage` in JSON output. To trigger a desktop notification, set a window title, or ring the bell, return `terminalSequence` instead. ### @@ -675,7 +675,7 @@ You must choose one approach per hook, not both: either use exit codes alone for signaling, or exit 0 and print JSON for structured control. Claude Code only processes JSON on exit 0. If you exit 2, any JSON is ignored. -Your hook’s stdout must contain only the JSON object. If your shell profile prints text on startup, it can interfere with JSON parsing. See [JSON validation failed](</docs/en/hooks-guide#json-validation-failed>) in the troubleshooting guide. Hook output injected into context (`additionalContext`, `systemMessage`, or plain stdout) is capped at 10,000 characters. Output that exceeds this limit is saved to a file and replaced with a preview and file path, the same way large tool results are handled. The JSON object supports three kinds of fields: +Your hook’s stdout must contain only the JSON object. If your shell profile prints text on startup, it can interfere with JSON parsing. See [JSON validation failed](</docs/en/hooks-guide#json-validation-failed>) in the troubleshooting guide. Hook output strings, including `additionalContext`, `systemMessage`, and plain stdout, are capped at 10,000 characters. Output that exceeds this limit is saved to a file and replaced with a preview and file path, the same way large tool results are handled. The JSON object supports three kinds of fields: * **Universal fields** like `continue` work across all events. These are listed in the table below. * **Top-level`decision` and `reason`** are used by some events to block or provide feedback. @@ -687,10 +687,39 @@ `stopReason`| none| Message shown to the user when `continue` is `false`. Not shown to Claude `suppressOutput`| `false`| If `true`, omits stdout from the debug log `systemMessage`| none| Warning message shown to the user +`terminalSequence`| none| A terminal escape sequence for Claude Code to emit on your behalf, such as a desktop notification, window title, or bell. Restricted to OSC `0`/`1`/`2`/`9`/`99`/`777` and BEL. If the value contains anything outside the allowlist, the field is ignored. Use this instead of writing to `/dev/tty`, which is unavailable to hooks To stop Claude entirely regardless of event type: { "continue": false, "stopReason": "Build failed, fix errors before continuing" } + +#### + +​ + +Emit terminal notifications + +The `terminalSequence` field requires Claude Code v2.1.141 or later. Hooks run without a controlling terminal, so writing escape sequences directly to `/dev/tty` fails. Instead, return the escape sequence in the `terminalSequence` field and Claude Code emits it for you through its own terminal write path. This is race-free, works inside tmux and GNU screen, and works on Windows where there is no `/dev/tty`. The field accepts a string of one or more allowlisted escape sequences: + + * OSC `0`, `1`, `2`: window and icon titles + * OSC `9`: iTerm2, ConEmu, Windows Terminal, and WezTerm notifications, including `9;4` taskbar progress + * OSC `99`: Kitty notifications + * OSC `777`: urxvt, Ghostty, and Warp notifications + * Bare BEL + +Sequences may be terminated with BEL or with ST. Anything outside the allowlist, including CSI cursor and color sequences, OSC palette sequences, OSC 8 hyperlinks, OSC 52 clipboard writes, and OSC 1337, is rejected and the field is ignored. The example below fires a desktop notification from a `Notification` hook. The escape sequence is built with `printf` octal escapes so the control bytes never appear on the shell command line, and `jq -n --arg` builds the JSON output so quotes, backslashes, and newlines in the notification message are escaped correctly: + + #!/bin/bash + # Notification hook: ping the desktop when Claude Code needs attention. + input=$(cat) + title="Claude Code" + body=$(jq -r '.message // "Needs your attention"' <<<"$input") + seq=$(printf '\033]777;notify;%s;%s\007' "$title" "$body") + jq -nc --arg seq "$seq" '{terminalSequence: $seq}' + +The `{ "terminalSequence": "..." }` shape is the same from any shell or language. On Windows, build the escape string in PowerShell or a script and emit the same JSON object. + +`terminalSequence` is the supported replacement for hooks that previously wrote escape sequences directly to `/dev/tty`. The allowlist is restricted to sequences that cannot move the cursor or alter colors, so a hook can never corrupt an on-screen prompt. #### @@ -983,7 +1012,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. +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. #### @@ -1194,6 +1223,20 @@ `description`| string| `"Find API endpoints"`| Short description of the task `subagent_type`| string| `"Explore"`| Type of specialized agent to use `model`| string| `"sonnet"`| Optional model alias to override the default + +In `PostToolUse`, `tool_response` for a completed Agent call carries the subagent’s final text along with usage telemetry. Read these fields to record per-subagent cost from a hook: + +Field| Type| Example| Description +---|---|---|--- +`status`| string| `"completed"`| `"completed"` for synchronous calls, `"async_launched"` for `run_in_background: true` +`agentId`| string| `"a4d2c8f1e0b3a297"`| Identifier for the subagent run +`content`| array| `[{"type": "text", "text": "Found 12 endpoints..."}]`| The subagent’s final text blocks +`totalTokens`| number| `12450`| Total tokens billed across the subagent’s turns +`totalDurationMs`| number| `48211`| Wall-clock duration of the subagent run +`totalToolUseCount`| number| `7`| Count of tool calls the subagent made +`usage`| object| `{"input_tokens": 8320, ...}`| Per-type token breakdown: `input_tokens`, `output_tokens`, `cache_creation_input_tokens`, `cache_read_input_tokens` + +For `run_in_background: true` calls, the tool returns immediately after launching the subagent, so `tool_response` carries no usage fields. It has `status: "async_launched"`, `agentId`, `description`, `prompt`, and `outputFile` instead. ##### AskUserQuestion @@ -2719,7 +2762,7 @@ How async hooks execute -When an async hook fires, Claude Code starts the hook process and immediately continues without waiting for it to finish. The hook receives the same JSON input via stdin as a synchronous hook. After the background process exits, if the hook produced a JSON response with a `systemMessage` or `additionalContext` field, that content is delivered to Claude as context on the next conversation turn. Async hook completion notifications are suppressed by default. To see them, enable verbose mode with `Ctrl+O` or start Claude Code with `--verbose`. +When an async hook fires, Claude Code starts the hook process and immediately continues without waiting for it to finish. The hook receives the same JSON input via stdin as a synchronous hook. After the background process exits, if the hook produced a JSON response with an `additionalContext` field, that content is delivered to Claude as context on the next conversation turn. A `systemMessage` field is shown to you, not to Claude. Async hook completion notifications are suppressed by default. To see them, enable verbose mode with `Ctrl+O` or start Claude Code with `--verbose`. ### @@ -2741,15 +2784,16 @@ exit 0 fi - # Run tests and report results via systemMessage + # Run tests and report results to Claude via additionalContext RESULT=$(npm test 2>&1) EXIT_CODE=$? if [ $EXIT_CODE -eq 0 ]; then - echo "{\"systemMessage\": \"Tests passed after editing $FILE_PATH\"}" + MSG="Tests passed after editing $FILE_PATH" else - echo "{\"systemMessage\": \"Tests failed after editing $FILE_PATH: $RESULT\"}" + MSG="Tests failed after editing $FILE_PATH: $RESULT" fi + jq -nc --arg msg "$MSG" '{hookSpecificOutput: {hookEventName: "PostToolUse", additionalContext: $msg}}' Then add this configuration to `.claude/settings.json` in your project root. The `async: true` flag lets Claude keep working while tests run:
modified Automate workflows with hooks View current →
--- a/hooks-guide.md +++ b/hooks-guide.md @@ -827,7 +827,10 @@ Limitations * 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 timeout is 10 minutes by default, configurable per hook with the `timeout` field (in seconds). + * 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. + * `prompt`: 30 seconds. + * `agent`: 60 seconds. * `PostToolUse` hooks cannot undo actions since the tool has already executed. * `PermissionRequest` hooks do not fire in [non-interactive mode](</docs/en/headless>) (`-p`). Use `PreToolUse` hooks for automated permission decisions. * `Stop` hooks fire whenever Claude finishes responding, not only at task completion. They do not fire on user interrupts. API errors fire [StopFailure](</docs/en/hooks#stopfailure>) instead.
modified Connect Claude Code to tools via MCP View current →
--- a/mcp.md +++ b/mcp.md @@ -435,7 +435,7 @@ Authenticate with remote MCP servers -Many cloud-based MCP servers require authentication. Claude Code supports OAuth 2.0 for secure connections. Claude Code marks a remote server as needing authentication when the server responds with `401 Unauthorized` and a `WWW-Authenticate` header pointing to its authorization server. Any custom server that returns that response gets the same `/mcp` authentication flow as any other remote server. +Many cloud-based MCP servers require authentication. Claude Code supports OAuth 2.0 for secure connections. Claude Code marks a remote server as needing authentication when the server responds with `401 Unauthorized` or `403 Forbidden`. Either status code flags the server in `/mcp` so you can complete the OAuth flow. A custom server that returns a `WWW-Authenticate` header pointing to its authorization server gets the same automatic discovery as any other remote server. 1
modified Agent SDK reference - Python View current →
--- a/python.md +++ b/python.md @@ -2077,7 +2077,7 @@ Returns a `HookJSONOutput` that may contain: * `decision`: `"block"` to block the action - * `systemMessage`: System message to add to the transcript + * `systemMessage`: warning message shown to the user * `hookSpecificOutput`: Hook-specific output data ###
modified Continue local sessions from any device with Remote Control View current →
--- a/remote-control.md +++ b/remote-control.md @@ -118,7 +118,7 @@ Enable Remote Control for all sessions -By default, Remote Control only activates when you explicitly run `claude remote-control`, `claude --remote-control`, or `/remote-control`. To enable it automatically for every interactive session, run `/config` inside Claude Code and set **Enable Remote Control for all sessions** to `true`. Set it back to `false` to disable. With this setting on, each interactive Claude Code process registers one remote session. If you run multiple instances, each one gets its own environment and session. To run multiple concurrent sessions from a single process, use server mode instead. +By default, Remote Control only activates when you explicitly run `claude remote-control`, `claude --remote-control`, or `/remote-control`. To enable it automatically for every interactive session, run `/config` inside Claude Code and set **Enable Remote Control for all sessions** to `true`. Set it back to `false` to disable. In the Desktop app, you can also toggle this from **Settings → Claude Code → Enable remote control by default**. With this setting on, each interactive Claude Code process registers one remote session. If you run multiple instances, each one gets its own environment and session. To run multiple concurrent sessions from a single process, use server mode instead. ##
modified Claude Code settings View current →
--- a/settings.md +++ b/settings.md @@ -546,7 +546,7 @@ Verify active settings -Run `/status` inside Claude Code to see which settings sources are active and where they come from. The output shows each configuration layer (managed, user, project) along with its origin, such as `Enterprise managed settings (remote)`, `Enterprise managed settings (plist)`, `Enterprise managed settings (HKLM)`, `Enterprise managed settings (HKCU)`, or `Enterprise managed settings (file)`. If a settings file contains errors, `/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/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. ###
modified Create custom subagents View current →
--- a/sub-agents.md +++ b/sub-agents.md @@ -164,7 +164,7 @@ * Delete custom subagents * See which subagents are active when duplicates exist -This is the recommended way to create and manage subagents. For manual creation or automation, you can also add subagent files directly. To list all configured subagents from the command line without opening [agent view](</docs/en/agent-view>), pipe the output of `claude agents`. For example, `claude agents | cat` prints agents grouped by source and indicates which are overridden by higher-priority definitions. +This is the recommended way to create and manage subagents. For manual creation or automation, you can also add subagent files directly. ### @@ -182,7 +182,7 @@ `~/.claude/agents/`| All your projects| 4| Interactive or manual Plugin’s `agents/` directory| Where plugin is enabled| 5 (lowest)| Installed with [plugins](</docs/en/plugins>) -**Project subagents** (`.claude/agents/`) are ideal for subagents specific to a codebase. Check them into version control so your team can use and improve them collaboratively. Project subagents are discovered by walking up from the current working directory. Directories added with `--add-dir` [grant file access only](</docs/en/permissions#additional-directories-grant-file-access-not-configuration>) and are not scanned for subagents. To share subagents across projects, use `~/.claude/agents/` or a [plugin](</docs/en/plugins>). **User subagents** (`~/.claude/agents/`) are personal subagents available in all your projects. **CLI-defined subagents** are passed as JSON when launching Claude Code. They exist only for that session and aren’t saved to disk, making them useful for quick testing or automation scripts. You can define multiple subagents in a single `--agents` call: +**Project subagents** (`.claude/agents/`) are ideal for subagents specific to a codebase. Check them into version control so your team can use and improve them collaboratively. Project subagents are discovered by walking up from the current working directory. Directories added with `--add-dir` [grant file access only](</docs/en/permissions#additional-directories-grant-file-access-not-configuration>) and are not scanned for subagents. To share subagents across projects, use `~/.claude/agents/` or a [plugin](</docs/en/plugins>). **User subagents** (`~/.claude/agents/`) are personal subagents available in all your projects. Claude Code scans `.claude/agents/` and `~/.claude/agents/` recursively, so you can organize definitions into subfolders such as `agents/review/` or `agents/research/`. The subdirectory path does not affect how a subagent is identified or invoked, because identity comes only from the `name` frontmatter field. Keep `name` values unique across the whole tree: if two files within one scope declare the same name, Claude Code keeps one and discards the other without warning. Plugin `agents/` directories are also scanned recursively. Unlike project and user scopes, a subfolder inside a plugin’s `agents/` directory becomes part of the scoped identifier: a file at `agents/review/security.md` in plugin `my-plugin` registers as `my-plugin:review:security`. **CLI-defined subagents** are passed as JSON when launching Claude Code. They exist only for that session and aren’t saved to disk, making them useful for quick testing or automation scripts. You can define multiple subagents in a single `--agents` call: * macOS, Linux, WSL @@ -644,11 +644,11 @@ @"code-reviewer (agent)" look at the auth changes -Your full message still goes to Claude, which writes the subagent’s task prompt based on what you asked. The @-mention controls which subagent Claude invokes, not what prompt it receives. Subagents provided by an enabled [plugin](</docs/en/plugins>) appear in the typeahead as `<plugin-name>:<agent-name>`. Named background subagents currently running in the session also appear in the typeahead, showing their status next to the name. You can also type the mention manually without using the picker: `@agent-<name>` for local subagents, or `@agent-<plugin-name>:<agent-name>` for plugin subagents. **Run the whole session as a subagent.** Pass [`--agent <name>`](</docs/en/cli-reference>) to start a session where the main thread itself takes on that subagent’s system prompt, tool restrictions, and model: +Your full message still goes to Claude, which writes the subagent’s task prompt based on what you asked. The @-mention controls which subagent Claude invokes, not what prompt it receives. Subagents provided by an enabled [plugin](</docs/en/plugins>) appear in the typeahead under their scoped name, such as `my-plugin:code-reviewer` or `my-plugin:review:security` when the plugin organizes agents into subfolders. Named background subagents currently running in the session also appear in the typeahead, showing their status next to the name. You can also type the mention manually without using the picker: `@agent-<name>` for local subagents, or `@agent-` followed by the scoped name for plugin subagents, for example `@agent-my-plugin:code-reviewer`. **Run the whole session as a subagent.** Pass [`--agent <name>`](</docs/en/cli-reference>) to start a session where the main thread itself takes on that subagent’s system prompt, tool restrictions, and model: claude --agent code-reviewer -The subagent’s system prompt replaces the default Claude Code system prompt entirely, the same way [`--system-prompt`](</docs/en/cli-reference>) does. `CLAUDE.md` files and project memory still load through the normal message flow. The agent name appears as `@<name>` in the startup header so you can confirm it’s active. This works with built-in and custom subagents, and the choice persists when you resume the session. For a plugin-provided subagent, pass the scoped name: `claude --agent <plugin-name>:<agent-name>`. To make it the default for every session in a project, set `agent` in `.claude/settings.json`: +The subagent’s system prompt replaces the default Claude Code system prompt entirely, the same way [`--system-prompt`](</docs/en/cli-reference>) does. `CLAUDE.md` files and project memory still load through the normal message flow. The agent name appears as `@<name>` in the startup header so you can confirm it’s active. This works with built-in and custom subagents, and the choice persists when you resume the session. For a plugin-provided subagent, pass the scoped name: `claude --agent <plugin-name>:<agent-name>`. If the plugin places the agent in a subfolder of its `agents/` directory, include the subfolder in the scoped name, for example `claude --agent my-plugin:review:security`. To make it the default for every session in a project, set `agent` in `.claude/settings.json`: { "agent": "code-reviewer"
modified Agent SDK reference - TypeScript View current →
--- a/typescript.md +++ b/typescript.md @@ -485,6 +485,7 @@ `fallbackModel`| `string`| `undefined`| Model to use if primary fails `forkSession`| `boolean`| `false`| When resuming with `resume`, fork to a new session ID instead of continuing the original session `hooks`| `Partial<Record<``HookEvent``, ``HookCallbackMatcher``[]>>`| `{}`| Hook callbacks for events +`includeHookEvents`| `boolean`| `false`| Include hook lifecycle events in the message stream as `SDKHookStartedMessage`, `SDKHookProgressMessage`, and `SDKHookResponseMessage` `includePartialMessages`| `boolean`| `false`| Include partial message events `maxBudgetUsd`| `number`| `undefined`| Stop the query when the client-side cost estimate reaches this USD value. Compared against the same estimate as `total_cost_usd`; see [Track cost and usage](</docs/en/agent-sdk/cost-tracking>) for accuracy caveats `maxThinkingTokens`| `number`| `undefined`| _Deprecated:_ Use `thinking` instead. Maximum tokens for thinking process @@ -1813,7 +1814,11 @@ | ReadMcpResourceInput | SubscribeMcpResourceInput | SubscribePollingInput + | TaskCreateInput + | TaskGetInput + | TaskListInput | TaskStopInput + | TaskUpdateInput | TodoWriteInput | UnsubscribeMcpResourceInput | UnsubscribePollingInput @@ -2097,7 +2102,6 @@ **Tool name:** `TaskCreate` - // Not yet exported from the SDK; define locally. type TaskCreateInput = { subject: string; description: string; @@ -2115,7 +2119,6 @@ **Tool name:** `TaskUpdate` - // Not yet exported from the SDK; define locally. type TaskUpdateInput = { taskId: string; status?: "pending" | "in_progress" | "completed" | "deleted"; @@ -2138,7 +2141,6 @@ **Tool name:** `TaskGet` - // Not yet exported from the SDK; define locally. type TaskGetInput = { taskId: string; }; @@ -2153,7 +2155,6 @@ **Tool name:** `TaskList` - // Not yet exported from the SDK; define locally. type TaskListInput = {}; Returns a snapshot of all tasks in the current list. @@ -2250,7 +2251,11 @@ | MonitorOutput | NotebookEditOutput | ReadMcpResourceOutput + | TaskCreateOutput + | TaskGetOutput + | TaskListOutput | TaskStopOutput + | TaskUpdateOutput | TodoWriteOutput | WebFetchOutput | WebSearchOutput; @@ -2642,7 +2647,6 @@ **Tool name:** `TaskCreate` - // Not yet exported from the SDK; define locally. type TaskCreateOutput = { task: { id: string; @@ -2660,7 +2664,6 @@ **Tool name:** `TaskUpdate` - // Not yet exported from the SDK; define locally. type TaskUpdateOutput = { success: boolean; taskId: string; @@ -2682,7 +2685,6 @@ **Tool name:** `TaskGet` - // Not yet exported from the SDK; define locally. type TaskGetOutput = { task: { id: string; @@ -2704,7 +2706,6 @@ **Tool name:** `TaskList` - // Not yet exported from the SDK; define locally. type TaskListOutput = { tasks: Array<{ id: string;
modified Voice dictation View current →
--- a/voice-dictation.md +++ b/voice-dictation.md @@ -14,7 +14,7 @@ Requirements -Voice dictation streams your recorded audio to Anthropic’s servers for transcription. Audio is not processed locally. The speech-to-text service is only available when you authenticate with a Claude.ai account, and is not available when Claude Code is configured to use an Anthropic API key directly, Amazon Bedrock, Google Vertex AI, or Microsoft Foundry. Transcription does not consume Claude messages or tokens and does not count toward the limits shown in `/usage`. See [data usage](</docs/en/data-usage>) for how Anthropic handles your data. Voice dictation also needs local microphone access, so it does not work in remote environments such as [Claude Code on the web](</docs/en/claude-code-on-the-web>) or SSH sessions. In WSL, voice dictation requires WSLg for audio access, which is included with WSL2 on Windows 11. On Windows 10 or WSL1, run Claude Code in native Windows instead. Audio recording uses a built-in native module on macOS, Linux, and Windows. On Linux, if the native module cannot load, Claude Code falls back to `arecord` from ALSA utils or `rec` from SoX. If neither is available, `/voice` prints an install command for your package manager. The Claude Code [VS Code extension](</docs/en/vs-code>) also supports voice dictation with the same Claude.ai account requirement. It is not available in VS Code Remote sessions, including SSH, Dev Containers, and Codespaces, because the microphone is on your local machine and the extension runs on the remote host. +Voice dictation streams your recorded audio to Anthropic’s servers for transcription. Audio is not processed locally. The speech-to-text service is only available when you authenticate with a Claude.ai account, and is not available when Claude Code is configured to use an Anthropic API key directly, Amazon Bedrock, Google Vertex AI, or Microsoft Foundry. Transcription does not consume Claude messages or tokens and does not count toward the limits shown in `/usage`. See [data usage](</docs/en/data-usage>) for how Anthropic handles your data. Voice dictation also needs local microphone access, so it does not work in remote environments such as [Claude Code on the web](</docs/en/claude-code-on-the-web>) or SSH sessions. In WSL, voice dictation requires WSLg for audio access. WSLg is included with WSL2 when installed from the Microsoft Store on Windows 10 or 11. If WSLg is not available, for example on WSL1, run Claude Code in native Windows instead. Audio recording uses a built-in native module on macOS, Linux, and Windows. On Linux, if the native module cannot load, Claude Code falls back to `arecord` from ALSA utils or `rec` from SoX. If neither is available, `/voice` prints an install command for your package manager. The Claude Code [VS Code extension](</docs/en/vs-code>) also supports voice dictation with the same Claude.ai account requirement. It is not available in VS Code Remote sessions, including SSH, Dev Containers, and Codespaces, because the microphone is on your local machine and the extension runs on the remote host. ## @@ -45,7 +45,7 @@ } } -While voice dictation is enabled, the input footer shows a `hold Space to speak` hint when the prompt is empty. The hint text is the same in both modes, and it does not appear if you have a [custom status line](</docs/en/statusline>) configured. Transcription is tuned for coding vocabulary in both modes. Common development terms like `regex`, `OAuth`, `JSON`, and `localhost` are recognized correctly, and your current project name and git branch name are added as recognition hints automatically. +While voice dictation is enabled, the input footer shows a `hold Space to speak` hint when the prompt is empty. The hint reflects your current `voice:pushToTalk` binding and updates if you rebind the dictation key. The hint text is the same in both modes, and it does not appear if you have a [custom status line](</docs/en/statusline>) configured. Transcription is tuned for coding vocabulary in both modes. Common development terms like `regex`, `OAuth`, `JSON`, and `localhost` are recognized correctly, and your current project name and git branch name are added as recognition hints automatically. ## @@ -147,6 +147,7 @@ * **`Voice mode requires a Claude.ai account`** : you are authenticated with an API key or a third-party provider. Run `/login` to sign in with a Claude.ai account. * **`Microphone access is denied`** : grant microphone permission to your terminal in system settings. On macOS, go to System Settings → Privacy & Security → Microphone and enable your terminal app, then run `/voice` again. On Windows, go to Settings → Privacy & security → Microphone and turn on microphone access for desktop apps, then run `/voice` again. If your terminal isn’t listed in the macOS settings, see Terminal not listed in macOS Microphone settings. * **`No audio recording tool found` on Linux**: the native audio module could not load and no fallback is installed. Install SoX with the command shown in the error message, for example `sudo apt-get install sox`. + * **`Voice mode could not find a working audio recorder in WSL`** : WSLg routes audio through PulseAudio rather than an ALSA device, so SoX needs its PulseAudio backend installed explicitly. Run `sudo apt install sox libsox-fmt-pulse`. Installing `sox` alone pulls in the ALSA backend, which cannot record on WSL because there is no `/dev/snd` device. * **`Voice input is failing repeatedly and has been paused`** : voice dictation hit several start-up failures in a row and stopped attempting new sessions until one succeeds. This usually means the microphone or audio stack on this host can’t capture audio, for example a headless server, a remote shell with no audio passthrough, or a denied microphone permission. Confirm a working input device, fix the underlying cause from the entries above, then trigger voice again. * **Nothing happens when holding`Space` in hold mode**: watch the prompt input while you hold. If spaces keep accumulating, voice dictation is likely off; run `/voice hold` to enable it. If only one or two spaces appear and then nothing, voice dictation is on but hold detection is not triggering. Hold detection requires your terminal to send key-repeat events, so it cannot detect a held key if key-repeat is disabled at the OS level. Switch to tap mode with `/voice tap` to avoid the key-repeat requirement. * **Tapping`Space` types a space instead of recording in tap mode**: the first tap only starts recording when the prompt input is empty. Clear the input first, or check that you are in tap mode by running `/voice tap`.