Changes on
12 changes detected
--- a/agent-teams.md
+++ b/agent-teams.md
@@ -95,7 +95,7 @@
`tmux` has known limitations on certain operating systems and traditionally works best on macOS. Using `tmux -CC` in iTerm2 is the suggested entrypoint into `tmux`.
-The default is `"auto"`, which uses split panes if you’re already running inside a tmux session, and in-process otherwise. The `"tmux"` setting enables split-pane mode and auto-detects whether to use tmux or iTerm2 based on your terminal. To override, set `teammateMode` in your [settings.json](</docs/en/settings>):
+The default is `"auto"`, which uses split panes if you’re already running inside a tmux session, and in-process otherwise. The `"tmux"` setting enables split-pane mode and auto-detects whether to use tmux or iTerm2 based on your terminal. To override, set `teammateMode` in your [global config](</docs/en/settings#global-config-settings>) at `~/.claude.json`:
{
"teammateMode": "in-process"
--- a/changelog.md
+++ b/changelog.md
@@ -1,4 +1,37 @@
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.86
+
+March 27, 2026
+
+ * Added `X-Claude-Code-Session-Id` header to API requests so proxies can aggregate requests by session without parsing the body
+ * Added `.jj` and `.sl` to VCS directory exclusion lists so Grep and file autocomplete don’t descend into Jujutsu or Sapling metadata
+ * Fixed `--resume` failing with “tool_use ids were found without tool_result blocks” on sessions created before v2.1.85
+ * Fixed Write/Edit/Read failing on files outside the project root (e.g., `~/.claude/CLAUDE.md`) when conditional skills or rules are configured
+ * Fixed unnecessary config disk writes on every skill invocation that could cause performance issues and config corruption on Windows
+ * Fixed potential out-of-memory crash when using `/feedback` on very long sessions with large transcript files
+ * Fixed `--bare` mode dropping MCP tools in interactive sessions and silently discarding messages enqueued mid-turn
+ * Fixed the `c` shortcut copying only ~20 characters of the OAuth login URL instead of the full URL
+ * Fixed masked input (e.g., OAuth code paste) leaking the start of the token when wrapping across multiple lines on narrow terminals
+ * Fixed official marketplace plugin scripts failing with “Permission denied” on macOS/Linux since v2.1.83
+ * Fixed statusline showing another session’s model when running multiple Claude Code instances and using `/model` in one of them
+ * Fixed scroll not following new messages after wheel scroll or click-to-select at the bottom of a long conversation
+ * Fixed `/plugin` uninstall dialog: pressing `n` now correctly uninstalls the plugin while preserving its data directory
+ * Fixed a regression where pressing Enter after clicking could leave the transcript blank until the response arrived
+ * Fixed `ultrathink` hint lingering after deleting the keyword
+ * Fixed memory growth in long sessions from markdown/highlight render caches retaining full content strings
+ * Reduced startup event-loop stalls when many claude.ai MCP connectors are configured (macOS keychain cache extended from 5s to 30s)
+ * Reduced token overhead when mentioning files with `@` — raw string content no longer JSON-escaped
+ * Improved prompt cache hit rate for Bedrock, Vertex, and Foundry users by removing dynamic content from tool descriptions
+ * Memory filenames in the “Saved N memories” notice now highlight on hover and open on click
+ * Skill descriptions in the `/skills` listing are now capped at 250 characters to reduce context usage
+ * Changed `/skills` menu to sort alphabetically for easier scanning
+ * Auto mode now shows “unavailable for your plan” when disabled by plan restrictions (was “temporarily unavailable”)
+ * [VSCode] Fixed extension incorrectly showing “Not responding” during long-running operations
+ * [VSCode] Fixed extension defaulting Max plan users to Sonnet after the OAuth token refreshes (8 hours after login)
+ * Read tool now uses compact line-number format and deduplicates unchanged re-reads, reducing token usage
--- a/claude-directory.md
+++ b/claude-directory.md
@@ -19,7 +19,7 @@
File reference
-This table lists every file the explorer covers. Project-scope files live in your repo under `.claude/` (or at the root for `CLAUDE.md` and `.mcp.json`). Global-scope files live in `~/.claude/` and apply across all projects.
+This table lists every file the explorer covers. Project-scope files live in your repo under `.claude/` (or at the root for `CLAUDE.md`, `.mcp.json`, and `.worktreeinclude`). Global-scope files live in `~/.claude/` and apply across all projects.
Several things can override what you put in these files:
@@ -38,6 +38,7 @@
`settings.json`| Project and global| ✓| Permissions, hooks, env vars, model defaults| [Settings](</docs/en/settings>)
`settings.local.json`| Project only| | Your personal overrides, auto-gitignored| [Settings scopes](</docs/en/settings#settings-files>)
`.mcp.json`| Project only| ✓| Team-shared MCP servers| [MCP scopes](</docs/en/mcp#mcp-installation-scopes>)
+`.worktreeinclude`| Project only| ✓| Gitignored files to copy into new worktrees| [Worktrees](</docs/en/common-workflows#copy-gitignored-files-to-worktrees>)
`skills/<name>/SKILL.md`| Project and global| ✓| Reusable prompts invoked with `/name` or auto-invoked| [Skills](</docs/en/skills>)
`commands/*.md`| Project and global| ✓| Single-file prompts; same mechanism as skills| [Skills](</docs/en/skills>)
`output-styles/*.md`| Project and global| ✓| Custom system-prompt sections| [Output styles](</docs/en/output-styles>)
--- a/cli-reference.md
+++ b/cli-reference.md
@@ -93,6 +93,7 @@
`--verbose`| Enable verbose logging, shows full turn-by-turn output| `claude --verbose`
`--version`, `-v`| Output the version number| `claude -v`
`--worktree`, `-w`| Start Claude in an isolated [git worktree](</docs/en/common-workflows#run-parallel-claude-code-sessions-with-git-worktrees>) at `<repo>/.claude/worktrees/<name>`. If no name is given, one is auto-generated| `claude -w feature-auth`
+`--tmux`| Create a tmux session for the worktree. Requires `--worktree`. Uses iTerm2 native panes when available; pass `--tmux=classic` for traditional tmux| `claude -w feature-auth --tmux`
###
--- a/common-workflows.md
+++ b/common-workflows.md
@@ -639,7 +639,11 @@
# Auto-generates a name like "bright-running-fox"
claude --worktree
-Worktrees are created at `<repo>/.claude/worktrees/<name>` and branch from the default remote branch. The worktree branch is named `worktree-<name>`. You can also ask Claude to “work in a worktree” or “start a worktree” during a session, and it will create one automatically.
+Worktrees are created at `<repo>/.claude/worktrees/<name>` and branch from the default remote branch, which is where `origin/HEAD` points. The worktree branch is named `worktree-<name>`. The base branch is not configurable through a Claude Code flag or setting. `origin/HEAD` is a reference stored in your local `.git` directory that Git set once when you cloned. If the repository’s default branch later changes on GitHub or GitLab, your local `origin/HEAD` keeps pointing at the old one, and worktrees will branch from there. To re-sync your local reference with whatever the remote currently considers its default:
+
+ git remote set-head origin -a
+
+This is a standard Git command that only updates your local `.git` directory. Nothing on the remote server changes. If you want worktrees to base off a specific branch rather than the remote’s default, set it explicitly with `git remote set-head origin your-branch-name`. For full control over how worktrees are created, including choosing a different base per invocation, configure a [WorktreeCreate hook](</docs/en/hooks#worktreecreate>). The hook replaces Claude Code’s default `git worktree` logic entirely, so you can fetch and branch from whatever ref you need. You can also ask Claude to “work in a worktree” or “start a worktree” during a session, and it will create one automatically.
###
@@ -711,7 +715,7 @@
Non-git version control
-Worktree isolation works with git by default. For other version control systems like SVN, Perforce, or Mercurial, configure [WorktreeCreate and WorktreeRemove hooks](</docs/en/hooks#worktreecreate>) to provide custom worktree creation and cleanup logic. When configured, these hooks replace the default git behavior when you use `--worktree`. For automated coordination of parallel sessions with shared tasks and messaging, see [agent teams](</docs/en/agent-teams>).
+Worktree isolation works with git by default. For other version control systems like SVN, Perforce, or Mercurial, configure [WorktreeCreate and WorktreeRemove hooks](</docs/en/hooks#worktreecreate>) to provide custom worktree creation and cleanup logic. When configured, these hooks replace the default git behavior when you use `--worktree`, so `.worktreeinclude` is not processed. Copy any local configuration files inside your hook script instead. For automated coordination of parallel sessions with shared tasks and messaging, see [agent teams](</docs/en/agent-teams>).
* * *
--- a/env-vars.md
+++ b/env-vars.md
@@ -101,7 +101,7 @@
`DISABLE_PROMPT_CACHING_SONNET`| Set to `1` to disable prompt caching for Sonnet models
`DISABLE_TELEMETRY`| Set to `1` to opt out of Statsig telemetry (note that Statsig events do not include user data like code, file paths, or bash commands)
`ENABLE_CLAUDEAI_MCP_SERVERS`| Set to `false` to disable [claude.ai MCP servers](</docs/en/mcp#use-mcp-servers-from-claude-ai>) in Claude Code. Enabled by default for logged-in users
-`ENABLE_TOOL_SEARCH`| Controls [MCP tool search](</docs/en/mcp#scale-with-mcp-tool-search>). Unset: enabled by default, but disabled when `ANTHROPIC_BASE_URL` points to a non-first-party host. Values: `true` (always on including proxies), `auto` (enables at 10% context), `auto:N` (custom threshold, e.g., `auto:5` for 5%), `false` (disabled)
+`ENABLE_TOOL_SEARCH`| Controls [MCP tool search](</docs/en/mcp#scale-with-mcp-tool-search>). Unset: all MCP tools deferred by default, but loaded upfront when `ANTHROPIC_BASE_URL` points to a non-first-party host. Values: `true` (always defer including proxies), `auto` (threshold mode: load upfront if tools fit within 10% of context), `auto:N` (custom threshold, e.g., `auto:5` for 5%), `false` (load all upfront)
`FORCE_AUTOUPDATE_PLUGINS`| Set to `true` to force plugin auto-updates even when the main auto-updater is disabled via `DISABLE_AUTOUPDATER`
`HTTP_PROXY`| Specify HTTP proxy server for network connections
`HTTPS_PROXY`| Specify HTTPS proxy server for network connections
Show diff (134 lines)
--- a/hooks.md
+++ b/hooks.md
@@ -46,7 +46,7 @@
How a hook resolves
-To see how these pieces fit together, consider this `PreToolUse` hook that blocks destructive shell commands. The hook runs `block-rm.sh` before every Bash tool call:
+To see how these pieces fit together, consider this `PreToolUse` hook that blocks destructive shell commands. The `matcher` narrows to Bash tool calls and the `if` condition narrows further to commands starting with `rm`, so `block-rm.sh` only spawns when both filters match:
{
"hooks": {
@@ -56,7 +56,8 @@
"hooks": [
{
"type": "command",
- "command": ".claude/hooks/block-rm.sh"
+ "if": "Bash(rm *)",
+ "command": "\"$CLAUDE_PROJECT_DIR\"/.claude/hooks/block-rm.sh"
}
]
}
@@ -96,13 +97,19 @@
Matcher checks
-The matcher `"Bash"` matches the tool name, so `block-rm.sh` runs. If you omit the matcher or use `"*"`, the hook runs on every occurrence of the event. Hooks only skip when a matcher is defined and doesn’t match.
+The matcher `"Bash"` matches the tool name, so this hook group activates. If you omit the matcher or use `"*"`, the group activates on every occurrence of the event.
3
+If condition checks
+
+The `if` condition `"Bash(rm *)"` matches because the command starts with `rm`, so this handler spawns. If the command had been `npm test`, the `if` check would fail and `block-rm.sh` would never run, avoiding the process spawn overhead. The `if` field is optional; without it, every handler in the matched group runs.
+
+4
+
Hook handler runs
-The script extracts `"rm -rf /tmp/build"` from the input and finds `rm -rf`, so it prints a decision to stdout:
+The script inspects the full command and finds `rm -rf`, so it prints a decision to stdout:
{
"hookSpecificOutput": {
@@ -112,9 +119,9 @@
}
}
-If the command had been safe (like `npm test`), the script would hit `exit 0` instead, which tells Claude Code to allow the tool call with no further action.
-
-4
+If the command had been a safer `rm` variant like `rm file.txt`, the script would hit `exit 0` instead, which tells Claude Code to allow the tool call with no further action.
+
+5
Claude Code acts on the result
@@ -201,7 +208,7 @@
}
}
-`UserPromptSubmit`, `Stop`, `TeammateIdle`, `TaskCreated`, `TaskCompleted`, `WorktreeCreate`, `WorktreeRemove`, and `CwdChanged` don’t support matchers and always fire on every occurrence. If you add a `matcher` field to these events, it is silently ignored.
+`UserPromptSubmit`, `Stop`, `TeammateIdle`, `TaskCreated`, `TaskCompleted`, `WorktreeCreate`, `WorktreeRemove`, and `CwdChanged` don’t support matchers and always fire on every occurrence. If you add a `matcher` field to these events, it is silently ignored. For tool events, you can filter more narrowly by setting the `if` field on individual hook handlers. `if` uses [permission rule syntax](</docs/en/permissions>) to match against the tool name and arguments together, so `"Bash(git *)"` runs only for `git` commands and `"Edit(*.ts)"` runs only for TypeScript files.
####
@@ -271,6 +278,7 @@
Field| Required| Description
---|---|---
`type`| yes| `"command"`, `"http"`, `"prompt"`, or `"agent"`
+`if`| no| Permission rule syntax to filter when this hook runs, such as `"Bash(git *)"` or `"Edit(*.ts)"`. The hook only spawns if the tool call matches the pattern. Only evaluated on tool events: `PreToolUse`, `PostToolUse`, `PostToolUseFailure`, and `PermissionRequest`. On other events, a hook with `if` set never runs. Uses the same syntax as [permission rules](</docs/en/permissions>)
`timeout`| no| Seconds before canceling. Defaults: 600 for command, 30 for prompt, 60 for agent
`statusMessage`| no| Custom spinner message displayed while the hook runs
`once`| no| If `true`, runs only once per session then is removed. Skills only, not agents. See Hooks in skills and agents
@@ -850,7 +858,7 @@
PreToolUse
-Runs after Claude creates tool parameters and before processing the tool call. Matches on tool name: `Bash`, `Edit`, `Write`, `Read`, `Glob`, `Grep`, `Agent`, `WebFetch`, `WebSearch`, and any MCP tool names. Use PreToolUse decision control to allow, deny, or ask for permission to use the tool.
+Runs after Claude creates tool parameters and before processing the tool call. Matches on tool name: `Bash`, `Edit`, `Write`, `Read`, `Glob`, `Grep`, `Agent`, `WebFetch`, `WebSearch`, `AskUserQuestion`, `ExitPlanMode`, and any MCP tool names. Use PreToolUse decision control to allow, deny, or ask for permission to use the tool.
####
@@ -953,6 +961,15 @@
`subagent_type`| string| `"Explore"`| Type of specialized agent to use
`model`| string| `"sonnet"`| Optional model alias to override the default
+##### AskUserQuestion
+
+Asks the user one to four multiple-choice questions.
+
+Field| Type| Example| Description
+---|---|---|---
+`questions`| array| `[{"question": "Which framework?", "header": "Framework", "options": [{"label": "React"}], "multiSelect": false}]`| Questions to present, each with a `question` string, short `header`, `options` array, and optional `multiSelect` flag
+`answers`| object| `{"Which framework?": "React"}`| Optional. Maps question text to the selected option label. Multi-select answers join labels with commas. Claude does not set this field; supply it via `updatedInput` to answer programmatically
+
####
@@ -965,7 +982,7 @@
---|---
`permissionDecision`| `"allow"` skips the permission prompt. `"deny"` prevents the tool call. `"ask"` prompts the user to confirm. [Deny and ask rules](</docs/en/permissions#manage-permissions>) still apply when a hook returns `"allow"`
`permissionDecisionReason`| For `"allow"` and `"ask"`, shown to the user but not Claude. For `"deny"`, shown to Claude
-`updatedInput`| Modifies the tool’s input parameters before execution. Combine with `"allow"` to auto-approve, or `"ask"` to show the modified input to the user
+`updatedInput`| Modifies the tool’s input parameters before execution. Replaces the entire input object, so include unchanged fields alongside modified ones. Combine with `"allow"` to auto-approve, or `"ask"` to show the modified input to the user
`additionalContext`| String added to Claude’s context before the tool executes
When a hook returns `"ask"`, the permission prompt displayed to the user includes a label identifying where the hook came from: for example, `[User]`, `[Project]`, `[Plugin]`, or `[Local]`. This helps users understand which configuration source is requesting confirmation.
@@ -981,6 +998,8 @@
"additionalContext": "Current environment: production. Proceed with caution."
}
}
+
+`AskUserQuestion` and `ExitPlanMode` require user interaction and normally block in [non-interactive mode](</docs/en/headless>) with the `-p` flag. Returning `permissionDecision: "allow"` together with `updatedInput` satisfies that requirement: the hook reads the tool’s input from stdin, collects the answer through your own UI, and returns it in `updatedInput` so the tool runs without prompting. Returning `"allow"` alone is not sufficient for these tools. For `AskUserQuestion`, echo back the original `questions` array and add an `answers` object mapping each question’s text to the chosen answer.
PreToolUse previously used top-level `decision` and `reason` fields, but these are deprecated for this event. Use `hookSpecificOutput.permissionDecision` and `hookSpecificOutput.permissionDecisionReason` instead. The deprecated values `"approve"` and `"block"` map to `"allow"` and `"deny"` respectively. Other events like PostToolUse and Stop continue to use top-level `decision` and `reason` as their current format.
@@ -1032,7 +1051,7 @@
Field| Description
---|---
`behavior`| `"allow"` grants the permission, `"deny"` denies it
-`updatedInput`| For `"allow"` only: modifies the tool’s input parameters before execution
+`updatedInput`| For `"allow"` only: modifies the tool’s input parameters before execution. Replaces the entire input object, so include unchanged fields alongside modified ones
`updatedPermissions`| For `"allow"` only: array of permission update entries to apply, such as adding an allow rule or changing the session permission mode
`message`| For `"deny"` only: tells Claude why the permission was denied
`interrupt`| For `"deny"` only: if `true`, stops Claude
@@ -1730,7 +1749,7 @@
WorktreeCreate
-When you run `claude --worktree` or a [subagent uses `isolation: "worktree"`](</docs/en/sub-agents#choose-the-subagent-scope>), Claude Code creates an isolated working copy using `git worktree`. If you configure a WorktreeCreate hook, it replaces the default git behavior, letting you use a different version control system like SVN, Perforce, or Mercurial. The hook must return the absolute path to the created worktree directory. Claude Code uses this path as the working directory for the isolated session. Command hooks print it on stdout; HTTP hooks return it via `hookSpecificOutput.worktreePath`. This example creates an SVN working copy and prints the path for Claude Code to use. Replace the repository URL with your own:
+When you run `claude --worktree` or a [subagent uses `isolation: "worktree"`](</docs/en/sub-agents#choose-the-subagent-scope>), Claude Code creates an isolated working copy using `git worktree`. If you configure a WorktreeCreate hook, it replaces the default git behavior, letting you use a different version control system like SVN, Perforce, or Mercurial. Because the hook replaces the default behavior entirely, [`.worktreeinclude`](</docs/en/common-workflows#copy-gitignored-files-to-worktrees>) is not processed. If you need to copy local configuration files like `.env` into the new worktree, do it inside your hook script. The hook must return the absolute path to the created worktree directory. Claude Code uses this path as the working directory for the isolated session. Command hooks print it on stdout; HTTP hooks return it via `hookSpecificOutput.worktreePath`. This example creates an SVN working copy and prints the path for Claude Code to use. Replace the repository URL with your own:
{
"hooks": {
--- a/hooks-guide.md
+++ b/hooks-guide.md
@@ -575,6 +575,35 @@
For full matcher syntax, see the [Hooks reference](</docs/en/hooks#configuration>).
+####
+
+
+
+Filter by tool name and arguments with the `if` field
+
+The `if` field requires Claude Code v2.1.85 or later. Earlier versions ignore it and run the hook on every matched call.
+
+The `if` field uses [permission rule syntax](</docs/en/permissions>) to filter hooks by tool name and arguments together, so the hook process only spawns when the tool call matches. This goes beyond `matcher`, which filters at the group level by tool name only. For example, to run a hook only when Claude uses `git` commands rather than all Bash commands:
+
+ {
+ "hooks": {
+ "PreToolUse": [
+ {
+ "matcher": "Bash",
+ "hooks": [
+ {
+ "type": "command",
+ "if": "Bash(git *)",
+ "command": "\"$CLAUDE_PROJECT_DIR\"/.claude/hooks/check-git-policy.sh"
+ }
+ ]
+ }
+ ]
+ }
+ }
+
+The hook process only spawns when the Bash command starts with `git`. Other Bash commands skip this handler entirely. The `if` field accepts the same patterns as permission rules: `"Bash(git *)"`, `"Edit(*.ts)"`, and so on. To match multiple tool names, use separate handlers each with its own `if` value, or match at the `matcher` level where pipe alternation is supported. `if` only works on tool events: `PreToolUse`, `PostToolUse`, `PostToolUseFailure`, and `PermissionRequest`. Adding it to any other event prevents the hook from running.
+
###
--- a/interactive-mode.md
+++ b/interactive-mode.md
@@ -63,8 +63,6 @@
---|---|---
`Ctrl+T`| Toggle syntax highlighting for code blocks| Only works inside the `/theme` picker menu. Controls whether code in Claude’s responses uses syntax coloring
-Syntax highlighting is only available in the native build of Claude Code.
-
###
--- a/mcp.md
+++ b/mcp.md
@@ -508,7 +508,7 @@
Override OAuth metadata discovery
-If your MCP server returns errors on the standard OAuth metadata endpoint (`/.well-known/oauth-authorization-server`) but exposes a working OIDC endpoint, you can tell Claude Code to fetch OAuth metadata directly from a URL you specify, bypassing the standard discovery chain. Set `authServerMetadataUrl` in the `oauth` object of your server’s config in `.mcp.json`:
+If your MCP server’s standard OAuth metadata endpoints return errors but the server exposes a working OIDC endpoint, you can point Claude Code at a specific metadata URL to bypass the default discovery chain. By default, Claude Code first checks RFC 9728 Protected Resource Metadata at `/.well-known/oauth-protected-resource`, then falls back to RFC 8414 authorization server metadata at `/.well-known/oauth-authorization-server`. Set `authServerMetadataUrl` in the `oauth` object of your server’s config in `.mcp.json`:
{
"mcpServers": {
@@ -560,7 +560,14 @@
* The command runs in a shell with a 10-second timeout
* Dynamic headers override any static `headers` with the same name
-The helper runs fresh on each connection (at session start and on reconnect). There is no caching, so your script is responsible for any token reuse.
+The helper runs fresh on each connection (at session start and on reconnect). There is no caching, so your script is responsible for any token reuse. Claude Code sets these environment variables when executing the helper:
+
+Variable| Value
+---|---
+`CLAUDE_CODE_MCP_SERVER_NAME`| the name of the MCP server
+`CLAUDE_CODE_MCP_SERVER_URL`| the URL of the MCP server
+
+Use these to write a single helper script that serves multiple MCP servers.
`headersHelper` executes arbitrary shell commands. When defined at project or local scope, it only runs after you accept the workspace trust dialog.
@@ -842,11 +849,11 @@
Value| Behavior
---|---
-(unset)| Enabled by default. Disabled when `ANTHROPIC_BASE_URL` is a non-first-party host
-`true`| Always enabled, including for non-first-party `ANTHROPIC_BASE_URL`
-`auto`| Activates when MCP tools exceed 10% of context
-`auto:<N>`| Activates at custom threshold, where `<N>` is a percentage (e.g., `auto:5` for 5%)
-`false`| Disabled, all MCP tools loaded upfront
+(unset)| All MCP tools deferred and loaded on demand. Falls back to loading upfront when `ANTHROPIC_BASE_URL` is a non-first-party host
+`true`| All MCP tools deferred, including for non-first-party `ANTHROPIC_BASE_URL`
+`auto`| Threshold mode: tools load upfront if they fit within 10% of the context window, deferred otherwise
+`auto:<N>`| Threshold mode with a custom percentage, where `<N>` is 0-100 (e.g., `auto:5` for 5%)
+`false`| All MCP tools loaded upfront, no deferral
# Use a custom 5% threshold
ENABLE_TOOL_SEARCH=auto:5 claude
--- a/monitoring-usage.md
+++ b/monitoring-usage.md
@@ -12,8 +12,8 @@
export CLAUDE_CODE_ENABLE_TELEMETRY=1
# 2. Choose exporters (both are optional - configure only what you need)
- export OTEL_METRICS_EXPORTER=otlp # Options: otlp, prometheus, console
- export OTEL_LOGS_EXPORTER=otlp # Options: otlp, console
+ export OTEL_METRICS_EXPORTER=otlp # Options: otlp, prometheus, console, none
+ export OTEL_LOGS_EXPORTER=otlp # Options: otlp, console, none
# 3. Configure OTLP endpoint (for OTLP exporter)
export OTEL_EXPORTER_OTLP_PROTOCOL=grpc
@@ -69,8 +69,8 @@
Environment Variable| Description| Example Values
---|---|---
`CLAUDE_CODE_ENABLE_TELEMETRY`| Enables telemetry collection (required)| `1`
-`OTEL_METRICS_EXPORTER`| Metrics exporter types, comma-separated| `console`, `otlp`, `prometheus`
-`OTEL_LOGS_EXPORTER`| Logs/events exporter types, comma-separated| `console`, `otlp`
+`OTEL_METRICS_EXPORTER`| Metrics exporter types, comma-separated. Use `none` to disable| `console`, `otlp`, `prometheus`, `none`
+`OTEL_LOGS_EXPORTER`| Logs/events exporter types, comma-separated. Use `none` to disable| `console`, `otlp`, `none`
`OTEL_EXPORTER_OTLP_PROTOCOL`| Protocol for OTLP exporter, applies to all signals| `grpc`, `http/json`, `http/protobuf`
`OTEL_EXPORTER_OTLP_ENDPOINT`| OTLP collector endpoint for all signals| `http://localhost:4317`
`OTEL_EXPORTER_OTLP_METRICS_PROTOCOL`| Protocol for metrics, overrides general setting| `grpc`, `http/json`, `http/protobuf`
@@ -83,7 +83,7 @@
`OTEL_METRIC_EXPORT_INTERVAL`| Export interval in milliseconds (default: 60000)| `5000`, `60000`
`OTEL_LOGS_EXPORT_INTERVAL`| Logs export interval in milliseconds (default: 5000)| `1000`, `10000`
`OTEL_LOG_USER_PROMPTS`| Enable logging of user prompt content (default: disabled)| `1` to enable
-`OTEL_LOG_TOOL_DETAILS`| Enable logging of tool parameters (bash commands, MCP server/tool names, skill names) and tool input arguments in tool events (default: disabled)| `1` to enable
+`OTEL_LOG_TOOL_DETAILS`| Enable logging of tool parameters and input arguments in tool events: Bash commands, MCP server and tool names, skill names, and tool input (default: disabled)| `1` to enable
`OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE`| Metrics temporality preference (default: `delta`). Set to `cumulative` if your backend expects cumulative temporality| `delta`, `cumulative`
`CLAUDE_CODE_OTEL_HEADERS_HELPER_DEBOUNCE_MS`| Interval for refreshing dynamic headers (default: 1740000ms / 29 minutes)| `900000`
@@ -436,11 +436,11 @@
* `decision_source`: Decision source - `"config"`, `"hook"`, `"user_permanent"`, `"user_temporary"`, `"user_abort"`, or `"user_reject"`
* `tool_result_size_bytes`: Size of the tool result in bytes
* `mcp_server_scope`: MCP server scope identifier (for MCP tools)
- * `tool_parameters` (when `OTEL_LOG_TOOL_DETAILS=1`): JSON string containing tool-specific parameters
+ * `tool_parameters` (when `OTEL_LOG_TOOL_DETAILS=1`): JSON string containing tool-specific parameters:
* For Bash tool: includes `bash_command`, `full_command`, `timeout`, `description`, `dangerouslyDisableSandbox`, and `git_commit_id` (the commit SHA, when a `git commit` command succeeds)
* For MCP tools: includes `mcp_server_name`, `mcp_tool_name`
* For Skill tool: includes `skill_name`
- * `tool_input` (when `OTEL_LOG_TOOL_DETAILS=1`): JSON-serialized tool arguments with long strings truncated. Bounded to ~4 K characters. Applies to all tools including MCP tools.
+ * `tool_input` (when `OTEL_LOG_TOOL_DETAILS=1`): JSON-serialized tool arguments. Individual values over 512 characters are truncated, and the full payload is bounded to ~4 K characters. Applies to all tools including MCP tools.
####
@@ -625,7 +625,7 @@
* Raw file contents and code snippets are not included in metrics or events
* When authenticated via OAuth, `user.email` is included in telemetry attributes. If this is a concern for your organization, work with your telemetry backend to filter or redact this field
* User prompt content is not collected by default. Only prompt length is recorded. To include prompt content, set `OTEL_LOG_USER_PROMPTS=1`
- * Tool input arguments and parameters are not logged by default. To include them, set `OTEL_LOG_TOOL_DETAILS=1`. When enabled, tool_result events include a `tool_parameters` attribute (bash commands, MCP server/tool names, skill names) and a `tool_input` attribute (file paths, URLs, search patterns, and other arguments). Individual values over 512 characters are truncated and the total is bounded to ~4 K characters, but the arguments may still contain sensitive values. Configure your telemetry backend to filter or redact these attributes as needed
+ * Tool input arguments and parameters are not logged by default. To include them, set `OTEL_LOG_TOOL_DETAILS=1`. When enabled, `tool_result` events include a `tool_parameters` attribute with Bash commands, MCP server and tool names, and skill names, plus a `tool_input` attribute with file paths, URLs, search patterns, and other arguments. Individual values over 512 characters are truncated and the total is bounded to ~4 K characters, but the arguments may still contain sensitive values. Configure your telemetry backend to filter or redact these attributes as needed
##
--- a/settings.md
+++ b/settings.md
@@ -173,6 +173,7 @@
`autoMode`| Customize what the [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) classifier blocks and allows. Contains `environment`, `allow`, and `soft_deny` arrays of prose rules. See [Configure the auto mode classifier](</docs/en/permissions#configure-the-auto-mode-classifier>). Not read from shared project settings| `{"environment": ["Trusted repo: github.example.com/acme"]}`
`disableAutoMode`| Set to `"disable"` to prevent [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) from being activated. Removes `auto` from the `Shift+Tab` cycle and rejects `--permission-mode auto` at startup. Most useful in [managed settings](</docs/en/permissions#managed-settings>) where users cannot override it| `"disable"`
`useAutoModeDuringPlan`| Whether plan mode uses auto mode semantics when auto mode is available. Default: `true`. Not read from shared project settings. Appears in `/config` as “Use auto mode during plan”| `false`
+`disableDeepLinkRegistration`| Set to `"disable"` to prevent Claude Code from registering the `claude-cli://` protocol handler with the operating system on startup. Deep links let external tools open a Claude Code session with a pre-filled prompt via `claude-cli://open?q=...`. Useful in environments where protocol handler registration is restricted or managed separately| `"disable"`
`hooks`| Configure custom commands to run at lifecycle events. See [hooks documentation](</docs/en/hooks>) for format| See [hooks](</docs/en/hooks>)
`defaultShell`| Default shell for input-box `!` commands. Accepts `"bash"` (default) or `"powershell"`. Setting `"powershell"` routes interactive `!` commands through PowerShell on Windows. Requires `CLAUDE_CODE_USE_POWERSHELL_TOOL=1`. See [PowerShell tool](</docs/en/tools-reference#powershell-tool>)| `"powershell"`
`disableAllHooks`| Disable all [hooks](</docs/en/hooks>) and any custom [status line](</docs/en/statusline>)| `true`
@@ -216,7 +217,6 @@
`spinnerTipsOverride`| Override spinner tips with custom strings. `tips`: array of tip strings. `excludeDefault`: if `true`, only show custom tips; if `false` or absent, custom tips are merged with built-in tips| `{ "excludeDefault": true, "tips": ["Use our internal tool X"] }`
`prefersReducedMotion`| Reduce or disable UI animations (spinners, shimmer, flash effects) for accessibility| `true`
`fastModePerSessionOptIn`| When `true`, fast mode does not persist across sessions. Each session starts with fast mode off, requiring users to enable it with `/fast`. The user’s fast mode preference is still saved. See [Require per-session opt-in](</docs/en/fast-mode#require-per-session-opt-in>)| `true`
-`teammateMode`| How [agent team](</docs/en/agent-teams>) teammates display: `auto` (picks split panes in tmux or iTerm2, in-process otherwise), `in-process`, or `tmux`. See [set up agent teams](</docs/en/agent-teams#set-up-agent-teams>)| `"in-process"`
`feedbackSurveyRate`| Probability (0–1) that the [session quality survey](</docs/en/data-usage#session-quality-surveys>) appears when eligible. Set to `0` to suppress entirely. Useful when using Bedrock, Vertex, or Foundry where the default sample rate does not apply| `0.05`
###
@@ -234,6 +234,7 @@
`editorMode`| Key binding mode for the input prompt: `"normal"` or `"vim"`. Default: `"normal"`. Written automatically when you run `/vim`. Appears in `/config` as **Key binding mode**| `"vim"`
`showTurnDuration`| Show turn duration messages after responses, e.g. “Cooked for 1m 6s”. Default: `true`. Appears in `/config` as **Show turn duration**| `false`
`terminalProgressBarEnabled`| Show the terminal progress bar in supported terminals: ConEmu, Ghostty 1.2.0+, and iTerm2 3.6.6+. Default: `true`. Appears in `/config` as **Terminal progress bar**| `false`
+`teammateMode`| How [agent team](</docs/en/agent-teams>) teammates display: `auto` (picks split panes in tmux or iTerm2, in-process otherwise), `in-process`, or `tmux`. See [choose a display mode](</docs/en/agent-teams#choose-a-display-mode>)| `"in-process"`
###
@@ -247,6 +248,8 @@
---|---|---
`worktree.symlinkDirectories`| Directories to symlink from the main repository into each worktree to avoid duplicating large directories on disk. No directories are symlinked by default| `["node_modules", ".cache"]`
`worktree.sparsePaths`| Directories to check out in each worktree via git sparse-checkout (cone mode). Only the listed paths are written to disk, which is faster in large monorepos| `["packages/my-app", "shared/utils"]`
+
+To copy gitignored files like `.env` into new worktrees, use a [`.worktreeinclude` file](</docs/en/common-workflows#copy-gitignored-files-to-worktrees>) in your project root instead of a setting.
###
@@ -571,6 +574,7 @@
* **User settings** (`~/.claude/settings.json`): Personal plugin preferences
* **Project settings** (`.claude/settings.json`): Project-specific plugins shared with team
* **Local settings** (`.claude/settings.local.json`): Per-machine overrides (not committed)
+ * **Managed settings** (`managed-settings.json`): Organization-wide policy overrides that block installation at all scopes and hide the plugin from the marketplace
**Example** :