modified Changelog View current →
--- a/changelog.md +++ b/changelog.md @@ -5,6 +5,47 @@ > Use this file to discover all available pages before exploring further. This page is generated from the [CHANGELOG.md on GitHub](<https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md>). Run `claude --version` to check your installed version. + +​ + +2.1.150 + +May 23, 2026 + + * Internal infrastructure improvements (no user-facing changes) + +​ + +2.1.149 + +May 22, 2026 + + * `/usage` now shows a per-category breakdown of what’s driving your limits usage — skills, subagents, plugins, and per-MCP-server cost + * `/diff` detail view can now be scrolled with the keyboard (arrows, `j`/`k`, `PgUp`/`PgDn`, `Space`, `Home`/`End`) + * Markdown output now renders GFM task list checkboxes (`- [ ] todo` / `- [x] done`) instead of plain bullets + * Enterprise: added the `allowAllClaudeAiMcps` managed setting to load claude.ai cloud MCP connectors alongside `managed-mcp.json` + * Fixed a PowerShell permission bypass: built-in `cd` functions (`cd..`, `cd\`, `cd~`, `X:`) changed the working directory undetected, letting a later command read outside the workspace + * Fixed the sandbox write allowlist in git worktrees covering the entire main repository root instead of only the shared `.git` directory (with `hooks/` and `config` denied) + * Fixed PowerShell prefix/wildcard allow rules (e.g. `PowerShell(dotnet.exe build *)`) not pre-approving native executables and scripts + * Fixed a permission-analysis gap where the parser trusted stale variable-tracking values for `PWD`/`OLDPWD`/`DIRSTACK` across `cd`/`pushd`/`popd` + * Fixed `find` in the Bash tool exhausting the macOS system file/vnode table and crashing the host on large directory trees + * Fixed the managed-settings approval dialog leaving the terminal frozen after accepting at startup + * Fixed `/ultraplan` and remote session creation failing with “Could not capture uncommitted changes” when the working tree has no real changes + * Fixed `otelHeadersHelper` failing silently when the script path contains spaces; helper failures are now reported in `/doctor` and the debug log + * Fixed the thinking spinner staying amber across tool calls and onto fresh thinking bursts + * Fixed collapsed Bash output reporting the wrong hidden-line count for outputs with many short lines + * Fixed slash-command argument-hint clipping trailing typed characters when the hint overflows the input box + * Fixed argument-hint and progressive arg suggestions not appearing after Tab-completing a skill whose frontmatter `name:` differs from its directory basename + * Fixed the status bar showing the user’s baseline `/effort` setting instead of the effort level applied by skill/agent `effort:` frontmatter + * Fixed Ctrl+O transcript view freezing at the moment it was opened instead of tailing new messages + * Fixed editing a recalled prompt-history entry losing the edit when navigating further up/down with arrow keys + * Fixed `/config` exit summary reporting phantom changes to auto-compact and theme when toggling unrelated settings + * Fixed `/insights` crashing when cached session-meta files are missing optional fields + * Fixed malformed PowerShell and History tool calls with missing input being misclassified as reads in transcript collapsing + * Fixed renaming a Remote Control session from claude.ai or the Claude mobile app not updating the local session name for `claude --resume` + * Fixed a race where a just-submitted prompt could appear twice in the up-arrow history + * Fixed tapping the “Jump to bottom” pill in fullscreen mode not dismissing it immediately + * Improved `/feedback` reports to include the conversation that happened before context compaction, making issues from earlier in long sessions easier to triage ​
modified Slash Commands in the SDK View current →
--- a/slash-commands.md +++ b/slash-commands.md @@ -26,7 +26,7 @@ })) { if (message.type === "system" && message.subtype === "init") { console.log("Available slash commands:", message.slash_commands); - // Example output: ["/compact", "/context", "/usage"] + // Example output: ["clear", "compact", "context", "usage"] } } @@ -64,7 +64,7 @@ ​ -`/compact` \- Compact Conversation History +`/compact` \- Compact conversation history The `/compact` command reduces the size of your conversation history by summarizing older messages while preserving important context: @@ -89,9 +89,11 @@ ​ -Clearing the conversation - -The interactive `/clear` command is not available in the SDK. Each `query()` call already starts a fresh conversation, so to clear context, end the current `query()` and start a new one. The previous conversation stays on disk and can be returned to by passing its session ID to the [`resume` option](</docs/en/agent-sdk/sessions#resume-by-id>). +`/clear` \- Reset conversation context + +The `/clear` command resets the conversation to an empty context, so subsequent prompts start with no prior conversation history. The previous conversation remains on disk and can be returned to by passing its session ID to the [`resume` option](</docs/en/agent-sdk/sessions#resume-by-id>). This is useful in [streaming input mode](</docs/en/agent-sdk/streaming-vs-single-mode>), where you send multiple prompts over a single connection. For one-shot `query()` calls, each call already starts with empty context, so sending `/clear` has no practical effect; start a new `query()` instead. + +`/clear` in the SDK requires Claude Code v2.1.117 or later. In earlier versions it is omitted from `slash_commands`. ## @@ -191,7 +193,7 @@ if (message.type === "system" && message.subtype === "init") { // Will include both built-in and custom commands console.log("Available commands:", message.slash_commands); - // Example: ["/compact", "/context", "/usage", "/refactor", "/security-check"] + // Example: ["clear", "compact", "context", "usage", "refactor", "security-check"] } }
modified Create custom subagents View current →
--- a/sub-agents.md +++ b/sub-agents.md @@ -267,7 +267,7 @@ `memory`| No| Persistent memory scope: `user`, `project`, or `local`. Enables cross-session learning `background`| No| Set to `true` to always run this subagent as a background task. Default: `false` `effort`| No| Effort level when this subagent is active. Overrides the session effort level. Default: inherits from session. Options: `low`, `medium`, `high`, `xhigh`, `max`; available levels depend on the model -`isolation`| No| Set to `worktree` to run the subagent in a temporary [git worktree](</docs/en/worktrees>), giving it an isolated copy of the repository. The worktree is automatically cleaned up if the subagent makes no changes +`isolation`| No| Set to `worktree` to run the subagent in a temporary [git worktree](</docs/en/worktrees>), giving it an isolated copy of the repository branched by default from your [default branch](</docs/en/worktrees#choose-the-base-branch>) rather than the parent session’s `HEAD`. The worktree is automatically cleaned up if the subagent makes no changes `color`| No| Display color for the subagent in the task list and transcript. Accepts `red`, `blue`, `green`, `yellow`, `purple`, `orange`, `pink`, or `cyan` `initialPrompt`| No| Auto-submitted as the first user turn when this agent runs as the main session agent (via `--agent` or the `agent` setting). [Commands](</docs/en/commands>) and [skills](</docs/en/skills>) are processed. Prepended to any user-provided prompt
modified Subagents in the SDK View current →
--- a/subagents.md +++ b/subagents.md @@ -70,7 +70,7 @@ Programmatic definition (recommended) -Define subagents directly in your code using the `agents` parameter. This example creates two subagents: a code reviewer with read-only access and a test runner that can execute commands. The `Agent` tool must be included in `allowedTools` since Claude invokes subagents through the Agent tool. +Define subagents directly in your code using the `agents` parameter. This example creates two subagents: a code reviewer with read-only access and a test runner that can execute commands. Claude invokes subagents through the `Agent` tool, so include `Agent` in `allowedTools` to auto-approve subagent invocations without a permission prompt. Python @@ -83,7 +83,7 @@ async for message in query( prompt="Review the authentication module for security issues", options=ClaudeAgentOptions( - # Agent tool is required for subagent invocation + # Auto-approve these tools, including Agent for subagent invocation allowed_tools=["Read", "Grep", "Glob", "Agent"], agents={ "code-reviewer": AgentDefinition( @@ -157,7 +157,7 @@ You can also define subagents as markdown files in `.claude/agents/` directories. See the [Claude Code subagents documentation](</docs/en/sub-agents>) for details on this approach. Programmatically defined agents take precedence over filesystem-based agents with the same name. -Even without defining custom subagents, Claude can spawn the built-in `general-purpose` subagent when `Agent` is in your `allowedTools`. This is useful for delegating research or exploration tasks without creating specialized agents. +Even without defining custom subagents, Claude can spawn the built-in `general-purpose` subagent. This is useful for delegating research or exploration tasks without creating specialized agents. Include `Agent` in `allowedTools` so these invocations auto-approve without a permission prompt. ## @@ -433,7 +433,7 @@ If Claude completes tasks directly instead of delegating to your subagent: - 1. **Include the Agent tool** : subagents are invoked via the Agent tool, so it must be in `allowedTools` + 1. **Check Agent invocations are approved** : include `Agent` in `allowedTools` to auto-approve subagent calls. Without it, Agent invocations fall through to your `canUseTool` callback or, in `dontAsk` mode, are denied 2. **Use explicit prompting** : mention the subagent by name in your prompt (for example, “Use the code-reviewer agent to…”) 3. **Write a clear description** : explain exactly when the subagent should be used so Claude can match tasks appropriately
modified Run parallel sessions with worktrees View current →
--- a/worktrees.md +++ b/worktrees.md @@ -70,7 +70,7 @@ Isolate subagents with worktrees -Subagents can run in their own worktrees so parallel edits don’t conflict. Ask Claude to “use worktrees for your agents”, or set it permanently on a [custom subagent](</docs/en/sub-agents#supported-frontmatter-fields>) by adding `isolation: worktree` to the frontmatter. Each subagent gets a temporary worktree that is removed automatically when the subagent finishes without changes. +Subagents can run in their own worktrees so parallel edits don’t conflict. Ask Claude to “use worktrees for your agents”, or set it permanently on a [custom subagent](</docs/en/sub-agents#supported-frontmatter-fields>) by adding `isolation: worktree` to the frontmatter. Each subagent gets a temporary worktree that is removed automatically when the subagent finishes without changes. Subagent worktrees use the same base branch as `--worktree`, so they branch from your repository’s default branch unless `worktree.baseRef` is set to `"head"`. ##