modified Escalate hard decisions with the advisor tool View current →
--- a/advisor.md +++ b/advisor.md @@ -85,14 +85,17 @@ ---|---|--- Haiku 4.5| Fable, Opus, Sonnet| Haiku can call the advisor but cannot act as one Sonnet 4.6| Fable, Opus, Sonnet| -Sonnet 5| Fable, Opus, Sonnet 5| A Sonnet 4.6 advisor is rejected -Opus 4.6| Fable, Opus, Sonnet 5| Sonnet 5 and Opus 4.6 are ranked as equally capable, so an Opus 4.6 main accepts a Sonnet 5 advisor -Opus 4.7 or later| Fable, and Opus 4.7 or later| Opus 4.7 and later Opus models are ranked as equally capable, so any of them accepts another as an advisor. An Opus 4.7 main with an Opus 4.6 or Sonnet 5 advisor is rejected -Fable 5.1 or Fable 5| Fable 5.1 or Fable 5| An Opus or Sonnet advisor is rejected - -Fable 5.1 requires Claude Code v2.1.257 or later. Both Fable models require [Fable access](</docs/en/model-config#work-with-fable>). Set the advisor as `fable`, `opus`, or `sonnet`. These aliases resolve to Claude Code’s built-in default version for each model family, which advances with new Claude Code releases. You can also pass a full model ID such as `claude-opus-5`. Subagents inherit the configured advisor and apply the same pairing check against their own model. Claude Code validates the pairing before sending a request: - - * If the advisor is less capable than the main model, the advisor is not attached to the main model’s requests. The `/advisor` command output and a notification show this. Subagents whose own model satisfies the pairing may still use the advisor. +Sonnet 5| Fable, Opus 4.7 or later, Sonnet 5| A Sonnet 4.6 advisor is rejected, and requests with an Opus 4.6 advisor fail with an API error +Opus 4.6| Fable, Opus, Sonnet 5| A Sonnet 4.6 advisor is rejected +Opus 4.7 or Opus 4.8| Fable, and Opus 4.7 or later| An Opus 4.6 or Sonnet advisor is rejected +Opus 5| Fable, Opus 5| An Opus 4.6 or Sonnet advisor is rejected, and requests with an Opus 4.7 or Opus 4.8 advisor fail with an API error +Fable 5| Fable 5.1 or Fable 5| An Opus or Sonnet advisor is rejected +Fable 5.1| Fable 5.1| An Opus or Sonnet advisor is rejected, and requests with a Fable 5 advisor fail with an API error + +Fable 5.1 requires Claude Code v2.1.257 or later. Both Fable models require [Fable access](</docs/en/model-config#work-with-fable>). Set the advisor as `fable`, `opus`, or `sonnet`. These aliases resolve to Claude Code’s built-in default version for each model family, which advances with new Claude Code releases. You can also pass a full model ID such as `claude-opus-5`. Subagents inherit the configured advisor and apply the same pairing check against their own model. Claude Code validates the pairing before sending a request, and the API validates it again: + + * For an advisor the table lists as rejected, Claude Code doesn’t attach it to the main model’s requests. The `/advisor` command output and a notification show this. Subagents whose own model satisfies the pairing may still use the advisor. + * For an advisor the table lists as failing with an API error, Claude Code attaches it and the API refuses it. Every request fails with `'<advisor model>' cannot be used as an advisor when the request model is '<main model>'` until you change the advisor with `/advisor` or turn it off. * If the main model or the advisor is a model Claude Code does not recognize, the advisor is not attached. ###
modified How the agent loop works View current →
--- a/agent-loop.md +++ b/agent-loop.md @@ -43,7 +43,7 @@ * `"init"`: session metadata for the run. When a `SessionStart` or `Setup` hook runs during session startup, its [hook lifecycle messages](</docs/en/agent-sdk/typescript#sdkhookstartedmessage>) arrive before the `init` message * `"compact_boundary"`: fires after compaction * `"informational"`: plain-text status banners from the loop - * `"worker_shutting_down"`: the loop will end after the current turn because the host is exiting or Remote Control disconnected + * `"worker_shutting_down"`: the host is exiting or Remote Control disconnected In TypeScript, each subtype other than `"init"` is its own type in the [`SDKMessage` union](</docs/en/agent-sdk/typescript#sdkmessage>) rather than a subtype of `SDKSystemMessage`. * **`AssistantMessage`:** emitted for each content block in Claude’s responses, including the final text-only one. Each carries a single content block, such as text or a tool call, and the messages from one response share a message ID. * **`UserMessage`:** emitted after each tool execution with the tool result content sent back to Claude. Also emitted for any user inputs you stream mid-loop. @@ -220,7 +220,7 @@ `"xhigh"`| Extended reasoning depth| Coding and agentic tasks on the [models that support it](</docs/en/model-config#adjust-effort-level>) `"max"`| Maximum reasoning depth| Multi-step problems requiring deep analysis -If you don’t set `effort`, both SDKs leave the parameter unset and defer to the model’s default behavior. +If you don’t set `effort`, Claude Code resolves the effort level itself, in the order [Adjust effort level](</docs/en/model-config#adjust-effort-level>) describes. `effort` trades latency and token cost for reasoning depth within each response. [Extended thinking](<https://platform.claude.com/docs/en/build-with-claude/extended-thinking>) is a separate feature that produces `thinking` blocks in the output, and the `display` field on `ThinkingConfig` for [Python](</docs/en/agent-sdk/python#thinkingconfig>) or [TypeScript](</docs/en/agent-sdk/typescript#thinkingconfig>) controls whether you receive their text. They are independent: you can set `effort: "low"` with extended thinking enabled, or `effort: "max"` without it. @@ -343,7 +343,7 @@ `success`| Claude finished the task normally| Yes `error_max_turns`| Hit the `maxTurns` limit before finishing| No `error_max_budget_usd`| Hit the `maxBudgetUsd` limit before finishing| No -`error_during_execution`| An error interrupted the loop (for example, an API failure or cancelled request)| No +`error_during_execution`| An error interrupted the loop (for example, a cancelled request)| No `error_max_structured_output_retries`| No valid structured output was produced within the configured retry limit: every attempt failed validation, or a model fallback retracted the completed output with no successful retry| No The `result` field holds the final text output and is only present on the `success` variant, so always check the subtype before reading it. All result subtypes carry `total_cost_usd`, `usage`, `num_turns`, and `session_id` so you can track cost and resume even after errors. Two things to guard for:
modified Use Claude Code with Chrome View current →
--- a/chrome.md +++ b/chrome.md @@ -106,12 +106,7 @@ Browser tools in plan mode -In [plan mode](</docs/en/permission-modes#analyze-before-you-edit-with-plan-mode>), browser tool calls that only read the page or browser state run without a permission prompt, and calls that change state prompt for approval. - - * **Read-only calls** : `read_page`, `get_page_text`, `find`, reading console messages or network requests, and taking a screenshot - * **State-changing calls** : clicks, typing, navigation, tab and window management, and recording a GIF - -An otherwise read-only call also prompts for approval when it sets a state-changing input flag, such as `createIfEmpty` on `tabs_context_mcp`, `clear` on the console and network readers, or `save_to_disk` on a screenshot. A `browser_batch` call runs without a prompt only when every action inside it is read-only. +In [plan mode](</docs/en/permission-modes#analyze-before-you-edit-with-plan-mode>), a permission prompt appears before Claude records a GIF, opens a new tab, or runs a shortcut. If [bypass permissions mode is available](</docs/en/permission-modes#skip-all-checks-with-bypasspermissions-mode>) in your session and [feature-flag fetching](</docs/en/env-vars#features-that-need-feature-flag-fetching>) is off, these calls run without a prompt. A `tabs_context_mcp` call also prompts when it sets `createIfEmpty`, and so does a `browser_batch` call that includes any of these actions. ##
modified Use Claude Code features in the SDK View current →
--- a/claude-code-features.md +++ b/claude-code-features.md @@ -176,7 +176,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 `{}` 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. See the [hooks guide](</docs/en/agent-sdk/hooks>) for the full callback signature and return types. +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. See the [hooks guide](</docs/en/agent-sdk/hooks>) for the full callback signature and return types. Python
modified Use Claude Code on the web View current →
--- a/claude-code-on-the-web.md +++ b/claude-code-on-the-web.md @@ -63,7 +63,7 @@ `--cloud` creates cloud sessions. `--remote-control` is unrelated: it exposes a local CLI session for monitoring from the web. See [Remote Control](</docs/en/remote-control>). -Use `/tasks` in the Claude Code CLI to check progress, or open the session on claude.ai or the Claude mobile app to interact directly. From there you can steer Claude, provide feedback, or answer questions as in any other conversation. If Claude asks a question and the session sits idle, you can still answer when you come back, up to environment expiry, and the session continues from your answer. +Open the session on claude.ai or the Claude mobile app to check progress or interact directly. From there you can steer Claude, provide feedback, or answer questions as in any other conversation. If Claude asks a question and the session sits idle, you can still answer when you come back, up to environment expiry, and the session continues from your answer. #### @@ -85,7 +85,7 @@ claude --cloud "Update the API documentation" claude --cloud "Refactor the logger to use structured output" -Monitor all sessions with `/tasks` in the Claude Code CLI. When a session completes, you can create a PR from the web interface or teleport the session to your terminal to continue working. +When a session completes, you can create a PR from the web interface or teleport the session to your terminal to continue working. #### @@ -100,7 +100,7 @@ Bundled repositories must meet these limits: * The directory must be a git repository with at least one commit - * The bundled repository must be under 100 MB. Larger repositories fall back to bundling only the current branch, then to a single squashed snapshot of the working tree, and fail only if the snapshot is still too large + * The bundled repository must be under 100 MB. Larger repositories fall back to bundling only the current branch, then to a single squashed snapshot of the working tree, and fail if the snapshot is still too large * Untracked files are not included; run `git add` on files you want the cloud session to see * Sessions created from a bundle can push back to a GitHub remote only when your GitHub connection has push access to that repository @@ -168,7 +168,7 @@ Requirement| Details ---|--- Clean git state| Your working directory must have no uncommitted changes. Teleport prompts you to stash changes if needed. -Correct repository| You must run `--teleport` from a checkout of the same repository, not a fork. If you run it from a checkout of a different repository, Claude Code shows an error that names both the session’s repository and your checkout’s. If Claude Code can’t parse your remote into a hostname, for example an SSH host alias like `git@work:owner/repo.git`, it asks you to confirm, and accepts the checkout when the remote’s owner and repository name match the session’s repository. +Correct repository| You must run `--teleport` from a checkout of the same repository, not a fork. If you run it from a checkout of a different repository, Claude Code shows an error that names both the session’s repository and your checkout’s. Before v2.1.219, the error didn’t name your checkout’s repository. If Claude Code can’t parse your remote into a hostname, for example an SSH host alias like `git@work:owner/repo.git`, it asks you to confirm, and accepts the checkout when the remote’s owner and repository name match the session’s repository. Branch available| The branch from the cloud session must have been pushed to the remote. Teleport automatically fetches and checks it out. Same account| You must be authenticated to the same claude.ai account used in the cloud session.
modified Let Claude use your computer from the CLI View current →
--- a/computer-use.md +++ b/computer-use.md @@ -106,7 +106,7 @@ One session at a time -Only one session at a time can use your computer. A session takes a machine-wide lock at its first computer use action and releases it when the session exits, not when the task finishes. A second session’s computer use fails with an error naming the session that holds the lock. Exit that session first. +Only one session at a time can use your computer. A session takes a lock at its first computer use action and releases it when the session exits, not when the task finishes. A second session’s computer use fails with an error naming the session that holds the lock. Exit that session first. ### @@ -130,7 +130,7 @@ Stop at any time -When Claude acquires the lock, a macOS notification appears: “Claude is using your computer · press Esc to stop.” Press `Esc` anywhere to abort the current action immediately, or press `Ctrl+C` in the terminal. Either way, Claude stops, unhides your apps, and returns control to you. The session keeps the computer use lock until it exits. A second notification appears when Claude is done. +The first time Claude uses your computer in each turn, a macOS notification appears: “Claude is using your computer · press Esc to stop.” Press `Esc` anywhere to abort the current action immediately, or press `Ctrl+C` in the terminal. Either way, Claude stops, unhides your apps, and returns control to you. The session keeps the computer use lock until it exits. A second notification appears when Claude is done. ##
modified Desktop application View current →
--- a/desktop.md +++ b/desktop.md @@ -407,7 +407,7 @@ Run long-running tasks remotely -For large refactors, test suites, migrations, or other long-running tasks, select **Cloud** instead of **Local** when starting a session. Cloud sessions run on Anthropic-managed infrastructure by default and continue even if you close the app or shut down your computer. Check back anytime to see progress or steer Claude in a different direction. You can also monitor cloud sessions from [claude.ai/code](<https://claude.ai/code>) or the [Claude mobile app](</docs/en/mobile>). Cloud sessions also support multiple repositories. After selecting a cloud environment, click the **+** button next to the repo pill to add additional repositories to the session. Each repo gets its own branch selector. This is useful for tasks that span multiple codebases, such as updating a shared library and its consumers. See [Claude Code on the web](</docs/en/claude-code-on-the-web>) for more on how cloud sessions work. +For large refactors, test suites, migrations, or other long-running tasks, select **Cloud** instead of **Local** when starting a session. Cloud sessions run on Anthropic-managed infrastructure by default and continue even if you close the app or shut down your computer. Check back anytime to see progress or steer Claude in a different direction. You can also monitor cloud sessions from [claude.ai/code](<https://claude.ai/code>) or the [Claude mobile app](</docs/en/mobile>). Cloud sessions also support multiple repositories. After selecting a cloud environment, click the **+** button next to the selected repository to add more repositories to the session. Each repo gets its own branch selector. This is useful for tasks that span multiple codebases, such as updating a shared library and its consumers. See [Claude Code on the web](</docs/en/claude-code-on-the-web>) for more on how cloud sessions work. ### @@ -770,7 +770,7 @@ `disableAutoMode`| set to `"disable"` to remove [Auto](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) mode from the mode selector. Also accepted under `permissions`. `autoMode`| customize what the auto mode classifier trusts and blocks across your organization. See [Configure auto mode](</docs/en/auto-mode-config>). `browserExternalPageTools`| set to `"disabled"` to prevent Claude from using tools to read or act on external pages in the Browser pane. Users can still navigate to external sites themselves, and local dev server previews are unaffected. -`disableMobileSimulatorTools`| set to `true` to block Claude’s tools for controlling and capturing devices in the [iOS Simulator pane](</docs/en/desktop-ios-simulator#turn-off-simulator-access>). The pane stays usable for the user’s own taps; only Claude’s access is removed. +`disableMobileSimulatorTools`| set to `true` to block Claude’s tools for controlling and capturing devices in the [iOS Simulator pane](</docs/en/desktop-ios-simulator#turn-off-simulator-access>). The pane stays usable for the user’s own taps; only Claude’s access is removed. The value must be the JSON boolean `true`; the string `"true"` is ignored. `disableBrowserExternalNavigation`| set to `true` to turn off external browsing in the Browser pane entirely. Neither users nor Claude can navigate to external sites, and localhost dev server previews are unaffected. The value must be the JSON boolean `true`; the string `"true"` is ignored. `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.
modified Claude Code with GitHub Enterprise Server View current →
--- a/github-enterprise-server.md +++ b/github-enterprise-server.md @@ -112,7 +112,7 @@ claude --cloud "Add retry logic to the payment webhook handler" -The session clones your repository from GHES and pushes changes back to a branch. Monitor progress with `/tasks` or at [claude.ai/code](<https://claude.ai/code>). See [Claude Code on the web](</docs/en/claude-code-on-the-web>) for the full cloud session workflow including diff review, auto-fix, and routines. +The session clones your repository from GHES and pushes changes back to a branch. Monitor progress at [claude.ai/code](<https://claude.ai/code>). See [Claude Code on the web](</docs/en/claude-code-on-the-web>) for the full cloud session workflow including diff review, auto-fix, and routines. ###
modified Keep Claude working toward a goal View current →
--- a/goal.md +++ b/goal.md @@ -15,7 +15,7 @@ Approach| Next turn starts when| Stops when ---|---|--- -`/goal`| The previous turn finishes, or an idle check-in comes due while background work keeps the goal waiting, up to three times per goal between your prompts| A model confirms the condition is met or judges it impossible, or a turn fails on an error you have to fix, or you run `/goal clear` +`/goal`| The previous turn finishes, or, in an interactive session, an idle check-in or an automatic retry comes due| A model confirms the condition is met or judges it impossible, or a turn fails on an error you have to fix, or you run `/goal clear` [`/loop`](</docs/en/scheduled-tasks#run-a-prompt-repeatedly-with-%2Floop>)| A time interval elapses| You stop it, or Claude decides the work is done [Stop hook](</docs/en/hooks-guide#prompt-based-hooks>)| The previous turn finishes| Your own script or prompt decides @@ -127,6 +127,14 @@ ​ +When a turn fails + +When a turn fails, Claude Code clears the goal if the error is one you have to fix. After any other error the goal stays set. + +#### + +​ + Errors you have to fix clear the goal If a turn fails on an error that won’t clear until you fix it, Claude Code clears the goal and prints a warning naming the cause. The warning starts with `Goal cleared after an unrecoverable error` and ends with `Run /goal again to continue`. Fix the cause, then set the goal again with `/goal <condition>`. Four kinds of failure clear the goal: @@ -136,7 +144,18 @@ * A context overflow that [auto-compaction](</docs/en/model-config#set-the-auto-compact-window>) couldn’t clear * A model that isn’t available -After any other failure, including transient errors such as rate limits and overloaded servers, Claude Code leaves the goal active. +#### + +​ + +Other errors retry or pause the goal + +After any other failure the goal stays set. In an interactive session on Claude Code v2.1.269 or later, Claude Code also prints a line naming the cause and either retries on its own or waits for you: + + * **Retry** : after a failure that tends to clear on its own, such as an overloaded server or a dropped connection, a notice starting with `Goal still active` shows the wait before the next attempt. After three automatic retries, the goal pauses instead. + * **Pause** : after a failure that a retry would only repeat, such as an API rate limit, a claude.ai [usage limit](</docs/en/errors#youve-hit-your-session-limit>), or a hook that ended the turn, a notice starting with `Goal paused` names the cause. If the session is [waiting to continue automatically when a usage limit resets](</docs/en/interactive-mode#wait-for-a-usage-limit-to-reset>), Claude resumes work toward the goal then. + +Send a message at any time to start the next turn immediately. To turn automatic retries off, set [`CLAUDE_CODE_GOAL_CHECKIN_MINUTES`](</docs/en/env-vars>) to `0`, which also turns check-ins off. ### @@ -149,7 +168,7 @@ * **When a turn ends** : Claude Code delivers the check-in at the end of the next turn that finishes with the work still running. In a non-interactive session, such as one started with `-p`, this is the only way Claude Code delivers check-ins. * **While the session is idle** : in an interactive session, Claude Code also starts a turn on its own to deliver the check-in instead of waiting for your next prompt. If the background work has stopped without reporting a result, Claude Code asks Claude to continue toward the goal. Claude Code starts at most three idle check-ins per goal between your prompts. In the third idle check-in, Claude Code says that idle check-ins are paused until you send another prompt. Before v2.1.246, idle check-ins were uncapped. Idle check-ins require Claude Code v2.1.236 or later. -Before v2.1.239, only idle check-ins backed off this way; a check-in delivered at a turn end recurred at the first interval. To change the first interval, set [`CLAUDE_CODE_GOAL_CHECKIN_MINUTES`](</docs/en/env-vars>). Claude Code uses your value in place of the 30-minute interval and scales the later intervals with it. Set it to `0` to turn check-ins off. Check-ins require Claude Code v2.1.234 or later. +Before v2.1.239, only idle check-ins backed off this way; a check-in delivered at a turn end recurred at the first interval. To change the first interval, set [`CLAUDE_CODE_GOAL_CHECKIN_MINUTES`](</docs/en/env-vars>). Claude Code uses your value in place of the 30-minute interval and scales the later intervals with it. Set it to `0` to turn off check-ins and automatic retries. Check-ins require Claude Code v2.1.234 or later. ###
modified Intercept and control agent behavior with hooks View current →
--- a/hooks.md +++ b/hooks.md @@ -589,7 +589,7 @@ Make HTTP requests from hooks -Hooks can perform asynchronous operations like HTTP requests. Catch errors inside your hook instead of letting them propagate, since an unhandled exception can interrupt the agent. This example sends a webhook after each tool completes, logging which tool ran and when. The hook catches errors so a failed webhook doesn’t interrupt the agent: +Hooks can perform asynchronous operations like HTTP requests. Catch errors inside your hook instead of letting them propagate. This example sends a webhook after each tool completes, logging which tool ran and when. The hook catches errors from a failed webhook: Python @@ -625,7 +625,7 @@ # Run the blocking HTTP call in a thread to avoid blocking the event loop await asyncio.to_thread(_send_webhook, input_data["tool_name"]) except Exception as e: - # Log the error but don't raise. A failed webhook shouldn't stop the agent + # Log the error but don't raise print(f"Webhook request failed: {e}") return {} @@ -652,7 +652,7 @@ if (error instanceof Error && error.name === "AbortError") { console.log("Webhook request cancelled"); } - // Don't re-throw. A failed webhook shouldn't stop the agent + // Don't re-throw } return {}; @@ -894,7 +894,6 @@ A `UserPromptSubmit` hook that spawns subagents can create infinite loops if those subagents trigger the same hook. To prevent this: - * Check for a subagent indicator in the hook input before spawning * Use a shared variable or session state to track whether you’re already inside a subagent * Scope hooks to only run for the top-level agent session
modified Connect to external tools with MCP View current →
--- a/mcp.md +++ b/mcp.md @@ -150,7 +150,7 @@ ---|---|--- stdio server, or HTTP/SSE server without a cached tool list| Yes, until it connects| [`MCP_TIMEOUT`](</docs/en/env-vars>), 30 seconds by default; the connection fails at that deadline Remote server with a cached tool list, saved by Claude Code from a previous connection| No; the cached tools are available from the first turn| None; connects on its first tool call, and that deferred connect has its own timeout -In-process SDK server| No; never delays the first turn| None +In-process SDK server| Yes, until it connects and lists its tools| None; the connect and tool listing requests each have their own timeout To block startup itself at a separate, earlier phase than the first-turn wait, before the init message is sent:
modified Claude Code on mobile View current →
--- a/mobile.md +++ b/mobile.md @@ -58,7 +58,7 @@ Continue a local session with Remote Control -Remote Control connects the Claude app to a Claude Code session running on your machine, so code execution and filesystem access stay local while you drive the session from your phone. Start the session on your computer with `claude remote-control`, or run `/remote-control` in a session that’s already open. Then scan the session QR code the terminal can display, or open the Claude app, tap **Code** , and pick the session from the list. See [connect from another device](</docs/en/remote-control#connect-from-another-device>) for each option. When you add an attachment in the Claude app, it reaches the local session too: +Remote Control connects the Claude app to a Claude Code session running on your machine, so code execution and filesystem access stay local while you drive the session from your phone. Start the session on your computer with `claude remote-control`, or run `/remote-control` in a session that’s already open. Then scan the QR code the terminal can display, or open the Claude app, tap **Code** , and pick the session from the list. See [connect from another device](</docs/en/remote-control#connect-from-another-device>) for each option. When you add an attachment in the Claude app, it reaches the local session too: * **Photos** : Claude sees attached photos directly as part of your message. Claude Code also saves each photo under `~/.claude/uploads/` and tells Claude the saved file path, so Claude can copy the image into files it creates. * **Other files** : Claude Code downloads them to your machine and passes them to Claude as `@` file references.
modified Modifying system prompts View current →
--- a/modifying-system-prompts.md +++ b/modifying-system-prompts.md @@ -154,7 +154,7 @@ const options = { settings: { outputStyle: "Explanatory" } }; -The Python SDK does not have an option to select an output style programmatically. For code-only deployments where you can’t write to `.claude/settings.local.json`, use `append` or a custom prompt string instead. **Note for SDK users:** Output styles are loaded when you include `settingSources: ['user']` or `settingSources: ['project']` (TypeScript) / `setting_sources=["user"]` or `setting_sources=["project"]` (Python) in your options. +In the Python SDK, set `outputStyle` through the `settings` option, which takes a JSON string such as `'{"outputStyle": "Explanatory"}'` or a path to a settings file that sets it. **Note for SDK users:** Output styles are loaded when you include `settingSources: ['user']` or `settingSources: ['project']` (TypeScript) / `setting_sources=["user"]` or `setting_sources=["project"]` (Python) in your options. ###
modified Agent SDK overview View current →
--- a/overview.md +++ b/overview.md @@ -10,7 +10,7 @@ If you’re…| Use| Why ---|---|--- -Building an agent without implementing the tool loop yourself| **Agent SDK**| A library that runs the agent loop in your own process, in Python or TypeScript. +Building an agent without implementing the tool loop yourself| **Agent SDK**| A Python or TypeScript library that runs the agent loop for you. Doing interactive development or running one-off tasks from a terminal| [**Claude Code CLI**](</docs/en/overview>)| The terminal interface, built for daily interactive use. Calling the API directly and implementing the tool loop yourself| [**Client SDK**](<https://platform.claude.com/docs/en/api/client-sdks>)| Direct access to the Anthropic API rather than to Claude Code. You implement the tool loop yourself. Running long-running or asynchronous agents without managing your own sandbox or session infrastructure| [**Managed Agents**](<https://platform.claude.com/docs/en/managed-agents/overview>)| Hosted REST API, a separate product from the Agent SDK. Anthropic runs the agent and the sandbox.
modified Plugins in the SDK View current →
--- a/plugins.md +++ b/plugins.md @@ -59,7 +59,7 @@ Plugin paths can be: - * **Relative paths** : resolved relative to your current working directory (for example, `"./plugins/my-plugin"`) + * **Relative paths** : resolved relative to the `cwd` option (for example, `"./plugins/my-plugin"`) * **Absolute paths** : full file system paths (for example, `"/home/user/plugins/my-plugin"`) The path should point to the plugin’s root directory: the parent of `skills/`, `agents/`, `hooks/`, `commands/`, or `.claude-plugin/`.
modified Agent SDK reference - Python View current →
--- a/python.md +++ b/python.md @@ -298,7 +298,7 @@ `summary`| `str`| Display title: custom title, auto-generated summary, or first prompt `last_modified`| `int`| Last modified time in milliseconds since epoch `file_size`| `int | None`| Session file size in bytes (`None` for remote storage backends) -`custom_title`| `str | None`| User-set session title +`custom_title`| `str | None`| Session title: the user-set title, or the auto-generated title when none is set `first_prompt`| `str | None`| First meaningful user prompt in the session `git_branch`| `str | None`| Git branch at the end of the session `cwd`| `str | None`| Working directory for the session @@ -526,7 +526,7 @@ async def receive_messages(self) -> AsyncIterator[Message] async def receive_response(self) -> AsyncIterator[Message] async def interrupt(self) -> None - async def set_permission_mode(self, mode: str) -> None + async def set_permission_mode(self, mode: PermissionMode) -> None async def set_model(self, model: str | None = None) -> None async def rewind_files(self, user_message_id: str) -> None async def get_mcp_status(self) -> McpStatusResponse @@ -557,7 +557,7 @@ `reconnect_mcp_server(server_name)`| Retry connecting to an MCP server that failed or was disconnected `toggle_mcp_server(server_name, enabled)`| Enable or disable an MCP server mid-session. Disabling removes its tools `stop_task(task_id)`| Stop a running background task. A `TaskNotificationMessage` with status `"stopped"` follows in the message stream -`get_server_info()`| Get server information including session ID and capabilities +`get_server_info()`| Get the server’s initialization info, including available commands and output styles `disconnect()`| Disconnect from Claude #### @@ -1967,7 +1967,14 @@ Union type of all content blocks. - ContentBlock = TextBlock | ThinkingBlock | ToolUseBlock | ToolResultBlock + ContentBlock = ( + TextBlock + | ThinkingBlock + | ToolUseBlock + | ToolResultBlock + | ServerToolUseBlock + | ServerToolResultBlock + ) ### @@ -3503,7 +3510,7 @@ `allowedDomains`| `list[str]`| `[]`| Domain names that sandboxed processes can access `deniedDomains`| `list[str]`| `[]`| Domain names that sandboxed processes cannot access. Takes precedence over `allowedDomains` `allowManagedDomainsOnly`| `bool`| `False`| Managed-settings only: when set in managed settings, ignore `allowedDomains` and `WebFetch(domain:...)` allow rules from non-managed settings sources. Has no effect when set via SDK options -`allowUnixSockets`| `list[str]`| `[]`| Unix socket paths that processes can access (e.g., Docker socket) +`allowUnixSockets`| `list[str]`| `[]`| macOS only: Unix socket paths that processes can access, such as the Docker socket. Ignored on Linux `allowAllUnixSockets`| `bool`| `False`| Allow access to all Unix sockets `allowLocalBinding`| `bool`| `False`| Allow processes to bind to local ports (e.g., for dev servers) `allowMachLookup`| `list[str]`| `[]`| macOS only: XPC/Mach service names to allow. Supports a trailing wildcard
modified All settings View current →
--- a/settings-reference.md +++ b/settings-reference.md @@ -253,7 +253,7 @@ `advisorModel` -Pick which model answers when Claude calls the server-side [advisor tool](</docs/en/advisor>). Unset it to turn the advisor off. The advisor must be at least as capable as your main model; when it isn’t, Claude Code sends requests without the advisor. See [Choose an advisor model](</docs/en/advisor#choose-an-advisor-model>). You don’t usually edit this key by hand. Run `/advisor` to open a picker that shows the current choice, the models that can advise, and **No advisor**. Claude Code saves your pick to this key in `~/.claude/settings.json`. If you pick from a [Remote Control](</docs/en/remote-control>) client or in a session attached to a remote worker, the pick applies to that session only and doesn’t change this key. If your account requires the [usage-credits consent](</docs/en/advisor#fable-advisor-and-usage-credits>), accept it first by running `/model fable`. Until you do, picking Fable in `/advisor` saves nothing and Claude Code tells you to run `/model fable` first. +Pick which model answers when Claude calls the server-side [advisor tool](</docs/en/advisor>). Unset it to turn the advisor off. The advisor must be at least as capable as your main model. See [Choose an advisor model](</docs/en/advisor#choose-an-advisor-model>) for the accepted pairings and what happens when you pick one that isn’t accepted. You don’t usually edit this key by hand. Run `/advisor` to open a picker that shows the current choice, the models that can advise, and **No advisor**. Claude Code saves your pick to this key in `~/.claude/settings.json`. If you pick from a [Remote Control](</docs/en/remote-control>) client or in a session attached to a remote worker, the pick applies to that session only and doesn’t change this key. If your account requires the [usage-credits consent](</docs/en/advisor#fable-advisor-and-usage-credits>), accept it first by running `/model fable`. Until you do, picking Fable in `/advisor` saves nothing and Claude Code tells you to run `/model fable` first. * **Scope** : `Any file` * **Type** : string, one of the aliases `"fable"`, `"opus"`, or `"sonnet"`, which resolve to Claude Code’s current default version of that model family, or a full model ID such as `"claude-opus-5"`
modified Extend agents with skills View current →
--- a/skills.md +++ b/skills.md @@ -87,7 +87,7 @@ Confirm skills loaded -Near the start of the stream, the SDK yields a system message with subtype `init`. Check its `skills` array to confirm your skills loaded before Claude starts working. The array includes the user-invocable skills that you have defined, along with [bundled skills included with Claude Code](</docs/en/skills#bundled-skills>). The array lists user-invocable skills only. A skill with [`user-invocable: false`](</docs/en/skills#control-who-invokes-a-skill>) in its frontmatter loads and remains available to Claude, but doesn’t appear in the array. The array reflects what the session discovered and lists the same skills whether or not they’re in your `skills` list. +Near the start of the stream, the SDK yields a system message with subtype `init`. Check its `skills` array to confirm your skills loaded before Claude starts working. The array includes the user-invocable skills that you have defined with a `description` or `when_to_use` frontmatter field, along with [bundled skills included with Claude Code](</docs/en/skills#bundled-skills>). The array lists user-invocable skills only. A skill with [`user-invocable: false`](</docs/en/skills#control-who-invokes-a-skill>) in its frontmatter loads and remains available to Claude, but doesn’t appear in the array. The array lists the same skills whether or not they’re in your `skills` list. ### @@ -149,7 +149,7 @@ Available commands: ["clear", "compact", "context", "usage", "code-review", "verify", "security-check", ...] -Your user-invocable skills appear in both this list and the `skills` array from Confirm skills loaded. The `slash_commands` list adds the rest of the commands available in your session. A skill with [`user-invocable: false`](</docs/en/skills#control-who-invokes-a-skill>) in its frontmatter doesn’t appear in either. Sessions that configure [MCP servers](</docs/en/agent-sdk/mcp>) can also expose [MCP prompts as commands](</docs/en/mcp#use-mcp-prompts-as-commands>). +A skill with [`user-invocable: false`](</docs/en/skills#control-who-invokes-a-skill>) in its frontmatter doesn’t appear in this list or in the `skills` array from Confirm skills loaded. Sessions that configure [MCP servers](</docs/en/agent-sdk/mcp>) can also expose [MCP prompts as commands](</docs/en/mcp#use-mcp-prompts-as-commands>). ###
modified Stream responses in real-time View current →
--- a/streaming-output.md +++ b/streaming-output.md @@ -67,33 +67,10 @@ When partial messages are enabled, you receive raw Claude API streaming events wrapped in an object. The type has different names in each SDK: - * **Python** : `StreamEvent` (import from `claude_agent_sdk.types`) - * **TypeScript** : `SDKPartialAssistantMessage` with `type: 'stream_event'` - -Both contain raw Claude API events, not accumulated text. You need to extract and accumulate text deltas yourself. Here’s the structure of each type: - -Python - -TypeScript - - @dataclass - class StreamEvent: - uuid: str # Unique identifier for this event - session_id: str # Session identifier - event: dict[str, Any] # The raw Claude API stream event - parent_tool_use_id: str | None # Always None - - type SDKPartialAssistantMessage = { - type: "stream_event"; - event: BetaRawMessageStreamEvent; // From Anthropic SDK - parent_tool_use_id: string | null; - uuid: UUID; - session_id: string; - ttft_ms?: number; // Time to first token in ms, present only on message_start events - user_message_uuid?: string; - }; - -The `parent_tool_use_id` field is always `None` in Python and `null` in TypeScript. Stream events are emitted for the main session only; token-level deltas from subagents aren’t forwarded. To attribute output to a subagent, use complete messages, which carry `parent_tool_use_id`. See [Detect subagent invocation](</docs/en/agent-sdk/subagents#detect-subagent-invocation>). Claude Code sets `user_message_uuid` on the turn’s first non-ping stream event, and again when the message the turn is answering changes, under the conditions in [`user_message_uuid`](</docs/en/agent-sdk/typescript#user_message_uuid>). The Python `StreamEvent` doesn’t expose this field. The `event` field contains the raw streaming event from the [Claude API](<https://platform.claude.com/docs/en/build-with-claude/streaming#event-types>). Common event types include: + * **Python** : [`StreamEvent`](</docs/en/agent-sdk/python#streamevent>) (import from `claude_agent_sdk.types`) + * **TypeScript** : [`SDKPartialAssistantMessage`](</docs/en/agent-sdk/typescript#sdkpartialassistantmessage>) with `type: 'stream_event'` + +Both contain raw Claude API events, not accumulated text. You need to extract and accumulate text deltas yourself. The `parent_tool_use_id` field is always `None` in Python and `null` in TypeScript. Stream events are emitted for the main session only; token-level deltas from subagents aren’t forwarded. To attribute output to a subagent, use complete messages, which carry `parent_tool_use_id`. See [Detect subagent invocation](</docs/en/agent-sdk/subagents#detect-subagent-invocation>). Claude Code sets `user_message_uuid` on the turn’s first non-ping stream event, and again when the message the turn is answering changes, under the conditions in [`user_message_uuid`](</docs/en/agent-sdk/typescript#user_message_uuid>). The Python `StreamEvent` doesn’t expose this field. The `event` field contains the raw streaming event from the [Claude API](<https://platform.claude.com/docs/en/build-with-claude/streaming#event-types>). Common event types include: Event Type| Description ---|---
modified Agent SDK reference - TypeScript View current →
--- a/typescript.md +++ b/typescript.md @@ -510,7 +510,7 @@ `debug`| `boolean`| `false`| Enable debug mode for the Claude Code process `debugFile`| `string`| `undefined`| Write debug logs to a specific file path. Implicitly enables debug mode `disallowedTools`| `string[]`| `[]`| Tools to deny. A bare name such as `"Bash"` removes the tool from Claude’s context. A scoped rule such as `"Bash(rm *)"` leaves the tool available and denies matching calls in every permission mode, including `bypassPermissions`, for the command [as written](</docs/en/permissions#bash-rule-limits>). See [Permissions](</docs/en/agent-sdk/permissions#allow-and-deny-rules>) -`effort`| `'low' | 'medium' | 'high' | 'xhigh' | 'max'`| Model default| Controls how much effort Claude puts into its response. Works with adaptive thinking to guide thinking depth. See [adjust the effort level](</docs/en/model-config#adjust-effort-level>) +`effort`| `'low' | 'medium' | 'high' | 'xhigh' | 'max'`| `undefined`| Controls how much effort Claude puts into its response. Works with adaptive thinking to guide thinking depth. See [adjust the effort level](</docs/en/model-config#adjust-effort-level>) `enableFileCheckpointing`| `boolean`| `false`| Enable file change tracking for rewinding. See [File checkpointing](</docs/en/agent-sdk/file-checkpointing>) `env`| `Record<string, string | undefined>`| `process.env`| Environment variables. When set, this replaces the subprocess environment instead of merging with `process.env`, so pass `{ ...process.env, YOUR_VAR: 'value' }` to keep inherited variables like `PATH`. See Handle slow or stalled API responses for an example of this pattern, and [Environment variables](</docs/en/env-vars>) for variables the underlying CLI reads. Set `CLAUDE_AGENT_SDK_CLIENT_APP` to identify your app in the User-Agent header `executable`| `'bun' | 'deno' | 'node'`| Auto-detected| JavaScript runtime to use
modified Handle approvals and user input View current →
--- a/user-input.md +++ b/user-input.md @@ -1,4 +1,4 @@ -While working on a task, Claude sometimes needs to check in with users. It might need permission before deleting files, or need to ask which database to use for a new project. Your application needs to surface these requests to users so Claude can continue with their input. Claude requests user input in two situations: when it needs **permission to use a tool** (like deleting files or running commands), and when it has **clarifying questions** (via the `AskUserQuestion` tool). Both trigger your `canUseTool` callback, which pauses execution until you return a response. This is different from normal conversation turns where Claude finishes and waits for your next message. For clarifying questions, Claude generates the questions and options. Your role is to present them to users and return their selections. You can’t add your own questions to this flow; if you need to ask users something yourself, do that separately in your application logic. The callback can stay pending indefinitely. Execution remains paused until your callback returns, and the SDK only cancels the wait when the query itself is cancelled. If a user might take longer to respond than your process can reasonably stay running, register a [`PreToolUse` hook](</docs/en/agent-sdk/hooks>) that returns the [`defer` decision](</docs/en/hooks#defer-a-tool-call-for-later>) instead of waiting in the callback, so the process can exit and resume later from the persisted session. This guide shows you how to detect each type of request and respond appropriately. +While working on a task, Claude sometimes needs to check in with users. It might need permission before deleting files, or need to ask which database to use for a new project. Your application needs to surface these requests to users so Claude can continue with their input. Claude requests user input in two situations: when it needs **permission to use a tool** (like deleting files or running commands), and when it has **clarifying questions** (via the `AskUserQuestion` tool). Both trigger your `canUseTool` callback, which pauses execution until you return a response. This is different from normal conversation turns where Claude finishes and waits for your next message. For clarifying questions, Claude generates the questions and options. Your role is to present them to users and return their selections. You can’t add your own questions to this flow; if you need to ask users something yourself, do that separately in your application logic. The callback can stay pending indefinitely. Execution remains paused until your callback returns. If a user might take longer to respond than your process can reasonably stay running, register a [`PreToolUse` hook](</docs/en/agent-sdk/hooks>) that returns the [`defer` decision](</docs/en/hooks#defer-a-tool-call-for-later>) instead of waiting in the callback, so the process can exit and resume later from the persisted session. This guide shows you how to detect each type of request and respond appropriately. ## @@ -170,8 +170,6 @@ })) { if ("result" in message) console.log(message.result); } - -In Python, `can_use_tool` requires [streaming mode](</docs/en/agent-sdk/streaming-vs-single-mode>). When you pass a finite message stream through `query(prompt=generator)` or `ClaudeSDKClient.connect(prompt=async_iterable)`, the SDK closes the input stream after the last message, before the permission callback can be invoked, unless a registered hook or in-process MCP server is keeping it open. The example above keeps it open with a `PreToolUse` hook that returns `{"continue_": True}`. Connecting with no prompt and sending messages through `ClaudeSDKClient.query()` keeps the stream open on its own and needs no hook. This example uses a `y/n` flow where any input other than `y` is treated as a denial. In practice, you might build a richer UI that lets users modify the request, provide feedback, or redirect Claude entirely. See Respond to tool requests for all the ways you can respond.
modified Use Claude Code in VS Code View current →
--- a/vs-code.md +++ b/vs-code.md @@ -94,11 +94,14 @@ * **Command menu** : click `/` or type `/` to open the command menu. Options include attaching files, switching models, and toggling extended thinking. The Customize section provides access to MCP servers, slash commands, output styles, hooks, memory, permissions, and plugins. Items with a terminal icon open in the integrated terminal. * To browse commands such as `/usage` or [`/remote-control`](</docs/en/remote-control>), select **Slash commands** in the Customize section. A dialog lists them with a filter box. Pick one to run it. Typing `/` in the prompt box still suggests commands inline. Requires Claude Code v2.1.257 or later. * Select **Output styles** in the Customize section to pick an [output style](</docs/en/output-styles>), including your custom styles. Requires Claude Code v2.1.257 or later. To create a custom style instead, select **Build a custom style** from the **Output styles** menu. Claude Code writes the [style file](</docs/en/output-styles#create-a-custom-output-style>) for you at the project or user level. Requires Claude Code v2.1.261 or later. + * Select **Hooks** in the Customize section to view the [hooks](</docs/en/hooks>) loaded in the session, grouped by event. You can add, edit, or remove hooks saved in your user, project, and local settings files. Hooks from other sources, such as managed settings or plugins, are read-only. Requires Claude Code v2.1.269 or later. + * Select **Permissions** in the Customize section to view the session’s [permission rules](</docs/en/permissions>), grouped into Allow, Ask, and Deny. You can add rules to your user, project, or local settings and remove rules saved there. Rules from other sources, such as managed settings or approvals made for this session only, are read-only. Requires Claude Code v2.1.269 or later. * The Settings section includes **Enable Remote Control for all sessions** , which sets [`remoteControlAtStartup`](</docs/en/settings-reference#remotecontrolatstartup>) to control whether [new interactive sessions connect to Remote Control automatically](</docs/en/remote-control#enable-remote-control-for-all-sessions>). Requires Claude Code v2.1.203 or later. When you turn the toggle on or off in a VS Code window, the change applies to the sessions already open in that VS Code window, not only to sessions you start afterwards. If you turn it off, the open sessions disconnect. With Claude Code v2.1.261 or later, the change also reaches sessions open in your other VS Code windows. - * The Settings section also includes **Focus view** , which hides tool calls, tool results, and thinking behind expandable rows, leaving your prompts and Claude’s responses. Claude’s latest to-do list stays visible, and so does the text a pending question from Claude is asking about; this requires Claude Code v2.1.225 or later. Toggle it there, with `Ctrl+Option+F` (Mac) / `Ctrl+Alt+F` (Windows/Linux), or from the Command Palette with **Claude Code: Toggle Focus view**. The change applies to every open session and persists across sessions. Requires Claude Code v2.1.221 or later. + * The Settings section also includes **Focus view** , which hides tool calls, tool results, and thinking behind expandable rows, leaving your prompts and Claude’s responses. Toggle it there, with `Ctrl+Option+F` (Mac) / `Ctrl+Alt+F` (Windows/Linux), or from the Command Palette with **Claude Code: Toggle Focus view**. The change applies to every open session and persists across sessions. Requires Claude Code v2.1.221 or later. Claude’s latest to-do list stays visible, and so does the text a pending question from Claude is asking about; this requires Claude Code v2.1.225 or later. While Claude runs [subagents](</docs/en/sub-agents>), live progress rows with their latest activity appear under the tool-call group that started them. This requires Claude Code v2.1.269 or later. * To report a bug, click **Report a problem** at the bottom of the menu, or type `/bug` or `/feedback` with an optional description that prefills the report. When you submit the report and you’re signed in to Anthropic on a first-party connection, Claude Code sends it to Anthropic. On a third-party provider, or without Anthropic credentials, the dialog still opens, but submitting shows an error and sends nothing: unlike the CLI’s `/bug`, the extension doesn’t write a local archive. Requires Claude Code v2.1.229 or later. * **Side questions** : type `/btw` followed by a question to ask about your session [without adding to the conversation](</docs/en/interactive-mode#side-questions-with-%2Fbtw>). The answer opens in a panel beside the chat, where you can ask follow-up questions. The thread survives window reloads. Claude Code keeps the newest 20 exchanges and expires stored threads on the [`cleanupPeriodDays`](</docs/en/settings-reference#cleanupperioddays>) schedule, as long as Claude Code can [safely determine the retention period](</docs/en/claude-directory#cleaned-up-automatically>). To clear a thread, click the trash icon in the panel. Requires Claude Code v2.1.227 or later. * **Context indicator** : the prompt box shows how much of Claude’s context window you’re using. Claude automatically compacts when needed, or you can run `/compact` manually. + * **Agent map** : when the conversation includes [subagents](</docs/en/sub-agents>), an agent count such as **2 agents** appears at the bottom of the prompt box. Its dot shows whether any subagent is working or waiting for your permission. Click the agent count to open the agent map, which draws the conversation’s subagents as a tree under the main agent, each with its status, elapsed time, and token count. Click a subagent to see its prompt and tool calls, open its read-only transcript, or stop it while it runs. Requires Claude Code v2.1.269 or later. * **Extended thinking** : lets Claude spend more time reasoning through complex problems. Toggle it on via the command menu (`/`). Claude’s reasoning appears in the conversation as collapsed blocks: click a block to read it, or press `Ctrl+O` to expand or collapse every thinking block in the session. See [Extended thinking](</docs/en/model-config#extended-thinking>) for details. * **Multi-line input** : press `Shift+Enter` to add a new line without sending. This also works in the “Other” free-text input of question dialogs. @@ -113,7 +116,7 @@ Explain the logic in @auth (fuzzy matches auth.js, AuthService.ts, etc.) What's in @src/components/ (include a trailing slash for folders) -For large PDFs, you can ask Claude to read specific pages instead of the whole file: a single page, a range like pages 1-10, or an open-ended range like page 3 onward. When you select text in the editor, Claude can see your highlighted code automatically. The prompt box footer shows how many lines are selected. Press `Option+K` (Mac) / `Alt+K` (Windows/Linux) to insert an @-mention with the file path and line numbers (e.g., `@app.ts#5-10`). Click the selection indicator to toggle whether Claude can see your highlighted text - the eye-slash icon means the selection is hidden from Claude. To attach an image, paste it from your clipboard into the prompt box. You can also hold `Shift` while dragging files into the prompt box to add them as attachments. Click the X on any attachment to remove it from context. +For large PDFs, you can ask Claude to read specific pages instead of the whole file: a single page, a range like pages 1-10, or an open-ended range like page 3 onward. When you select text in the editor, Claude can see your highlighted code automatically. The prompt box footer shows how many lines are selected. Press `Option+K` (Mac) / `Alt+K` (Windows/Linux) to insert an @-mention with the file path and line numbers (e.g., `@app.ts#5-10`). Click the **X** on the selection indicator to remove it so Claude doesn’t receive the selection. The indicator comes back when you select other text or switch to a different file. To attach an image, paste it from your clipboard into the prompt box. You can also hold `Shift` while dragging files into the prompt box to add them as attachments. Click the X on any attachment to remove it from context. ### @@ -212,7 +215,7 @@ * **Group or ungroup a session** : right-click a session to create a group from it, move it into an existing group, or remove it from its group. Each session belongs to one group at a time, so moving it into another group removes it from the first. * **Move several sessions at once** : `Cmd`-click (Mac) / `Ctrl`-click (Windows/Linux) each session, or `Shift`-click to select a range, then right-click the selection. - * **Group a session from its tab** : run **Claude Code: Add Session Tab to Group** from the Command Palette, or right-click the session’s editor tab, then pick or create a group. Requires Claude Code v2.1.257 or later. + * **Group a session from its tab** : run **Claude Code: Add Session Tab to Group** from the Command Palette, then pick or create a group. Requires Claude Code v2.1.257 or later. * **Rename or delete a group** : right-click a group header. Deleting a group removes only the group, and its sessions return to the ungrouped list. The extension saves groups per workspace folder, so they survive window reloads and appear in every window where you open the same folder. When you search the list, the extension shows matches in one flat list across all groups. @@ -327,9 +330,9 @@ Reopen Closed Session| `Cmd+Shift+T` (Mac) / `Ctrl+Shift+T` (Windows/Linux)| Reopen the most recently closed Claude session tab. Falls through to VS Code’s normal reopen-closed-editor when the last closed tab wasn’t a Claude session. Disable with `enableReopenClosedSessionShortcut` Insert @-Mention Reference| `Option+K` (Mac) / `Alt+K` (Windows/Linux)| Insert a reference to the current file and selection (requires editor to be focused) Toggle Focus view| `Ctrl+Option+F` (Mac) / `Ctrl+Alt+F` (Windows/Linux)| Hide or show tool activity in the conversation. Works while a Claude panel or sidebar is visible. Requires Claude Code v2.1.221 or later -Rename Session Tab| -| Rename the session in the active Claude tab. The command also appears in the tab’s right-click menu. Requires Claude Code v2.1.257 or later -Add Session Tab to Group| -| Add the session in the active Claude tab to a session group you pick or create. The command also appears in the tab’s right-click menu. Requires Claude Code v2.1.257 or later -Mark Session as Unread| -| Mark the session in the active Claude tab as unread in the sessions list. The command also appears in the tab’s right-click menu. Requires Claude Code v2.1.257 or later +Rename Session Tab| -| Rename the session in the active Claude tab. Requires Claude Code v2.1.257 or later +Add Session Tab to Group| -| Add the session in the active Claude tab to a session group you pick or create. Requires Claude Code v2.1.257 or later +Mark Session as Unread| -| Mark the session in the active Claude tab as unread in the sessions list. Requires Claude Code v2.1.257 or later Show Logs| -| View extension debug logs Logout| -| Sign out of your Anthropic account
modified Get started with Claude Code on the web View current →
--- a/web-quickstart.md +++ b/web-quickstart.md @@ -83,7 +83,7 @@ Connect from your terminal -If you already use the GitHub CLI (`gh`), you can set up Claude Code on the web without opening a browser. This requires the [Claude Code CLI](</docs/en/quickstart>). On Team and Enterprise plans, `/web-setup` is available only after an Owner turns on [Quick web setup](</docs/en/claude-code-on-the-web#github-authentication-options>). When you run `/web-setup`, Claude Code reads the token that `gh auth token` prints, asks you to confirm, and sends the token to Anthropic. Anthropic stores it encrypted with your claude.ai account, and your cloud sessions use it for GitHub access until you remove it. A cloud session can then access any repository that token can access, with no Claude GitHub App installation. If you already connected GitHub in the browser, `/web-setup` warns you that continuing replaces that connection for your cloud sessions. +If you already use the GitHub CLI (`gh`), you can set up Claude Code on the web from your terminal. This requires the [Claude Code CLI](</docs/en/quickstart>). On Team and Enterprise plans, `/web-setup` is available only after an Owner turns on [Quick web setup](</docs/en/claude-code-on-the-web#github-authentication-options>). When you run `/web-setup`, Claude Code reads the token that `gh auth token` prints, asks you to confirm, and sends the token to Anthropic. Anthropic stores it encrypted with your claude.ai account, and your cloud sessions use it for GitHub access until you remove it. A cloud session can then access any repository that token can access, with no Claude GitHub App installation. If you already connected GitHub in the browser, `/web-setup` warns you that continuing replaces that connection for your cloud sessions. Organizations with [Zero Data Retention](</docs/en/zero-data-retention>) enabled cannot use `/web-setup` or other cloud session features. If the GitHub CLI isn’t installed or isn’t authenticated, Claude Code opens the browser onboarding flow instead.