modified Manage multiple agents with agent view View current →
--- a/agent-view.md +++ b/agent-view.md @@ -397,7 +397,7 @@ ---|--- `claude agents`| Open agent view `claude agents --cwd <path>`| Open agent view scoped to sessions started under `<path>` -`claude agents --json`| Print live sessions as a JSON array and exit. Each entry has `pid`, `cwd`, `kind`, and `startedAt`, plus `sessionId`, `name`, and `status` when set. Combine with `--cwd <path>` to filter +`claude agents --json`| Print live sessions as a JSON array and exit. Each entry has `pid`, `cwd`, `kind`, and `startedAt`, plus `sessionId`, `name`, and `status` when set. When `status` is `waiting`, `waitingFor` says what the session is blocked on, such as `permission prompt` or `input needed`. Combine with `--cwd <path>` to filter `claude attach <id>`| Attach to a session in this terminal `claude logs <id>`| Print the session’s recent output `claude stop <id>`| Stop a session. Also accepts `claude kill`
modified Claude Code changelog View current →
--- a/changelog.md +++ b/changelog.md @@ -1,4 +1,41 @@ This page is generated from the [CHANGELOG.md on GitHub](<https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md>). Run `claude --version` to check your installed version. + +​ + +2.1.165 + +June 5, 2026 + + * Bug fixes and reliability improvements + +​ + +2.1.163 + +June 4, 2026 + + * Added `requiredMinimumVersion` and `requiredMaximumVersion` managed settings — Claude Code refuses to start if its version is outside the allowed range and directs the user to an approved version + * Added `/plugin list` command to list installed plugins, with `--enabled`/`--disabled` filters + * Added a “c to copy” shortcut to `/btw` that copies the raw markdown answer to the clipboard, preserving formatting when pasted elsewhere + * Hooks: Stop and SubagentStop hooks can now return `hookSpecificOutput.additionalContext` to give Claude feedback and keep the turn going without being labeled a hook error + * Skills: added `\$` escape syntax to include a literal `$` before a digit in command bodies + * stdio MCP servers now receive the same `CLAUDE_CODE_SESSION_ID` as hooks/Bash on `--resume` + * Fixed `claude -p` hanging forever after its final result when a backgrounded command never exits — background shells are now stopped ~5s after the result once stdin closes + * Fixed `claude -p` failing with “ANTHROPIC_API_KEY required” on Bedrock/Vertex/Foundry when `CI=true` and no Anthropic API key is set + * Fixed bash commands failing under bazel and EDR-protected Go workflows: `$TMPDIR` was overridden to `/tmp/claude-{uid}` for all commands instead of only sandboxed ones (regression in 2.1.154) + * Fixed Bash commands failing on Windows with “EEXIST: file already exists” on the session-env directory when it has the read-only attribute or is inside OneDrive + * Fixed org-managed permission rules not applying for the entire session when the managed settings fetch completed during startup on a fresh config directory + * Fixed background sessions in `claude agents` losing their running background tasks when reattached after a Claude Code update + * Fixed terminal misalignment and a multi-second hang when exiting the agent view by pressing Esc + * Fixed clicking Stop on a background-task chip in the desktop app not clearing the chip when the underlying process was already gone + * Fixed keyboard input becoming permanently unresponsive after a paste operation whose end marker is dropped by the terminal + * Fixed hook `if: "Bash(...)"` conditions firing on every Bash command containing `$()` or `$VAR`; the pattern now matches against commands inside subshells and backticks too + * Fixed deny rules on home-directory paths (e.g. `Read(~/Desktop/**)`) not blocking Bash commands that reference the path via `$HOME` + * Fixed a stray “(no content)” line left in the transcript after closing panel dialogs like /mcp and /plugins + * Background agent sessions now update to a new Claude Code version in the background, so opening a session after an update no longer waits on a cold restart + * Clearer descriptions for built-in commands and skills in the / menu + * The subscription-switch suggestion now shows in the startup announcement slot instead of a toast + * `claude agents` dispatching from the state-grouped view now starts the session in the directory the agent view was opened from ​
modified Launch sessions from links View current →
--- a/deep-links.md +++ b/deep-links.md @@ -32,7 +32,7 @@ What a launched session shows -A deep link never executes anything on its own. The link only chooses a directory and fills the prompt box. If you click a link from a page you do not trust, the prompt is still inert: nothing reaches the model until you read what was filled in and press Enter. When the session opens, a banner above the input shows that an external link launched it and which directory it selected. For prompts over 1,000 characters, the banner tells you to scroll and review the full text before pressing Enter, since long prompts can push instructions off screen. Permission rules, `CLAUDE.md`, and trust prompts for the selected directory apply the same way as for any other session. +A deep link never executes anything on its own. The link only chooses a directory and fills the prompt box. If you click a link from a page you do not trust, the prompt is still inert: nothing reaches the model until you read what was filled in and press Enter. When the session opens, a warning line below the input box reads `Prompt from an external link` and stays visible until you send or clear the prompt. For prompts over 1,000 characters, the warning includes the character count and tells you to scroll and review the full text before pressing Enter, since long prompts can push instructions off screen. Permission rules, `CLAUDE.md`, and trust prompts for the selected directory apply the same way as for any other session. ## @@ -76,7 +76,7 @@ * The lookup only finds paths where you have already run Claude Code at least once. * The link does not change which branch is checked out. The session opens in whatever state that directory is currently in. -The launched session shows which path it picked and when that clone last fetched from the remote, so you can tell if you are looking at stale code. +The welcome header shows which path it picked so you can confirm the right clone opened. ##
modified Environment variables View current →
--- a/env-vars.md +++ b/env-vars.md @@ -311,7 +311,7 @@ `MCP_REMOTE_SERVER_CONNECTION_BATCH_SIZE`| Maximum number of remote MCP servers (HTTP/SSE) to connect in parallel during startup (default: 20) `MCP_SERVER_CONNECTION_BATCH_SIZE`| Maximum number of local MCP servers (stdio) to connect in parallel during startup (default: 3) `MCP_TIMEOUT`| Timeout in milliseconds for MCP server startup (default: 30000, or 30 seconds) -`MCP_TOOL_TIMEOUT`| Timeout in milliseconds for MCP tool execution (default: 100000000, about 28 hours). A per-server `timeout` field in `.mcp.json` overrides this for that server. Values below 1000 are floored to one second +`MCP_TOOL_TIMEOUT`| Timeout in milliseconds for MCP tool execution (default: 100000000, about 28 hours). A per-server `timeout` field in `.mcp.json` overrides this for that server. For the env variable, values below 1000 are floored to one second; for the per-server field, values below 1000 are ignored `NO_PROXY`| List of domains and IPs to which requests will be directly issued, bypassing proxy `OTEL_LOG_RAW_API_BODIES`| Emit Anthropic Messages API request and response JSON as `api_request_body` / `api_response_body` log events. Set to `1` for inline bodies truncated at 60 KB, or `file:<dir>` to write untruncated bodies to disk and emit a `body_ref` path instead. Disabled by default; bodies include the entire conversation history. See [Monitoring](</docs/en/monitoring-usage#api-request-body-event>) `OTEL_LOG_TOOL_CONTENT`| Set to `1` to include tool input and output content in OpenTelemetry span events. Disabled by default to protect sensitive data. See [Monitoring](</docs/en/monitoring-usage>)
modified Connect Claude Code to tools via MCP View current →
--- a/mcp.md +++ b/mcp.md @@ -103,15 +103,15 @@ claude mcp add [options] <name> -- <command> [args...] # Real example: Add Airtable server - claude mcp add --transport stdio --env AIRTABLE_API_KEY=YOUR_KEY airtable \ + claude mcp add --env AIRTABLE_API_KEY=YOUR_KEY --transport stdio airtable \ -- npx -y airtable-mcp-server -**Important: Option ordering** All options (`--transport`, `--env`, `--scope`, `--header`) must come **before** the server name. The `--` (double dash) then separates the server name from the command and arguments that get passed to the MCP server.For example: +**Important: Separate server arguments with`--`**For stdio servers, the `--` (double dash) separates Claude’s own options, such as `--transport`, `--env`, and `--scope`, from the command and arguments that run the server. Everything after `--` is passed to the server untouched.For example: * `claude mcp add --transport stdio myserver -- npx server` → runs `npx server` - * `claude mcp add --transport stdio --env KEY=value myserver -- python server.py --port 8080` → runs `python server.py --port 8080` with `KEY=value` in environment - -This prevents conflicts between Claude’s flags and the server’s flags. + * `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 + +Without `--`, Claude Code would try to parse the server’s flags, like `--port` above, as its own options.`--env` accepts multiple `KEY=value` pairs. If the server name comes directly after `--env`, the CLI reads the name as another pair and rejects it, so place at least one other option between `--env` and the server name, as in the examples above. ### @@ -184,7 +184,7 @@ * Claude Code will display a warning when MCP tool output exceeds 10,000 tokens. To increase this limit, set the `MAX_MCP_OUTPUT_TOKENS` environment variable (for example, `MAX_MCP_OUTPUT_TOKENS=50000`) * Use `/mcp` to authenticate with remote servers that require OAuth 2.0 authentication -The per-server `timeout` is a hard wall-clock limit per tool call, and progress notifications from the server do not extend it. Values below 1000 are floored to one second. For HTTP and SSE servers, the per-request fetch first-byte budget has a 60-second minimum regardless of this value, so only the tool-call watchdog honors smaller values. +The per-server `timeout` is a hard wall-clock limit per tool call, and progress notifications from the server do not extend it. Values below 1000 are ignored and fall through to `MCP_TOOL_TIMEOUT`, or to its default of about 28 hours when that variable is unset. Before v2.1.162, values below 1000 were floored to one second instead. For HTTP and SSE servers, the per-request fetch first-byte budget has a 60-second minimum. ### @@ -743,7 +743,7 @@ Claude.ai servers appear in the list with indicators showing they come from Claude.ai. -From v2.1.161, connectors you have never signed in to are collapsed behind a `Show unused connectors` row at the end of the claude.ai section, so an organization-provisioned list doesn’t fill the panel. Select the row to expand them. A connector you signed in to before stays visible even when it currently needs re-authentication. Claude.ai connectors are fetched only when your active [authentication method](</docs/en/authentication#authentication-precedence>) is your Claude.ai subscription. They are not loaded when `ANTHROPIC_API_KEY`, `ANTHROPIC_AUTH_TOKEN`, `apiKeyHelper`, or a third-party provider such as Bedrock or Vertex is active, even if you previously ran `/login`. If `/mcp` does not list a connector you added, run `/status` to confirm which authentication method is active, unset that environment variable or remove the `apiKeyHelper` setting, then run `/login` to select your Claude.ai account. A server you’ve added in Claude Code takes precedence over a claude.ai connector that points at the same URL. When this happens, `/mcp` lists the connector as hidden and shows how to remove the duplicate if you’d rather use the connector. To disable claude.ai MCP servers in Claude Code, set the `ENABLE_CLAUDEAI_MCP_SERVERS` environment variable to `false`: +From v2.1.161, connectors you have never signed in to are collapsed behind a `Show unused connectors` row at the end of the claude.ai section, so an organization-provisioned list doesn’t fill the panel. Select the row to expand them. A connector you signed in to before stays visible even when it currently needs re-authentication. Claude.ai connectors are fetched only when your active [authentication method](</docs/en/authentication#authentication-precedence>) is your Claude.ai subscription. They are not loaded when `ANTHROPIC_API_KEY`, `ANTHROPIC_AUTH_TOKEN`, `apiKeyHelper`, or a third-party provider such as Bedrock or Vertex is active, even if you previously ran `/login`. If `/mcp` does not list a connector you added, run `/status` to confirm which authentication method is active, unset that environment variable or remove the `apiKeyHelper` setting, then run `/login` to select your Claude.ai account. A server you’ve added in Claude Code takes precedence over a claude.ai connector that points at the same URL. When this happens, `/mcp` lists the connector as hidden and shows how to remove the duplicate if you’d rather use the connector. Some Anthropic-hosted connectors, such as Microsoft 365, Gmail, and Google Calendar, do not support local OAuth from Claude Code because the upstream identity provider only accepts the redirect URL that claude.ai registered. From v2.1.162, authenticating one of these hosts in `/mcp` shows a message directing you to connect it at Settings → Connectors on claude.ai instead. Once connected there, the connector appears in Claude Code automatically. To disable claude.ai MCP servers in Claude Code, set the `ENABLE_CLAUDEAI_MCP_SERVERS` environment variable to `false`: ENABLE_CLAUDEAI_MCP_SERVERS=false claude
modified How Claude remembers your project View current →
--- a/memory.md +++ b/memory.md @@ -136,7 +136,7 @@ ln -s AGENTS.md CLAUDE.md -On Windows, creating a symlink requires Administrator privileges or Developer Mode, so use the `@AGENTS.md` import instead. Running [`/init`](</docs/en/commands>) in a repo that already has an `AGENTS.md` reads it and incorporates the relevant parts into the generated `CLAUDE.md`. It also reads other tool configs like `.cursorrules` and `.windsurfrules`. +On Windows, creating a symlink requires Administrator privileges or Developer Mode, so use the `@AGENTS.md` import instead. Running [`/init`](</docs/en/commands>) in a repo that already has an `AGENTS.md` reads it and incorporates the relevant parts into the generated `CLAUDE.md`. It also reads other tool configs like `.cursorrules`, `.devin/rules/`, and `.windsurfrules`. ###
modified Monitoring View current →
--- a/monitoring-usage.md +++ b/monitoring-usage.md @@ -211,6 +211,8 @@ `result_tokens`| Approximate token size of the tool result| `agent_id`| Identifier of the subagent or teammate that ran the tool. Absent on the main session| `parent_agent_id`| Identifier of the agent that spawned this one. Absent for the main session and for agents spawned directly from it| +`tool_use_id`| The model’s `tool_use` block id for this call. Matches the `tool_use_id` on the tool_result and tool_decision events and in hook payloads, so you can join the span to those records| +`gen_ai.tool.call.id`| Same value as `tool_use_id`. OpenTelemetry GenAI semantic convention| `file_path`| Target file path for Read, Edit, and Write tools| `OTEL_LOG_TOOL_DETAILS` `full_command`| Command string for the Bash tool| `OTEL_LOG_TOOL_DETAILS` `skill_name`| Skill name for the Skill tool| `OTEL_LOG_TOOL_DETAILS` @@ -229,6 +231,8 @@ Attribute| Description| Gated by ---|---|--- `duration_ms`| Time spent running the tool body| +`tool_use_id`| Same value as on the parent `claude_code.tool` span| +`gen_ai.tool.call.id`| Same value as `tool_use_id`. OpenTelemetry GenAI semantic convention| `success`| `true` or `false`| `error`| Error category string when execution failed, such as `Error:ENOENT` or `ShellError`. Contains the full error message instead when the gate is set| `OTEL_LOG_TOOL_DETAILS` @@ -862,6 +866,7 @@ * `skill.name`: Name of the skill. For user-defined and third-party plugin skills the value is the placeholder `"custom_skill"` unless `OTEL_LOG_TOOL_DETAILS=1` * `invocation_trigger`: How the skill was triggered (`"user-slash"`, `"claude-proactive"`, or `"nested-skill"`) * `skill.source`: Where the skill was loaded from (for example, `"bundled"`, `"userSettings"`, `"projectSettings"`, `"plugin"`) + * `skill.kind`: `"workflow"` when the skill is a workflow skill. Absent otherwise * `plugin.name` (when `OTEL_LOG_TOOL_DETAILS=1` or the plugin is from an official marketplace): Name of the owning plugin when the skill is provided by a plugin * `marketplace.name` (when `OTEL_LOG_TOOL_DETAILS=1` or the plugin is from an official marketplace): Marketplace the owning plugin was installed from, when the skill is provided by a plugin
modified Agent SDK reference - Python View current →
--- a/python.md +++ b/python.md @@ -1697,6 +1697,13 @@ api_error_status: int | None = None uuid: str | None = None +The `subtype` field determines which other fields are populated. It is one of `"success"`, `"error_during_execution"`, `"error_max_turns"`, `"error_max_budget_usd"`, or `"error_max_structured_output_retries"`. The Python dataclass flattens all variants into one shape, so fields that don’t apply to the returned subtype are `None`. Several fields carry diagnostic detail when the conversation ends on an error: + + * `is_error`: `True` when the conversation ended in an error state. Always `True` on the `error_*` subtypes. On `subtype="success"` it is `True` when the final model request failed, meaning the agent loop completed but the last API call returned an error. + * `api_error_status`: the HTTP status code of the terminating API error. `None` when the turn ended without one. Populated only on `subtype="success"`. + * `result`: text of the final assistant message on `subtype="success"`, or `None` on the `error_*` subtypes. When `subtype="success"` and `is_error=True`, this holds the API error string if one is available but can be empty, so check `api_error_status` and the preceding `AssistantMessage` content for detail. + * `errors`: loop-level error strings such as the max-turns message. Populated only on the `error_*` subtypes. + The `usage` dict contains the following keys when present: Key| Type| Description
modified Tools reference View current →
--- a/tools-reference.md +++ b/tools-reference.md @@ -168,7 +168,8 @@ * Jump to a symbol’s definition * Find all references to a symbol * Get type information at a position - * List symbols in a file or workspace + * List symbols in a file + * Search for a symbol by name across the workspace * Find implementations of an interface * Trace call hierarchies @@ -281,7 +282,7 @@ * Responses are cached for 15 minutes, so repeated fetches of the same URL return quickly. * When a URL redirects to a different host, WebFetch returns a text result that names the original URL and the redirect target instead of following it. Claude then fetches the new URL with a second WebFetch call. -In the default and `acceptEdits` permission modes, WebFetch prompts the first time it reaches a new domain. To allow a domain in advance without a prompt, add a permission rule like `WebFetch(domain:example.com)`. The `auto` and `bypassPermissions` [permission modes](</docs/en/permissions#permission-modes>) skip the prompt entirely. WebFetch sets a `User-Agent` header beginning with `Claude-User`, and an `Accept` header that prefers Markdown over HTML so servers that support content negotiation can return Markdown directly. [Sandbox](</docs/en/sandboxing>) network rules are configured separately, so a domain you want a sandboxed process to reach still needs an explicit sandbox permission rule. +In the default and `acceptEdits` permission modes, WebFetch prompts the first time it reaches a new domain, except for a built-in set of preapproved documentation domains that fetch without a prompt. To allow another domain in advance without a prompt, add a permission rule like `WebFetch(domain:example.com)`. The `auto` and `bypassPermissions` [permission modes](</docs/en/permissions#permission-modes>) skip the prompt entirely. An explicit `WebFetch(domain:...)` rule in `deny`, `ask`, or `allow` takes precedence over the preapproved set, so you can block a preapproved domain or require a prompt for it. WebFetch sets a `User-Agent` header beginning with `Claude-User`, and an `Accept` header that prefers Markdown over HTML so servers that support content negotiation can return Markdown directly. [Sandbox](</docs/en/sandboxing>) network rules are configured separately, so a domain you want a sandboxed process to reach still needs an explicit sandbox permission rule. ##
modified Troubleshoot installation and login View current →
--- a/troubleshoot-install.md +++ b/troubleshoot-install.md @@ -55,7 +55,7 @@ curl -sI https://downloads.claude.ai/claude-code-releases/latest -An `HTTP/2 200` line means you reached the server. If you see no output, `Could not resolve host`, or a connection timeout, your network is blocking the connection. Common causes: +In PowerShell, run `curl.exe -sI` instead. PowerShell aliases `curl` to `Invoke-WebRequest`, which rejects the `-sI` flags. An `HTTP/2 200` line means you reached the server. If you see no output, `Could not resolve host`, or a connection timeout, your network is blocking the connection. Common causes: * Corporate firewalls or proxies blocking `downloads.claude.ai` * Regional network restrictions: try a VPN or alternative network
modified Use Claude Code in VS Code View current →
--- a/vs-code.md +++ b/vs-code.md @@ -566,9 +566,17 @@ 2. Search for “Claude Code” 3. Click **Uninstall** -To also remove extension data and reset all settings: - - rm -rf ~/.vscode/globalStorage/anthropic.claude-code +To also remove extension data and reset all settings, delete the extension’s storage directory for your platform. On macOS: + + rm -rf ~/Library/"Application Support"/Code/User/globalStorage/anthropic.claude-code + +On Linux: + + rm -rf ~/.config/Code/User/globalStorage/anthropic.claude-code + +On Windows, in PowerShell: + + Remove-Item -Recurse -Force "$env:APPDATA\Code\User\globalStorage\anthropic.claude-code" For additional help, see the [troubleshooting guide](</docs/en/troubleshooting>).