Follow Discord
Sweep 03 Dec 2026 · 19:13Z Build v2.1.336 553 read Stable v2.1.332 Latest v2.1.336 Next v2.1.336 Feeds RSS JSON llms.txt llms-full.txt Unofficial
One capture · claude-code

One read of Claude Code CLIclaude-code-20261128T183701Z

20 pages moved out of 221 read.

Pages moved 20 significant first
Pages read 221 in this capture
Captured 18:37 UTC
Corpus hash cda31bdb259c corpus-hash

What this read moved

1-20 of 20

agent-sdk/mcp Changed · +3 / -3 lines

from line 390
390390> mcpServers: {
391391> "api-server": {
392392> command: "npx",
393> args: ["-y", "@your-org/api-mcp-server"],
393> args: ["-y", "<MCP_SERVER_PACKAGE>"],
394394> env: {
395395> API_KEY: process.env.API_KEY
396396> }
from line 406
406406> mcp_servers={
407407> "api-server": {
408408> "command": "npx",
409> "args": ["-y", "@your-org/api-mcp-server"],
409> "args": ["-y", "<MCP_SERVER_PACKAGE>"],
410410> "env": {"API_KEY": os.environ["API_KEY"]},
411411> }
412412> },
from line 421
421421> "mcpServers": {
422422> "api-server": {
423423> "command": "npx",
424> "args": ["-y", "@your-org/api-mcp-server"],
424> "args": ["-y", "<MCP_SERVER_PACKAGE>"],
425425> "env": {
426426> "API_KEY": "${API_KEY}"
427427> }

agent-sdk/typescript Changed · +19 / -1 lines

This page is larger than the 256 KiB this site keeps, so one side of the diff below stops where the stored text does.

from line 2169
21692169| - | - |
21702170| `interrupt_receipt_v1` | [`interrupt()`](#query-object) resolves with an [`SDKControlInterruptResponse`](#sdkcontrolinterruptresponse) receipt listing the messages that were pending when the interrupt arrived |
21712171| `interrupt_cancel_queued_v1` | The `interrupt` control request honors `cancel_queued: true`, cancelling the messages the receipt would otherwise list under `still_queued` and listing them under `cancelled` instead. See [`SDKControlInterruptResponse`](#sdkcontrolinterruptresponse). Requires Claude Code v2.1.219 or later |
2172| `ask_user_question_unanswered_v1` | Your application can mark a skipped [`AskUserQuestion`](#askuserquestion) question with `unanswered`. Claude Code advertises this capability in v2.1.312 or later |
21722173| `sdk_mcp_manifests` | The `initialize` control request accepts `sdkMcpServerManifests`, MCP handshake results captured from your in-process [SDK MCP servers](https://code.claude.com/docs/en/agent-sdk/custom-tools.md). Claude Code advertises this capability in v2.1.286 or later |
21732174| `sdk_mcp_tools_list_changed` | A `tools/list_changed` notification from an [SDK MCP server](https://code.claude.com/docs/en/agent-sdk/custom-tools.md) makes Claude Code list that server's tools again, so a tool the server adds mid-session reaches Claude. Claude Code advertises this capability in v2.1.286 or later |
21742175 
from line 3405
34043405 
34053406Asks the user clarifying questions during execution. See [Handle approvals and user input](https://code.claude.com/docs/en/agent-sdk/user-input.md#handle-clarifying-questions) for usage details.
34063407 
3408When a user skips a question, describe the skip in `answers`, which Claude reads. To tell a skip from an answer in [`tool_use_result`](#sdkusermessage), also set [`unanswered`](#askuserquestion-2) on that question's entry in `updatedInput.annotations`. Set `unanswered` only when [`SDKSystemMessage.capabilities`](#sdksystemmessage) lists `ask_user_question_unanswered_v1`.
3409 
3410This `canUseTool` return value sets `answers` and `unanswered`:
3411 
3412```typescript theme={null}
3413return {
3414 behavior: "allow",
3415 updatedInput: {
3416 questions: input.questions,
3417 answers: { "Which database should I use?": "The user skipped this question" },
3418 annotations: { "Which database should I use?": { unanswered: "skipped" } }
3419 }
3420};
3421```
3422 
34073423### Bash
34083424 
34093425**Tool name:** `Bash`
from line 4215
41994215 }>;
42004216 answers: Record<string, string>;
42014217 response?: string;
4202 annotations?: Record<string, { preview?: string; notes?: string }>;
4218 annotations?: Record<string, { preview?: string; notes?: string; unanswered?: "skipped" | "replied_in_chat" | "dismissed" }>;
42034219 afkTimeoutMs?: number;
42044220};
42054221```
from line 4222
42064222 
42074223Returns the questions asked and the user's answers. `response` is set when the user typed a freeform reply instead of answering the structured questions; when present, Claude receives "The user responded: …" instead of the per-question answer list.
42084224 
4225When your app sets `unanswered`, use `skipped` if the user skipped the question, `replied_in_chat` if they sent a chat message instead, or `dismissed` if they closed the question.
4226 
42094227### Bash
42104228 
42114229**Tool name:** `Bash`
from line 4630
46124630>
46134631> This default set applies in Claude Code v2.1.268 and later, which the TypeScript Agent SDK bundles from v0.3.268.
46144632>
4615> See [Model availability](https://code.claude.com/docs/en/agent-sdk/todo-tracking.md#model-availability) to opt in.
4616 
4617### TaskCreate
4618 
4619**Tool name:** `TaskCreate`
4620 
4621```typescript theme={null}
4622type TaskCreateOutput = {
4623 task: {
4624 id: string;
4625 subject: string;
4626 };
4627};
4628```
4629 
4630Returns the created task with its assigned ID.
4631 
4632### TaskUpdate
4633 
4634**Tool name:** `TaskUpdate`
4635 
4636```typescript theme={null}
4637type TaskUpdateOutput = {
4638 success: boolean;
4639 taskId: string;
4640 updatedFields: string[];
4641 error?: string;
4642 statusChange?: {
4643 from: string;
4644 to: string;
4645 };
4646};
4647```
4648 
4649Returns the update result, including which fields changed.
4650 
4651### TaskGet
4652 
4653**Tool name:** `TaskGet`
4654 
4655```typescript theme={null}
4656type TaskGetOutput = {
4657 task: {
4658 id: string;
4659 subject: string;
4660 description: string;
4661 status: "pending" | "in_progress" | "completed";
4662 blocks: string[];
4663 blockedBy: string[];
4664 } | null;
4665};
4666```
4667 
4668Returns the full task record, or `null` when the ID is not found.
4669 
4670### TaskList
4671 
4672**Tool name:** `TaskList`
4673 
4674```typescript theme={null}
4675type TaskListOutput = {
4676 tasks: Array<{
4677 id: string;
4678 subject: string;
4679 status: "pending" | "in_progress" | "completed";
4680 owner?: strin
4633> See [Model availability](https:

amazon-bedrock Changed · +9 / -5 lines

from line 230
230230 
231231Set these environment variables to specific Amazon Bedrock model IDs.
232232 
233Without `ANTHROPIC_DEFAULT_OPUS_MODEL`, the `opus` alias on Amazon Bedrock resolves to Opus 5.5, and without `ANTHROPIC_DEFAULT_SONNET_MODEL`, the `sonnet` alias resolves to Sonnet 4.5. This example pins each alias to a specific version:
233Without `ANTHROPIC_DEFAULT_OPUS_MODEL`, the `opus` alias on Amazon Bedrock resolves to Opus 5.5. Without `ANTHROPIC_DEFAULT_SONNET_MODEL`, the `sonnet` alias resolves to Sonnet 4.5, or to Sonnet 5 in a session that uses only [Mantle](#use-the-mantle-endpoint).
234234 
235This example pins each alias to a specific version:
236 
235237```bash theme={null}
236238export ANTHROPIC_DEFAULT_OPUS_MODEL='us.anthropic.claude-opus-4-8'
237239export ANTHROPIC_DEFAULT_SONNET_MODEL='us.anthropic.claude-sonnet-4-6'
from line 256
254256| Model type | Default model |
255257| :- | :- |
256258| Primary model | Opus 5.5, for example `us.anthropic.claude-opus-5-5` in a `us-*` region |
257| Small/fast model | Sonnet 4.5, for example `us.anthropic.claude-sonnet-4-5-20250929-v1:0` in a `us-*` region |
259| Small/fast model | Sonnet 4.5 on the Invoke API, for example `us.anthropic.claude-sonnet-4-5-20250929-v1:0` in a `us-*` region |
258260 
259261Before v2.1.280, the primary model on Amazon Bedrock defaulted to Opus 5 and the `opus` alias resolved to Opus 5 from v2.1.219.
260262 
261Background tasks such as session title generation use the small/fast model, normally a Haiku-class model. On Amazon Bedrock, Claude Code uses the default Sonnet model for background tasks because Haiku may not be enabled in every account or region. Two selections change which model carries them:
263Background tasks such as session title generation use the small/fast model, normally a Haiku-class model. On the Invoke API, Claude Code uses the default Sonnet model for background tasks because Haiku may not be enabled in every account or region. In a session that uses only [Mantle](#use-the-mantle-endpoint), background tasks use the primary model. Two selections change which model carries them:
262264 
263265* When you select a primary model with `--model`, `ANTHROPIC_MODEL`, or the `model` setting, background tasks use that model. When Claude Code starts the session on the model you set with [`ANTHROPIC_DEFAULT_MODEL`](https://code.claude.com/docs/en/model-config#set-a-default-model-for-new-sessions), background tasks use that model too. Setting `ANTHROPIC_DEFAULT_OPUS_MODEL` without `ANTHROPIC_DEFAULT_SONNET_MODEL` also counts as a selection, because the built-in Sonnet model may not be enabled in an account that steers its own Opus.
264266* To use Haiku for background tasks, set `ANTHROPIC_DEFAULT_HAIKU_MODEL` to a model ID that is available in your account.
from line 267
265267 
266268> [!WARNING]
267269>
268> Opus models have a higher per-token price than Sonnet models, so if you don't pin a primary model, you're billed at the Opus rate. To use Sonnet 4.5 as the primary model, set `ANTHROPIC_MODEL` to its full model ID. A deployment that steers the default with `ANTHROPIC_DEFAULT_SONNET_MODEL` and doesn't set `ANTHROPIC_DEFAULT_OPUS_MODEL` keeps its steered Sonnet model as the default.
270> Opus models have a higher per-token price than Sonnet models, so if you don't pin a primary model, you're billed at the Opus rate. To use Sonnet 4.5 as the primary model, set `ANTHROPIC_MODEL` to its full model ID. On the Invoke API, a deployment that steers the default with `ANTHROPIC_DEFAULT_SONNET_MODEL` and doesn't set `ANTHROPIC_DEFAULT_OPUS_MODEL` keeps its steered Sonnet model as the default, unless [`enforceAvailableModels`](https://code.claude.com/docs/en/model-config#enforce-the-allowlist-for-the-default-model) is on.
269271 
270272To customize models further, use one of these methods:
271273 
from line 343
341343 
342344If you set [`enforceAvailableModels`](https://code.claude.com/docs/en/model-config#enforce-the-allowlist-for-the-default-model) in managed settings, the startup model checks use only models your `availableModels` list permits. This applies on the Amazon Bedrock Invoke API and requires Claude Code v2.1.287 or later. A list without `enforceAvailableModels` doesn't restrict these checks.
343345 
344The checks compare each entry with the inference profile ID they would send, including its [region prefix](#cross-region-inference-profile-prefixes), so write the list in those IDs. This example permits Opus 4.8 and Sonnet 4.5 for a deployment whose models resolve to `us.` profiles:
346The checks compare each entry with the inference profile ID they would send, including its [region prefix](#cross-region-inference-profile-prefixes), so write the list in those IDs.
347 
348This example permits Opus 4.8 and Sonnet 4.5 for a deployment whose models resolve to `us.` profiles:
345349 
346350```json theme={null}
347351{

artifacts Changed · +52 / -0 lines

## Sync a design system from your repository ### Move a design system from standalone Claude Design ### Check why `/design-sync` didn't publish an artifact

from line 349
349349 
350350A document that belongs in the codebase, such as a README, stays a file. To get a file for something Claude would otherwise put in Claude Docs, name the format, such as `.docx` or a Markdown file in the repository. To turn off only the `claude.ai Claude Docs` connector, see [Disable claude.ai connectors](https://code.claude.com/docs/en/mcp.md#disable-claude-ai-connectors). Keep the connector on if you use the Sheets template, which needs it too.
351351 
352## Sync a design system from your repository
353 
354[`/design-sync`](https://code.claude.com/docs/en/commands#all-commands) publishes the components in a React design system's repository to claude.ai as a [Design System artifact](https://support.claude.com/en/articles/14604397), so your designs use your real components.
355 
356Run `/design-sync` at the Claude Code prompt in the repository, optionally with a hint such as the design system's name:
357 
358```text wrap theme={null}
359/design-sync Acme DS
360```
361 
362If the repository has no earlier sync, Claude asks you to confirm a name, creates a new artifact, and gives you its link. A first-time sync verifies every component and can take a few hours on a large repository. The new artifact is private to you until you [share it](#share-an-artifact). To keep syncing to the same artifact:
363 
364* **Change the design system in the code**: the artifact's page is read-only after a sync, so edit the code and run `/design-sync` again.
365* **Commit `.design-sync/artifact.json`**: Claude records the artifact's link in this file, so you and your teammates update the same artifact on later syncs.
366* **Let teammates sync**: on Team and Enterprise plans, make them [editors](#let-someone-edit-with-you) of the artifact so their syncs can publish to it.
367 
368### Move a design system from standalone Claude Design
369 
370If your repository synced to standalone Claude Design, the separate site at claude.ai/design, move the design system to an artifact. The site closes by December 14, 2026. If the design system has already moved, `/design-sync` follows it without asking about the move, so go to step 4.
371 
372**1. Get the design system's link**
373 
374When `/design-sync` asks "Move this design system to Claude now?", select **Move it to Claude**. Claude gives you the link to the design system's page in standalone Claude Design and waits for you to say how the move went. To send this sync to standalone Claude Design and get the question again next time, select **Not now**.
375 
376**2. Start the move**
377 
378If you own the design system, open the link and [start the move](https://support.claude.com/en/articles/17440474-move-from-standalone-claude-design-to-claude). If someone else owns it, send them the link. Ask them to tell you when the move finishes and to make you an [editor](#let-someone-edit-with-you) of the artifact.
379 
380**3. Sync to the moved design system**
381 
382After the move finishes, tell Claude it's done or run `/design-sync` again.
383 
384**4. Check the files and confirm**
385 
386You can't undo this sync's changes to the artifact. When Claude shows the artifact's link and the files to replace or remove, decide whether you need the current versions of those files:
387 
388* **You don't need them**: confirm.
389* **You need them or aren't sure**: decline, open the artifact's link, and select **Duplicate** in the title menu to keep a backup. If **Duplicate** is unavailable, ask the owner to duplicate the artifact. Then run `/design-sync` again and confirm.
390 
391### Check why `/design-sync` didn't publish an artifact
392 
393If `/design-sync` says it can't publish, offers only to build locally, or uploads to standalone Claude Design when you didn't choose that, check each of these requirements:
394 
395* Claude Code v2.1.329 or later, with [feature-flag fetching](https://code.claude.com/docs/en/env-vars.md#features-that-need-feature-flag-fetching) on
396* A local session where [artifacts are available](#availability) for your plan and sign-in. [Cloud sessions](https://code.claude.com/docs/en/claude-code-on-the-web.md) and sessions served by [`claude remote-control`](https://code.claude.com/docs/en/remote-control) can't sync to an artifact.
397* On Team and Enterprise plans, **Design systems** turned on under [**Organization settings > Artifacts**](https://claude.ai/admin-settings/artifacts). It's on by default on Team plans and off on Enterprise plans. If your organization uses custom roles, your role also needs the [**Design systems** capability](https://support.claude.com/en/articles/16994751-artifacts-admin-guide-for-team-and-enterprise-plans#h_d830917488). If either is missing, ask an Owner to turn on the setting or add the capability to your role.
398* If the design system already has an artifact, permission to edit that artifact as the owner or an [editor](#let-someone-edit-with-you), and no [public link](#share-an-artifact) to it. Ask the owner to make you an editor or remove the public link.
399 
400If the design system has no artifact yet and your version or session misses one of the first two requirements, `/design-sync` uploads to standalone Claude Design at claude.ai/design. That site closes by December 14, 2026.
401 
402After you fix what's missing, start a new session and run `/design-sync` again.
403 
352404## Page constraints
353405 
354406Each artifact is served under a strict Content Security Policy (CSP) that limits what the page can do.

errors Changed · +12 / -4 lines

This page is larger than the 256 KiB this site keeps, so one side of the diff below stops where the stored text does.

from line 37
3737| `Auto mode classifier transcript exceeded context window` | [Server errors](#auto-mode-cannot-determine-the-safety-of-an-action) |
3838| `Agent aborted: auto mode classifier request refused by the safety safeguard` | [Server errors](#auto-mode-cannot-determine-the-safety-of-an-action) |
3939| `The server-side auto mode classifier gave no verdict` | [Server errors](#the-server-returned-no-safety-verdict) |
40| `Auto mode fell back to billed classifier requests` | [What else `denyInsteadOfPrompting` stops](https://code.claude.com/docs/en/settings-reference#what-else-denyinsteadofprompting-stops) |
4041| `<tool> was not reviewed and did not run: the conversation is too long for auto mode's classifier` | [Server errors](#was-not-reviewed-and-did-not-run) |
4142| `Auto mode is unavailable — the server returned no safety verdict for the last 10 responses` | [Server errors](#the-server-returned-no-safety-verdict) |
4243| `Agent terminated early due to an API error` | [Server errors](#agent-terminated-early-due-to-an-api-error) |
from line 156
155156| `Microsoft Foundry authentication failed` | [Authentication](#microsoft-foundry-authentication-failed) |
156157| `Gateway refused the request` | [Authentication](#gateway-refused-the-request) |
157158| `Could not load AWS credentials` / `Could not load Google Cloud credentials` | [Authentication](#could-not-load-aws-or-google-cloud-credentials) |
159| `Could not load Azure credentials` | [Foundry credentials not loading](https://code.claude.com/docs/en/troubleshoot-install.md#bedrock-agent-platform-or-foundry-credentials-not-loading) |
158160| `AWS default-chain credential resolve timed out` | [Authentication](#aws-default-chain-credential-resolve-timed-out) |
159161| `Timed out after 60s waiting for AWS` | [Authentication](#bedrock-setup-verification-timed-out-waiting-for-aws) |
160162| `A request to AWS timed out. Check your network and proxy settings, then try again.` | [Authentication](#bedrock-setup-verification-timed-out-waiting-for-aws) |
from line 265
263265| `Couldn't verify your organization's policy for cloud sessions` | [Command-line errors](#couldnt-verify-your-organizations-policy-for-cloud-sessions) |
264266| `Cloud sessions aren't available:` followed by why your organization's policy couldn't be loaded | [Command-line errors](#couldnt-verify-your-organizations-policy-for-cloud-sessions) |
265267| `Branch '<branch>' was not checked out` | [Teleport requirements](https://code.claude.com/docs/en/claude-code-on-the-web.md#teleport-requirements) |
268| `Loaded from the session's last compaction, so the messages it summarized aren't here.` | [Continue a cloud session in your terminal](https://code.claude.com/docs/en/claude-code-on-the-web.md#from-cloud-to-terminal) |
266269| `Cloud sessions aren't available with this Console sign-in. They need a claude.ai sign-in.` | [Unable to get organization UUID](https://code.claude.com/docs/en/claude-code-on-the-web.md#unable-to-get-organization-uuid) |
267270| `Cloud sessions need a claude.ai sign-in` | [Unable to get organization UUID](https://code.claude.com/docs/en/claude-code-on-the-web.md#unable-to-get-organization-uuid) |
268271| `Nothing was stashed: "<path>" is now a folder in place of a tracked file or link` / `are now folders in place of tracked files or links` | [Command-line errors](#nothing-was-stashed-because-a-folder-replaced-a-tracked-file) |
from line 401
398401| `installed mods are off for now` | [Check whether mods can load](https://code.claude.com/docs/en/plugins/mods/troubleshoot.md#check-whether-mods-can-load) |
399402| `the hooks worker was lost with <mod>'s <event> hook in flight` | Fix the named mod. For one cause, see [`it crashed the hooks worker`](https://code.claude.com/docs/en/plugins/mods/troubleshoot#it-crashed-the-hooks-worker). |
400403| `dispatches in a row for fills by <mods>` | Change the named mods so they fill the prompt box at most eight times in a row. |
404| `changed a slash command's typed line` | [Rewrite or add to a prompt](https://code.claude.com/docs/en/plugins/mods/events.md#rewrite-or-add-to-a-prompt) |
405| `no prompt.submit in flight carries an attachment under that id` | Call `$.prompt.media` inside the `prompt.submit` hook whose `e.attachments` lists the `id` you pass. Look up `$.prompt.media` in [the types for your build](https://code.claude.com/docs/en/plugins/mods/create.md#get-the-types-for-your-build). |
401406| `Error: No such tool available: <tool name>` | [Tool errors](#no-such-tool-available) |
402407| `MCP server "<name>" connection closed before the tool call was answered` | [Tool errors](#connection-closed-before-the-tool-call-was-answered) |
403408| `MCP server "<name>" is disabled — re-enable it via /mcp to use its tools` | [Tool errors](#mcp-server-is-disabled) |
from line 459
454459| `File is not valid UTF-8. It may use a legacy encoding such as Windows-1252, Shift-JIS or GBK, or be binary` | [Tool errors](#file-is-not-valid-utf-8) |
455460| `git is not installed on this Mac. To install it, run xcode-select --install, then try again.` | [Tool errors](#git-is-not-installed-on-this-mac) |
456461| `Refusing to apply edits to <path>: a hook is configured for file edits in this session` | [Tool errors](#a-hook-is-configured-for-file-edits) |
462| `no longer leads where it did` / `Could not confirm that working directory "<cwd>" is the directory that this command was permission-checked in` | Ask Claude to try again. |
457463| `blocking because onFailure is "block"` | [Block the action when a hook fails](https://code.claude.com/docs/en/hooks.md#block-the-action-when-a-hook-fails) |
464| `in one call, so a Write could lose` | Ask Claude to read the whole file in one Read call, or to use Edit. |
458465| `the source file is not valid UTF-8 text` / `the source file is not valid UTF-16 text` | [Tool errors](#the-source-file-is-not-valid-utf-8-text) |
459466| `the source file has the replacement character U+FFFD` | [Tool errors](#the-source-file-is-not-valid-utf-8-text) |
460467| `Not published: that file is on a network share` | [Tool errors](#not-published-that-file-is-on-a-network-share) |
from line 553
546553| `MCP server <name> is blocked by enterprise managed policy` | [Configuration warnings](#mcp-server-is-blocked-by-enterprise-managed-policy) |
547554| `"<name>" is a reserved MCP server name and was not loaded` | [Configuration warnings](#mcp-server-name-is-reserved) |
548555| `Managed settings document could not be parsed as a JSON object; none of its settings are in effect. Fix or remove it.` | [Configuration warnings](#managed-settings-document-could-not-be-parsed) |
556| `Your organization's policy could not be read, so this session cannot run a turn.` | Send the error to your administrator. |
549557| `Managed settings drop-in directory could not be read` | [Configuration warnings](#managed-settings-document-could-not-be-parsed) |
550558| `Unable to read managed policy settings` | [Configuration warnings](#unable-to-read-managed-policy-settings) |
551559| `Managed settings contain invalid entries, including PreToolUse/PermissionRequest hooks that are NOT loaded; fix or remove each entry:` | [Configuration warnings](#managed-settings-hooks-not-loaded) |
from line 2371
23632371 
23642372**What to do:**
23652373 
2366* Check the address and credentials in the proxy variable, as [Proxy configuration](https://code.claude.com/docs/en/network-config.md#proxy-configuration) describes, then run `curl -x http://proxy.example.com:8080 -I https://api.anthropic.com` from the shell you start Claude Code in, using your own proxy URL. On Windows PowerShell, run `curl.exe`. If this probe fails the same way, fix the proxy setup first. If it succeeds, the refusal is specific to the artifact host.
2367* If your network lets Claude Code reach the artifact host directly, add `.frame.claudeusercontent.com` to [`NO_PROXY`](https://code.claude.com/docs/en/network-config#environment-variables). Keep the entry that narrow: a broader `.claudeusercontent.com` entry also bypasses the proxy for `bridge.claudeusercontent.com`, which organizations with [IP allowlisting](https://code.claude.com/docs/en/network-config.md#organization-ip-allowlists-and-proxy-egress) need to keep on the proxy.
2368 
2369Before v2.1.238, Claude Code reported a refused tunnel as a generic network error.
2370 
2371### The cloud environments service returned an empty or unexpected response
2372 
2373Claude Code requests your [cloud environments](https://code.claude.com/docs/en/cloud-environments.md) list at several points, such as when you create a cloud session from the CLI or run [`/remote-env`](https://code.claude.com/docs/en/cloud-environments#select-an-environment-from-the-cli). When it can't read the server's answer, it shows one of these messages:
2374 
2375```text theme={null}
2376The cloud environments service returned an empty response (HTTP 200 with no body). This is usually temporary — try again in a moment.
2377The cloud environments service returned a response in an unexpected format (HTTP 200 with a non-JSON body). This is usually temporary — try again in a moment.
2378The cloud environments service returned a response in an unexpected format (HTTP 200 without a usable environments list). This is u
2374* Check the address and credentials in the proxy variable, as [Proxy configuration](https://code.claude.com/docs/en/network-config.md#proxy-configuration) describes, then run `curl -x http://proxy.example.com:8080 -I https://api.anthropic.com` from the shell you start Claude Code in, using your own proxy URL. On Windows PowerShell, run `curl.exe`. If this probe fails the same way, fix the proxy setup first. If it succeeds, the refusal is spec

google-vertex-ai Changed · +11 / -5 lines

from line 156
156156 
157157Set these environment variables to specific Google Cloud's Agent Platform model IDs.
158158 
159Without `ANTHROPIC_DEFAULT_OPUS_MODEL`, the `opus` alias on Google Cloud's Agent Platform resolves to Opus 5.5, and without `ANTHROPIC_DEFAULT_SONNET_MODEL`, the `sonnet` alias resolves to Sonnet 4.5. This example pins each alias to a specific version:
159Without `ANTHROPIC_DEFAULT_OPUS_MODEL`, the `opus` alias on Google Cloud's Agent Platform resolves to Opus 5.5, and without `ANTHROPIC_DEFAULT_SONNET_MODEL`, the `sonnet` alias resolves to Sonnet 5.5.
160160 
161This example pins each alias to a specific version:
162 
161163```bash theme={null}
162164export ANTHROPIC_DEFAULT_OPUS_MODEL='claude-opus-4-8'
163165export ANTHROPIC_DEFAULT_SONNET_MODEL='claude-sonnet-5'
from line 173
171173| Model type | Default value |
172174| :- | :- |
173175| Primary model | `claude-opus-5-5` |
174| Small/fast model | `claude-sonnet-4-5@20250929` |
176| Small/fast model | `claude-sonnet-5-5` |
175177 
176178Before v2.1.280, the primary model on Google Cloud's Agent Platform defaulted to Opus 5 and the `opus` alias resolved to Opus 5 from v2.1.219.
177179 
180Before v2.1.332, the `sonnet` alias and the small/fast model on Google Cloud's Agent Platform were Sonnet 4.5.
181 
178182Background tasks such as session title generation use the small/fast model, normally a Haiku-class model. On Google Cloud's Agent Platform, Claude Code uses the default Sonnet model for background tasks because Haiku may not be enabled in every project or region. Two selections change which model carries them:
179183 
180184* When you select a primary model with `--model`, `ANTHROPIC_MODEL`, or the `model` setting, background tasks use that model. When Claude Code starts the session on the model you set with [`ANTHROPIC_DEFAULT_MODEL`](https://code.claude.com/docs/en/model-config#set-a-default-model-for-new-sessions), background tasks use that model too. Setting `ANTHROPIC_DEFAULT_OPUS_MODEL` without `ANTHROPIC_DEFAULT_SONNET_MODEL` also counts as a selection, because the built-in Sonnet model may not be enabled in a project that steers its own Opus.
from line 186
182186 
183187> [!WARNING]
184188>
185> Opus models have a higher per-token price than Sonnet models, so if you don't pin a primary model, you're billed at the Opus rate. To use Sonnet 4.5 as the primary model, set `ANTHROPIC_MODEL` to its full model ID. A deployment that steers the default with `ANTHROPIC_DEFAULT_SONNET_MODEL` and doesn't set `ANTHROPIC_DEFAULT_OPUS_MODEL` keeps its steered Sonnet model as the default.
189> Opus models have a higher per-token price than Sonnet models, so if you don't pin a primary model, you're billed at the Opus rate. To use Sonnet 5 as the primary model, set `ANTHROPIC_MODEL` to its full model ID. A deployment that steers the default with `ANTHROPIC_DEFAULT_SONNET_MODEL` and doesn't set `ANTHROPIC_DEFAULT_OPUS_MODEL` keeps its steered Sonnet model as the default, unless [`enforceAvailableModels`](https://code.claude.com/docs/en/model-config#enforce-the-allowlist-for-the-default-model) is on.
186190 
187191To customize models further:
188192 
from line 226
222226 
223227If you set [`enforceAvailableModels`](https://code.claude.com/docs/en/model-config#enforce-the-allowlist-for-the-default-model) in managed settings, the startup model checks use only models your `availableModels` list permits. This requires Claude Code v2.1.287 or later. A list without `enforceAvailableModels` doesn't restrict these checks.
224228 
225The checks compare each entry with the model ID they would send to Agent Platform, so write the list in those IDs. This example permits Opus 4.8 and Sonnet 4.5:
229The checks compare each entry with the model ID they would send to Agent Platform, so write the list in those IDs.
226230 
231This example permits Opus 4.8 and Sonnet 4.6:
232 
227233```json theme={null}
228234{
229 "availableModels": ["claude-opus-4-8", "claude-sonnet-4-5@20250929"],
235 "availableModels": ["claude-opus-4-8", "claude-sonnet-4-6"],
230236 "enforceAvailableModels": true
231237}
232238```

managed-mcp Changed · +10 / -8 lines

from line 295
295295 
296296#### How `serverCommand` entries match
297297 
298A `serverCommand` entry holds the command and its arguments as one array, as in `{ "serverCommand": ["npx", "-y", "server"] }`. Claude Code compares that array with the command and arguments in the server's configuration:
298A `serverCommand` entry holds the command and its arguments as one array, as in `{ "serverCommand": ["npx", "-y", "@modelcontextprotocol/server-filesystem", "."] }`. Claude Code compares that array with the command and arguments in the server's configuration:
299299 
300* **Commands match exactly.** Every argument, in order. `["npx", "-y", "server"]` does not match `["npx", "server"]` or `["npx", "-y", "server", "--flag"]`.
300* **Commands match exactly.** Every argument, in order. The entry `["npx", "-y", "@modelcontextprotocol/server-filesystem", "."]` doesn't match either of these commands:
301 * `["npx", "@modelcontextprotocol/server-filesystem", "."]`, which drops `-y`
302 * `["npx", "-y", "@modelcontextprotocol/server-filesystem", ".", "--flag"]`, which adds an argument
301303* **The `env` block isn't compared.** `["node", "server.js"]` matches a server that runs that command with any `env` values. Some environment variables change what `node` loads at startup. To set the `env` values yourself, define the server in [`managed-mcp.json`](#exclusive-control-with-managed-mcp-json).
302304 
303305#### How `serverUrl` entries match
from line 388
386388 ],
387389 "deniedMcpServers": [
388390 { "serverName": "dangerous-server" },
389 { "serverCommand": ["npx", "-y", "unapproved-package"] },
391 { "serverCommand": ["python", "/usr/local/bin/unapproved-server.py"] },
390392 { "serverUrl": "https://*.untrusted.example.com/*" }
391393 ]
392394}
from line 425
423425> ```json theme={null}
424426> {
425427> "allowedMcpServers": [
426> { "serverCommand": ["npx", "-y", "approved-package"] }
428> { "serverCommand": ["npx", "-y", "@modelcontextprotocol/server-filesystem", "."] }
427429> ]
428430> }
429431> ```
from line 432
430432>
431433> | Server | Result |
432434> | :- | :- |
433> | Stdio server with `["npx", "-y", "approved-package"]` | Allowed: matches command |
435> | Stdio server with `["npx", "-y", "@modelcontextprotocol/server-filesystem", "."]` | Allowed: matches command |
434436> | Stdio server with `["node", "server.js"]` | Blocked: doesn't match command |
435437> | HTTP server named `my-api` | Blocked: no name entries to match |
436438 
from line 442
440442> {
441443> "allowedMcpServers": [
442444> { "serverName": "github" },
443> { "serverCommand": ["npx", "-y", "approved-package"] }
445> { "serverCommand": ["npx", "-y", "@modelcontextprotocol/server-filesystem", "."] }
444446> ]
445447> }
446448> ```
from line 449
447449>
448450> | Server | Result |
449451> | :- | :- |
450> | Stdio server named `local-tool` with `["npx", "-y", "approved-package"]` | Allowed: matches command |
452> | Stdio server named `local-tool` with `["npx", "-y", "@modelcontextprotocol/server-filesystem", "."]` | Allowed: matches command |
451453> | Stdio server named `local-tool` with `["node", "server.js"]` | Blocked: command entries exist but doesn't match |
452454> | Stdio server named `github` with `["node", "server.js"]` | Blocked: stdio servers must match commands when command entries exist |
453455> | HTTP server named `github` | Allowed: matches name |

mcp Changed · +5 / -5 lines

from line 131
131131>
132132> For example:
133133>
134> * `claude mcp add --transport stdio myserver -- npx server` → runs `npx server`
134> * `claude mcp add --transport stdio myserver -- npx <MCP_SERVER_PACKAGE>` → runs `npx <MCP_SERVER_PACKAGE>`
135135> * `claude mcp add --env KEY=value --transport stdio myserver -- python server.py --port 8080` → runs `python server.py --port 8080` with `KEY=value` in environment
136136>
137137> Without `--`, Claude Code would try to parse the server's flags, like `--port` above, as its own options.
from line 165
165165MCP servers aren't specific to Claude Code, so a server's setup instructions may be written for Claude Desktop, Cursor, or another MCP client and give no `claude mcp add` command. To add the server anyway, look in those instructions for a URL, a launch command, or a JSON block:
166166 
167167* **A URL** such as `https://mcp.example.com/mcp`: the server is remote.
168* **A launch command** such as `npx -y @example/mcp-server`: the server runs on your machine.
168* **A launch command** such as `npx -y <MCP_SERVER_PACKAGE>`: the server runs on your machine.
169169* **An `mcpServers` JSON block**: configuration written for another client's settings file.
170170 
171171Each is one of the inputs the four options in [Installing MCP servers](#installing-mcp-servers) take. Find the shape you have below to turn it into the command Claude Code accepts. Each command writes to [local scope](#local-scope) unless you add `--scope project` or `--scope user`.
from line 185
185185A launch command means the server runs as a local stdio process. Put the whole command after `--`, so Claude Code passes flags such as `-y` to the command that starts the server instead of reading them as its own options. Pass any environment variables the instructions ask for with `--env`, after the server name and before `--`:
186186 
187187```bash theme={null}
188claude mcp add example --env API_KEY=your-key -- npx -y @example/mcp-server
188claude mcp add <name> --env <KEY>=<value> -- npx -y <MCP_SERVER_PACKAGE>
189189```
190190 
191191[Option 3](#option-3-add-a-local-stdio-server) covers the `--` separator in full.
from line 204
204204 "mcpServers": {
205205 "example": {
206206 "command": "npx",
207 "args": ["-y", "@example/mcp-server"]
207 "args": ["-y", "<MCP_SERVER_PACKAGE>"]
208208 }
209209 }
210210}
from line 213
213213becomes this command:
214214 
215215```bash theme={null}
216claude mcp add-json example '{"command":"npx","args":["-y","@example/mcp-server"]}'
216claude mcp add-json example '{"command":"npx","args":["-y","<MCP_SERVER_PACKAGE>"]}'
217217```
218218 
219219[Add MCP servers from JSON configuration](#add-mcp-servers-from-json-configuration) covers shell escaping and the `--scope` flag for `add-json`. To share the server with your team instead, add `--scope project`, or add the entry under `mcpServers` in `.mcp.json` at your project root and commit it. [Project scope](#project-scope) covers how Claude Code loads and approves that file.

model-config Changed · +15 / -3 lines

from line 42
4242| Anthropic API | Opus 5.5 | Sonnet 5.5 | Haiku 5.5 |
4343| [Claude Platform on AWS](https://code.claude.com/docs/en/claude-platform-on-aws.md) | Opus 5.5 | Sonnet 4.6 | Haiku 4.5 |
4444| [Claude Models on Google Cloud (Anthropic managed)](https://code.claude.com/docs/en/claude-models-on-google-cloud-anthropic-managed.md) | Opus 5.5 | Sonnet 5.5 | Haiku 4.5 |
45| Amazon Bedrock, Google Cloud's Agent Platform | Opus 5.5 | Sonnet 4.5 | Haiku 4.5 |
46| Microsoft Foundry | Opus 4.6 | Sonnet 4.5 | Haiku 4.5 |
45| Amazon Bedrock | Opus 5.5 | Sonnet 4.5 | Haiku 4.5 |
46| [Mantle](https://code.claude.com/docs/en/amazon-bedrock.md#use-the-mantle-endpoint) alone | Opus 5.5 | Sonnet 5 | Haiku 4.5 |
47| Google Cloud's Agent Platform, Microsoft Foundry | Opus 5.5 | Sonnet 5.5 | Haiku 4.5 |
4748 
4849Unless you set `ANTHROPIC_DEFAULT_FABLE_MODEL`, the `fable` alias resolves to Fable 5 in [Claude apps gateway](https://code.claude.com/docs/en/claude-apps-gateway) sessions and to Fable 5.2 everywhere else.
4950 
from line 261
260261* A version prefix such as `claude-sonnet-4-5`. It also matches later model IDs that extend it with another segment. For example, `claude-fable-5` permits Fable 5, Fable 5.1, and Fable 5.2, while `claude-fable-5-1` permits Fable 5.1 only
261262* A full model ID such as `claude-sonnet-4-5-20250929`
262263 
264A prefix-matched list that names `claude-sonnet-5` lets an unpinned `sonnet` run Sonnet 5.5, because that entry also matches the later version. This applies from v2.1.332 on Google Cloud's Agent Platform and Microsoft Foundry.
265 
263266To block a model the list permits, or to make each model ID entry permit only the version it names, see [Block specific models or versions](#block-specific-models-or-versions).
264267 
265268On platforms that embed Claude Code and set [`CLAUDE_CODE_PROVIDER_MANAGED_BY_HOST`](https://code.claude.com/docs/en/env-vars), the host's model configuration takes precedence over managed model settings, while a managed `availableModels` allowlist stays in force unless the host supplies its own; [Exceptions to managed settings precedence](https://code.claude.com/docs/en/settings.md#exceptions-to-managed-settings-precedence) says which keys and variables the host overrides.
from line 497
494497 
495498* **Pro, Max, Ultra, Team, Enterprise, and Anthropic API**: defaults to Opus 5.5
496499* **Claude Platform on AWS, Claude Models on Google Cloud (Anthropic managed), Amazon Bedrock, and Google Cloud's Agent Platform**: defaults to Opus 5.5
497* **Microsoft Foundry**: defaults to Sonnet 4.5
500* **Microsoft Foundry**: defaults to Sonnet 5.5
498501 
499502Before v2.1.280, `default` resolved to Sonnet 5 on Pro and Team Standard, and to Opus 5 on Max, Ultra, Team Premium, Enterprise, the Anthropic API, Claude Platform on AWS, Amazon Bedrock, and Google Cloud's Agent Platform from v2.1.219. Before v2.1.219, `default` resolved to Opus 4.8 on the Anthropic API, Max, Ultra, Team Premium, and Enterprise pay-as-you-go from v2.1.154, and on Claude Platform on AWS, Amazon Bedrock, and Google Cloud's Agent Platform from v2.1.207. Before v2.1.207, `default` resolved to Opus 4.7 on Claude Platform on AWS and to Sonnet 4.5 on Amazon Bedrock and Google Cloud's Agent Platform.
500503 
from line 1028
10251028> [!WARNING]
10261029>
10271030> Set the model environment variables to specific version IDs as part of your initial setup. Pinning lets you control when your users move to a new model.
1031>
1032> On [Google Cloud's Agent Platform](https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/partner-models/claude/sonnet-4-5) and [Microsoft Foundry](https://platform.claude.com/docs/en/about-claude/model-deprecations), move off Sonnet 4.5 before it retires there on November 30, 2026:
1033>
1034> * **On Claude Code before v2.1.332**: the `sonnet` alias resolves to Sonnet 4.5, and so does the default model on Microsoft Foundry. Set `ANTHROPIC_DEFAULT_SONNET_MODEL` to a newer model such as `claude-sonnet-5`, or on Microsoft Foundry to your deployment's name. Set `ANTHROPIC_DEFAULT_OPUS_MODEL` too, or the default model on Agent Platform can become the Sonnet model you set.
1035> * If an enforced `availableModels` list has `sonnet` and no Opus, put the newer model's ID there in its place.
1036> * **On any version**: replace Sonnet 4.5 wherever your configuration names it, such as `ANTHROPIC_MODEL`, `--model`, or `availableModels`.
1037>
1038> After that date, requests to Sonnet 4.5 on those platforms stop working, including background tasks.
10281039 
10291040Use the following environment variables with version-specific model IDs for your provider:
10301041 
from line 1172
11611172 
11621173| Version | Change |
11631174| :- | :- |
1175| v2.1.332 | `sonnet` resolves to Sonnet 5.5 on Google Cloud's Agent Platform and Microsoft Foundry, and to Sonnet 5 on Mantle alone. `opus` and `default` on Foundry resolve to Opus 5.5 and Sonnet 5.5 |
11641176| v2.1.321 | `fable` resolves to Fable 5.2, except in Claude apps gateway sessions |
11651177| v2.1.321 | `best` resolves to the same model as `opus`. Earlier versions use the model `fable` resolves to, where Fable is available |
11661178| v2.1.293 | `haiku` resolves to Haiku 5.5 on the Anthropic API |

plugins/org Changed · +4 / -2 lines

from line 285
285285 "source": { "source": "github", "repo": "anthropics/claude-plugins-official" }
286286 },
287287 "your-marketplace": {
288 "source": { "source": "github", "repo": "your-org/your-marketplace" }
288 "source": { "source": "github", "repo": "your-org/your-marketplace" },
289 "autoUpdate": true
289290 }
290291 },
291292 "enabledPlugins": {
from line 348
347348{
348349 "extraKnownMarketplaces": {
349350 "stable-tools": {
350 "source": { "source": "github", "repo": "your-org/stable-tools" }
351 "source": { "source": "github", "repo": "your-org/stable-tools" },
352 "autoUpdate": true
351353 }
352354 }
353355}

agent-view Changed · +1 / -0 lines

from line 374
374374| `Esc` | Close the peek panel, clear the input, or exit. On Claude Code v2.1.323 or later, clearing a prompt takes two presses. When you opened agent view by backgrounding your session with `←`, the final `Esc` returns to that conversation instead of exiting. With [vim editor mode](https://code.claude.com/docs/en/interactive-mode.md#vim-editor-mode) on, pressing `Esc` in the input switches from INSERT to NORMAL mode and keeps your text, as in the main prompt |
375375| `Ctrl+Y` | In the dispatch input, restore the text you last cleared, or removed with `Ctrl+K`, `Ctrl+U`, or `Ctrl+W`. When agent view exits, that text is gone |
376376| `Ctrl+C` | Clear the input; press twice to exit. While text on screen is selected, the press clears the selection instead, copying it first unless [selecting already copied it](https://code.claude.com/docs/en/settings-reference.md#copyonselect) |
377| `Ctrl+D` | Delete the character after the cursor. On Claude Code v2.1.311 or later, press twice on an empty dispatch input to exit |
377378| `?` | Show shortcuts |
378379 
379380The shortcuts that have an action in the [`Agents` context](https://code.claude.com/docs/en/keybindings#agents-actions) follow your [`keybindings.json`](https://code.claude.com/docs/en/keybindings). So does `Ctrl+G`, through the `Chat` context's `chat:externalEditor` binding.

claude-apps-gateway-deploy Changed · +1 / -1 lines

from line 163
163163 * `xff_unparseable`: the event also carries the `X-Forwarded-For` entry that couldn't be read
164164 * `client_ip_unknown`: the event carries no client IP, because the connection had no peer address while an `access_control` list was set
165165 * `access.public_client` carries the client IP of the first request per process to arrive from a public address while `access_control.allow_cidrs` is empty. The gateway serves the request as usual; the event signals that the gateway may be reachable from the public internet. See the [`access_control` reference](https://code.claude.com/docs/en/claude-apps-gateway-config#http-tuning) for what counts as public and for the recommended allow list.
166 * `inference` records which upstream served the request and the response status
166 * `inference` records which upstream served the request, the response status, and any `upstream_request_id` or `upstream_cloud_request_id` to quote to the upstream's support. The gateway server needs Claude Code v2.1.295 or later for `upstream_request_id` and v2.1.311 or later for `upstream_cloud_request_id`.
167167 * `desktop_bootstrap.denied` records a rejected Claude Desktop bootstrap fetch with the reason (`not_configured`, `policy_not_opted_in`, or `no_policy_matched`) and the user's identity
168168 * `guardrail.trace` records [which filter fired](https://code.claude.com/docs/en/claude-apps-gateway-config.md#log-which-guardrail-filter-fired), without the matched text
169169 * `admin.denied` records a rejected admin-API auth attempt with the client IP, method, path, and a reason, without the presented key material: `invalid_key` when an `x-api-key` was presented but matched no configured key, `bearer_rejected` when only an `Authorization` header was presented and it didn't verify as a gateway session in `admin.admin_groups`, or `no_credentials` when neither header was presented

code-review-pull-requests Changed · +2 / -0 lines

from line 168
168168 
169169If the repository also runs the [Claude Code GitHub Action](https://code.claude.com/docs/en/github-actions.md) in interactive mode with its default `@claude` trigger phrase, an `@claude review` comment starts the Action as well. To keep the two apart, set the Action's `trigger_phrase` input to a different phrase.
170170 
171Also replace each `@claude` in your workflow's `if` condition with the new phrase, so that the Action starts on that phrase instead.
172 
171173## Related resources
172174 
173175* [Troubleshoot Code Review](https://code.claude.com/docs/en/code-review-troubleshooting.md): a review that didn't start, failed, or was skipped for budget

code-review-setup Changed · +1 / -1 lines

from line 146
146146 
147147After you confirm, these changes take effect:
148148 
149* **Coverage**: each repository is covered from its next pull request. If the Claude GitHub App was installed on selected repositories rather than all of them, Claude reviews those repositories; change the app's repository access on GitHub to cover the rest.
149* **Selected repositories**: if the Claude GitHub App was installed on selected repositories rather than all of them, Claude reviews those repositories; change the app's repository access on GitHub to cover the rest.
150150* **Existing settings**: every repository in that GitHub organization takes the option you select, including repositories you had set individually. Setting the row again does the same. Repositories you turned off on their own rows stay off.
151151* **Individual changes afterward**: a repository you later set differently from its organization is marked **Custom** in the table.
152152* **Review level**: an organization row has no review level of its own.

microsoft-foundry Changed · +3 / -1 lines

from line 120
120120 
121121Set the model variables to match the deployment names you created in step 1.
122122 
123Without `ANTHROPIC_DEFAULT_OPUS_MODEL`, the `opus` alias on Microsoft Foundry resolves to Opus 4.6. Set it to the ID of a newer Opus model, such as Opus 4.8:
123Without `ANTHROPIC_DEFAULT_OPUS_MODEL`, the `opus` alias on Microsoft Foundry resolves to Opus 5.5. Before v2.1.332 it resolves to Opus 4.6.
124 
125Set the variable to the ID of the Opus model you deployed, such as Opus 4.8:
124126 
125127```bash theme={null}
126128export ANTHROPIC_DEFAULT_OPUS_MODEL='claude-opus-4-8'

plugins/marketplace-reference Changed · +2 / -2 lines

from line 258
258258 
259259An `npm` source takes these fields:
260260 
261* `package`: a registry package name such as `@your-org/formatter`, a name with a version appended such as `@your-org/[email protected]`, or an `https` link to the package's tarball file
261* `package`: a registry package name such as `@<SCOPE>/<NAME>`, a name with a version appended such as `@<SCOPE>/<NAME>@2.0.0`, or an `https` link to the package's tarball file
262262* `version`: a version, a semver range, or a dist-tag, used when `package` is a package name with no version appended. Omit it to fetch `latest`
263263* `registry`: a registry URL for a package that isn't on the default registry
264264 
from line 277
277277 "name": "formatter",
278278 "source": {
279279 "source": "npm",
280 "package": "@your-org/formatter",
280 "package": "@<SCOPE>/<NAME>",
281281 "version": "^2.0.0",
282282 "registry": "https://npm.example.com"
283283 }

plugins/mods/events Changed · +2 / -0 lines

from line 282
282282 
283283When you send a prompt such as `open a PR for this change`, your message looks the same in the transcript, and Claude also reads a line such as `Current branch: feature/auth` after it. A prompt that doesn't mention a pull request goes through unchanged, and `git` doesn't run.
284284 
285To change a `/command`'s arguments, return `next({ ...e, args: newArgs })` from a [`command.run`](https://code.claude.com/docs/en/plugins/mods/api#add-a-command) hook. After you add the `command.run` hook, have any `prompt.submit` hook that rewrites `text` skip the rewrite when `e.command` is set. `e.command` requires Claude Code v2.1.299 or later.
286 
285287To stop a prompt, return `{ drop: 'the reason' }` without calling `next`. The text goes back into the user's prompt input, and they see `Prompt dropped by a hook:` followed by your reason, so address the reason to them. Don't rely on `drop` to stop every prompt. For example, a prompt goes through in these cases:
286288 
287289* **Your hook returns a `drop` after its `next(e)` call let the prompt through**: the turn still runs, and the hook [fails](#handle-a-hook-that-fails) with a message that includes `a drop after its next() was answered`

plugins/relevance Changed · +2 / -2 lines

from line 115
115115* `file`: matched case-insensitively against the manifest file's path. The path is typically absolute, so anchor the pattern at the end rather than the start. Paths aren't separator-normalized for this signal, so Windows paths use backslashes.
116116* `pattern`: matched case-sensitively against that file's contents.
117117 
118The following example uses `manifestDeps` to suggest your plugin once Claude has read a `package.json` that depends on your SDK's npm package, named `your-sdk` here.
118The following example uses `manifestDeps` to suggest your plugin once Claude has read a `package.json` that depends on your SDK's npm package, named `<SDK_PACKAGE>` here.
119119 
120120```json theme={null}
121121{
from line 126
126126 "manifestDeps": [
127127 {
128128 "file": "[/\\\\]package\\.json$",
129 "pattern": "\"your-sdk\"\\s*:"
129 "pattern": "\"<SDK_PACKAGE>\"\\s*:"
130130 }
131131 ]
132132 }

sessions Changed · +0 / -1 lines

from line 45
4545* Conversation history: the messages, tool calls, and results. If the session was [compacted](https://code.claude.com/docs/en/context-window.md#what-survives-compaction), the conversation opens at a `Conversation compacted` row. Claude continues with the last compaction's summary, the messages that compaction left unsummarized, and every message since. The messages that the last compaction summarized aren't loaded again.
4646* Interrupted tool calls: a tool that was still running when the previous process ended, for example in a crash, doesn't get rerun when you resume.
4747* Model: with `claude --resume` or `--continue`, the session continues on the model it was using, except in the cases in [Which model a resumed session uses](https://code.claude.com/docs/en/model-config.md#which-model-a-resumed-session-uses).
48* Agent: a session started with [`--agent`](https://code.claude.com/docs/en/sub-agents#invoke-subagents-explicitly) or the `agent` setting continues as that agent, keeping its tool restrictions and model. Pass `--agent` when resuming to pick a different one; for the system prompt in either case, see [System prompt flags in resumed conversations](https://code.claude.com/docs/en/cli-reference.md#system-prompt-flags-in-resumed-conversations). Claude Code looks for the agent in two places: the session's original directory, provided you have [trusted that workspace](https://code.claude.com/docs/en/permissions.md#project-allow-rules-and-workspace-trust), and then the directory you resume from, so a project-scoped agent still loads when you resume from another directory. If Claude Code doesn't find the agent in either place, the session resumes with the default tools and shows a [warning naming the agent](https://code.claude.com/docs/en/errors.md#session-agent-no-longer-available).
4948* Permission mode: if you resume from a terminal with `claude --continue`, `claude --resume <session-id>`, or `claude --resume <name>` when the name matches one session, without `-p`, Claude Code restores the permission mode the session was in, except in the cases in [permission mode on resume](#permission-mode-on-resume), which also covers the session picker, `/resume`, and resuming with `claude -p`. Pass `--permission-mode` or `--dangerously-skip-permissions` to override the restored mode.
5049* Active goal: a [goal](https://code.claude.com/docs/en/goal.md#resume-with-an-active-goal) that was still active when the session ended carries over; its turn count, timer, and token-spend baseline reset.
5150* Session-scoped scheduled tasks: restored, with [exceptions](https://code.claude.com/docs/en/scheduled-tasks.md#limitations). Background Bash and monitor tasks aren't restored.

sub-agents Changed · +2 / -2 lines

from line 907
907907 
908908The agent name appears as `@<name>` in the startup header so you can confirm it's active.
909909 
910This works with built-in and custom subagents, and the choice persists when you resume the session: Claude Code restores the agent's tool restrictions and model along with the conversation. If the agent no longer exists when you resume, the session continues with the default tools and shows a [warning naming the agent](https://code.claude.com/docs/en/errors.md#session-agent-no-longer-available). For the system prompt in either case, see [System prompt flags in resumed conversations](https://code.claude.com/docs/en/cli-reference.md#system-prompt-flags-in-resumed-conversations).
910You can also pass a built-in subagent, such as `Explore`.
911911 
912912For a plugin-provided subagent, you can pass only the agent name and Claude Code finds it:
913913 
from line 1168
11681168 
11691169When Claude sends a completed subagent a message with the `SendMessage` tool, the subagent can resume in the background without a new `Agent` invocation. The same applies to a subagent that Claude stopped with the `TaskStop` tool, once its stopped run has exited. The resumed run keeps the [tool set from where the subagent first ran](#run-subagents-in-foreground-or-background) and can keep reading the [prompt cache the original run warmed](https://code.claude.com/docs/en/prompt-caching.md#subagents-and-the-cache).
11701170 
1171A subagent that has the `SendMessage` tool can send that message too. In an interactive session, the resumed agent then reports back to the subagent that resumed it, not to your main conversation. That subagent waits for the result before finishing its own work. When a subagent messages an agent it reports to, such as its own launcher, Claude Code resumes that agent without redirecting its results.
1171A subagent that has the `SendMessage` tool can send that message too. In an interactive terminal session, the resumed agent then reports back to the subagent that resumed it. That subagent waits for the result before finishing its own work. When a subagent messages an agent it reports to, such as its own launcher, Claude Code resumes that agent without redirecting its results.
11721172 
11731173A subagent you stopped yourself, with `x` in `/tasks` or an SDK `stop_task` request, doesn't auto-resume. If Claude sends it a message, the message is refused and Claude is told the agent was cancelled.
11741174 
Feedback