2.1.159
- Internal infrastructure improvements (no user-facing changes)
持续追踪核心框架、最新模型规格与重要系统接口的更新迭代轨迹。
- Internal infrastructure improvements (no user-facing changes)
- Auto mode is now available on Bedrock, Vertex, and Foundry for Opus 4.7 and Opus 4.8. Opt in by setting `CLAUDE_CODE_ENABLE_AUTO_MODE=1`
- Plugins in `.claude/skills` directories are now automatically loaded, no marketplace required - Added `claude plugin init ` to scaffold a new plugin in `.claude/skills` - Added autocomplete for `/plugin` arguments: subcommands, installed plugin names, and plugins from known marketplaces - `claude agents`: the `agent` field in `settings.json` is now honored for dispatched sessions, with `--agent ` to override it - `EnterWorktree` can now switch between Claude-managed worktrees mid-session - `tool_decision` telemetry events now include `tool_parameters` (bash commands, MCP/skill names) when `O...
- Fixed an issue when using Opus 4.8 where thinking blocks were modified, leading to API errors.
- Opus 4.8 is here! Now defaults to high effort · /effort xhigh for your hardest tasks - Introducing dynamic workflows: ask Claude to create a workflow and it orchestrates work across tens to hundreds of agents in the background, so you can take on larger, more complex tasks. Run `/workflows` to view your runs - Fast mode on Opus 4.8 is now available at a fraction of its previous cost: 2x the standard rate for 2.5x the speed - The lean system prompt is now the default for all models except Haiku, Sonnet, and Opus 4.7 and earlier - Claude now reserves the multiple-choice question prompt for dec...
- Added `skipLfs` option to `github`/`git` plugin marketplace sources to skip Git LFS downloads during clone and update - Claude Code now shows a one-time notice when your npm global install can't auto-update; `/doctor` lists the fixes - Status line commands now receive `COLUMNS` and `LINES` environment variables so scripts can size output to the terminal width - `claude agents`: autocomplete in the dispatch input now suggests native slash commands and bundled skills, not just project skills - `claude agents`: PR column now shows `PR #N` for a single PR or `N PRs` for multiple - `claude doctor...
- `/code-review --fix` now applies review findings to your working tree after the review, surfacing reuse, simplification, and efficiency suggestions; `/simplify` now invokes `/code-review --fix` - Skills and slash commands can now set `disallowed-tools` in frontmatter to remove tools from the model while the skill is active - Added `/reload-skills` command to re-scan skill directories without restarting the session - `SessionStart` hooks can now return `reloadSkills: true` to re-scan skill directories, making skills installed by the hook available in the same session - `SessionStart` hooks ca...
- Internal infrastructure improvements (no user-facing changes)
- `/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 wo...
- Fixed the Bash tool returning exit code 127 on every command for some users (a regression introduced in 2.1.147)
- Pinned background sessions (`Ctrl+T` in `claude agents`) now stay alive when idle, are restarted in place to apply Claude Code updates, and are shed under memory pressure only after non-pinned sessions - Renamed `/simplify` to `/code-review`. It now reports correctness bugs at a chosen effort level (e.g., `/code-review high`); pass `--comment` to post findings as inline GitHub PR comments. The old cleanup-and-fix behavior has been removed - Improved auto-updater: retries transient network failures, reports specific error categories and OS error codes on failure, and shows the current version...
- Renamed `/simplify` to `/code-review` with an optional effort level (e.g. `/code-review high`) - Auto mode no longer suppresses `AskUserQuestion` when the user or a skill explicitly relies on it - Fixed Windows PowerShell tool failing with "command line is invalid" when `pwsh` is installed via winget or the Microsoft Store (regression in v2.1.124) - Fixed MCP `resources/list`, `resources/templates/list`, and `prompts/list` dropping items past page 1 on paginating servers - Fixed full-screen strobing in attached background sessions on Windows Terminal while Claude is streaming - Fixed the aut...
- Added `claude agents --json` to list live Claude sessions as JSON for scripting (tmux-resurrect, status bars, session pickers) - Added `agent_id` and `parent_agent_id` attributes to `claude_code.tool` OTEL spans, and fixed trace parenting so background subagent spans nest under the dispatching Agent tool span - Status line JSON input now includes GitHub repo and PR information when detected - `/plugin` Discover and Browse screens now show a plugin's commands, agents, skills, hooks, and MCP/LSP servers before installation - `claude agents` terminal tab title now shows the awaiting-input count...
- Added `/resume` support for background sessions — sessions started via `claude --bg` or agent view now appear alongside interactive ones, marked with `bg` - Added elapsed duration to background subagent completion notifications (e.g. "Agent completed · 3h 2m 5s") - The `/plugin` browse and discover panes now show when a plugin was last updated - `/model` now changes the model for the current session only; press `d` in the model picker to set a default for new sessions - Renamed "extra usage" to "usage credits" across CLI copy; `/extra-usage` is now `/usage-credits` (old name still works) - F...
- Added plugin dependency enforcement: `claude plugin disable` now refuses when another enabled plugin depends on the target (with a copy-pasteable disable-chain hint), and `claude plugin enable` force-enables transitive dependencies - Added projected context cost (per-turn and per-invocation token estimates) to the `/plugin` marketplace browse pane - Added `worktree.bgIsolation: "none"` setting to let background sessions edit the working copy directly without `EnterWorktree`, for repos where worktrees are impractical - PowerShell tool now passes `-ExecutionPolicy Bypass`. Opt out with `CLAUDE...
- Added new `claude agents` flags: `--add-dir`, `--settings`, `--mcp-config`, `--plugin-dir`, `--permission-mode`, `--model`, `--effort`, and `--dangerously-skip-permissions` to configure dispatched background sessions - Fast mode now uses Opus 4.7 by default (previously Opus 4.6). Set `CLAUDE_CODE_OPUS_4_6_FAST_MODE_OVERRIDE=1` to pin fast mode to Opus 4.6 - Plugins with a root-level `SKILL.md` and no `skills/` subdirectory are now surfaced as a skill - The `/plugin` details pane and `claude plugin details` now show LSP servers a plugin provides - `/web-setup` warns before replacing an existi...
- Added `terminalSequence` field to hook JSON output so hooks can emit desktop notifications, window titles, and bells without a controlling terminal - Added `CLAUDE_CODE_PLUGIN_PREFER_HTTPS` to clone GitHub plugin sources over HTTPS instead of SSH, for environments without a GitHub SSH key - Added `ANTHROPIC_WORKSPACE_ID` environment variable for workload identity federation — scopes the minted token to a specific workspace when the federation rule covers more than one - Added `claude agents --cwd ` to scope the session list to a directory - `/feedback` can now include recent sessions (last 2...
- Improved Agent tool `subagent_type` matching to accept case- and separator-insensitive values (e.g. `"Code Reviewer"` resolves to `code-reviewer`) - Updated agent color palette - Fixed `/goal` silently hanging when `disableAllHooks` or `allowManagedHooksOnly` is set — now shows a clear message instead of an indicator that never resolves - Fixed a regression in settings hot-reload where symlinked settings files caused misattributed change events and spurious `ConfigChange` hooks - Fixed `claude --bg` failing with "connection dropped mid-request" when the background service was about to idle-e...
- Added agent view (Research Preview): a single list of every Claude Code session — running, blocked on you, or done. Run `claude agents` to get started. See https://code.claude.com/docs/en/agent-view - Added `/goal` command: set a completion condition and Claude keeps working across turns until it's met. Works in interactive, `-p`, and Remote Control. Shows live elapsed/turns/tokens as an overlay panel - Added `/scroll-speed` command to tune mouse wheel scroll speed with a live preview - Added `claude plugin details ` to show a plugin's component inventory and projected per-session token cost...
- Internal fixes
- Added `CLAUDE_CODE_ENABLE_FEEDBACK_SURVEY_FOR_OTEL` to re-enable the session quality survey for enterprises capturing responses through OpenTelemetry - Added `settings.autoMode.hard_deny` for auto mode classifier rules that block unconditionally regardless of user intent or allow exceptions - Fixed MCP servers configured in `.mcp.json`, plugins, and claude.ai connectors silently disappearing after `/clear` in the VS Code extension, JetBrains plugin, and Agent SDK - Fixed a rare login loop where a concurrent credential write could overwrite a freshly-rotated OAuth token and force re-login - F...
- [VSCode] Fixed extension failing to activate on Windows
- Added `worktree.baseRef` setting (`fresh` | `head`) to choose whether `--worktree`, `EnterWorktree`, and agent-isolation worktrees branch from `origin/ ` or local `HEAD`. **Note:** the default `fresh` changes `EnterWorktree`'s base back to `origin/ ` (it has been local `HEAD` since 2.1.128) — set `worktree.baseRef: "head"` to keep unpushed commits in new worktrees - Added `sandbox.bwrapPath` and `sandbox.socatPath` managed settings (Linux/WSL) to specify custom bubblewrap and socat binary locations - Added `parentSettingsBehavior` admin-tier key (`'first-wins' | 'merge'`) to let admins opt S...
- Added `CLAUDE_CODE_SESSION_ID` environment variable to the Bash tool subprocess environment, matching the `session_id` passed to hooks - Added `CLAUDE_CODE_DISABLE_ALTERNATE_SCREEN=1` env var to opt out of the fullscreen alternate-screen renderer and keep the conversation in the terminal's native scrollback - Added a "Pasting…" footer hint while a Ctrl+V image paste is being read from the clipboard - Fixed external SIGINT (e.g. IDE stop button, `kill -INT`) not running graceful shutdown — terminal modes are now restored and the `--resume` hint is printed instead of an abrupt exit - Fixed an ...
- Fixed VS Code extension failing to activate on Windows due to a hardcoded build path in the bundled SDK (`createRequire` polyfill bug) - Fixed Mantle endpoint authentication failing with missing `x-api-key` header
- Added `--plugin-url ` flag to fetch a plugin `.zip` archive from a URL for the current session - Added `CLAUDE_CODE_FORCE_SYNC_OUTPUT=1` env var to force-enable synchronized output on terminals that auto-detection misses (e.g. Emacs `eat`) - Added `CLAUDE_CODE_PACKAGE_MANAGER_AUTO_UPDATE`: when set on Homebrew or WinGet installations, Claude Code runs the upgrade command in the background and prompts to restart - Plugin manifests: `themes` and `monitors` should now be declared under `"experimental": { ... }`. Top-level declarations still work but `claude plugin validate` will warn - Gateway ...
- Bare `/color` (no args) now picks a random session color - `/mcp` now shows the tool count for connected servers and flags servers that connected with 0 tools - `--plugin-dir` now accepts `.zip` plugin archives in addition to directories - `--channels` now works with console (API key) authentication — console orgs with managed settings must set `channelsEnabled: true` to enable - Updated `/model` picker: collapsed duplicate Opus 4.7 entries, and current Opus now shows as "Opus" instead of "Opus 4.7" - Subprocesses (Bash, hooks, MCP, LSP) no longer inherit `OTEL_*` environment variables, so O...
- The `/model` picker now lists models from your gateway's `/v1/models` endpoint when `ANTHROPIC_BASE_URL` points at an Anthropic-compatible gateway - - Added `claude project purge [path]` to delete all Claude Code state for a project (transcripts, tasks, file history, config entry) — supports `--dry-run`, `-y/--yes`, `-i/--interactive`, and `--all` - `--dangerously-skip-permissions` now bypasses prompts for writes to `.claude/`, `.git/`, `.vscode/`, shell config files, and other previously-protected paths (catastrophic removal commands still prompt as a safety net) - `claude auth login` now a...
- Fixed OAuth authentication failing with a 401 retry loop when `CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1` is set
- Added `ANTHROPIC_BEDROCK_SERVICE_TIER` environment variable to select a Bedrock service tier (`default`, `flex`, or `priority`), sent as the `X-Amzn-Bedrock-Service-Tier` header - Pasting a PR URL into the `/resume` search box now finds the session that created that PR (GitHub, GitHub Enterprise, GitLab, and Bitbucket) - `/mcp` now shows claude.ai connectors hidden by a manually-added server with the same URL, with a hint to remove the duplicate - Clarified the `/mcp` message shown when an MCP server is still unauthorized after the browser sign-in flow - OpenTelemetry: numeric attributes on ...
- Added `alwaysLoad` option to MCP server config — when `true`, all tools from that server skip tool-search deferral and are always available - Added `claude plugin prune` to remove orphaned auto-installed plugin dependencies; `plugin uninstall --prune` cascades - Added a type-to-filter search box to `/skills` so you can find a skill in long lists without scrolling - PostToolUse hooks can now replace tool output for all tools via `hookSpecificOutput.updatedToolOutput` (previously MCP-only) - Fullscreen mode: typing into the prompt no longer jumps scroll back to the bottom after you've scrolled...
- Windows: Git for Windows (Git Bash) is no longer required — when absent, Claude Code uses PowerShell as the shell tool - Added `claude ultrareview [target]` subcommand to run `/ultrareview` non-interactively from CI or scripts — prints findings to stdout (`--json` for raw output) and exits 0 on completion or 1 on failure - Skills can now reference the current effort level with `${CLAUDE_EFFORT}` in their content - Set `AI_AGENT` environment variable for subprocesses so `gh` can attribute traffic to Claude Code - Spinner tips that recommend installing the desktop app or creating skills/agents...
- `/config` settings (theme, editor mode, verbose, etc.) now persist to `~/.claude/settings.json` and participate in project/local/policy override precedence - Added `prUrlTemplate` setting to point the footer PR badge at a custom code-review URL instead of github.com - Added `CLAUDE_CODE_HIDE_CWD` environment variable to hide the working directory in the startup logo - `--from-pr` now accepts GitLab merge-request, Bitbucket pull-request, and GitHub Enterprise PR URLs - `--print` mode now honors the agent's `tools:` and `disallowedTools:` frontmatter, matching interactive-mode behavior - `--ag...
- Added vim visual mode (`v`) and visual-line mode (`V`) with selection, operators, and visual feedback - Merged `/cost` and `/stats` into `/usage` — both remain as typing shortcuts that open the relevant tab - Create and switch between named custom themes from `/theme`, or hand-edit JSON files in `~/.claude/themes/`; plugins can also ship themes via a `themes/` directory - Hooks can now invoke MCP tools directly via `type: "mcp_tool"` - Added `DISABLE_UPDATES` env var to completely block all update paths including manual `claude update` — stricter than `DISABLE_AUTOUPDATER` - WSL on Windows c...
- Forked subagents can now be enabled on external builds by setting `CLAUDE_CODE_FORK_SUBAGENT=1` - Agent frontmatter `mcpServers` are now loaded for main-thread agent sessions via `--agent` - Improved `/model`: selections now persist across restarts even when the project pins a different model, and the startup header shows when the active model comes from a project or managed-settings pin - The `/resume` command now offers to summarize stale, large sessions before re-reading them, matching the existing `--resume` behavior - Faster startup when both local and claude.ai MCP servers are configur...
- `/resume` on large sessions is significantly faster (up to 67% on 40MB+ sessions) and handles sessions with many dead-fork entries more efficiently - Faster MCP startup when multiple stdio servers are configured; `resources/templates/list` is now deferred to first `@`-mention - Smoother fullscreen scrolling in VS Code, Cursor, and Windsurf terminals — `/terminal-setup` now configures the editor's scroll sensitivity - Thinking spinner now shows progress inline ("still thinking", "thinking more", "almost done thinking"), replacing the separate hint row - `/config` search now matches option val...
- Fixed a crash in the permission dialog when an agent teams teammate requested tool permission
- Changed the CLI to spawn a native Claude Code binary (via a per-platform optional dependency) instead of bundled JavaScript - Added `sandbox.network.deniedDomains` setting to block specific domains even when a broader `allowedDomains` wildcard would otherwise permit them - Fullscreen mode: Shift+↑/↓ now scrolls the viewport when extending a selection past the visible edge - `Ctrl+A` and `Ctrl+E` now move to the start/end of the current logical line in multiline input, matching readline behavior - Windows: `Ctrl+Backspace` now deletes the previous word - Long URLs in responses and bash output...
- Fixed "claude-opus-4-7 is temporarily unavailable" for auto mode
- Claude Opus 4.7 xhigh is now available! Use /effort to tune speed vs. intelligence - Auto mode is now available for Max subscribers when using Opus 4.7 - Added `xhigh` effort level for Opus 4.7, sitting between `high` and `max`. Available via `/effort`, `--effort`, and the model picker; other models fall back to `high` - `/effort` now opens an interactive slider when called without arguments, with arrow-key navigation between levels and Enter to confirm - Added "Auto (match terminal)" theme option that matches your terminal's dark/light mode — select it from `/theme` - Added `/less-permissio...
- Added `/tui` command and `tui` setting — run `/tui fullscreen` to switch to flicker-free rendering in the same conversation - Added push notification tool — Claude can send mobile push notifications when Remote Control and "Push when Claude decides" config are enabled - Changed `Ctrl+O` to toggle between normal and verbose transcript only; focus view is now toggled separately with the new `/focus` command - Added `autoScrollEnabled` config to disable conversation auto-scroll in fullscreen mode - Added option to show Claude's last response as commented context in the `Ctrl+G` external editor ...
- Improved the extended-thinking indicator with a rotating progress hint
- Added `ENABLE_PROMPT_CACHING_1H` env var to opt into 1-hour prompt cache TTL on API key, Bedrock, Vertex, and Foundry (`ENABLE_PROMPT_CACHING_1H_BEDROCK` is deprecated but still honored), and `FORCE_PROMPT_CACHING_5M` to force 5-minute TTL - Added recap feature to provide context when returning to a session, configurable in /config and manually invocable with /recap; force with `CLAUDE_CODE_ENABLE_AWAY_SUMMARY` if telemetry disabled. - The model can now discover and invoke built-in slash commands like `/init`, `/review`, and `/security-review` via the Skill tool - `/undo` is now an alias for...
- Show thinking hints sooner during long operations
- Added `path` parameter to the `EnterWorktree` tool to switch into an existing worktree of the current repository - Added PreCompact hook support: hooks can now block compaction by exiting with code 2 or returning `{"decision":"block"}` - Added background monitor support for plugins via a top-level `monitors` manifest key that auto-arms at session start or on skill invoke - `/proactive` is now an alias for `/loop` - Improved stalled API stream handling: streams now abort after 5 minutes of no data and retry non-streaming instead of hanging indefinitely - Improved network error messages: conne...
- Added `/team-onboarding` command to generate a teammate ramp-up guide from your local Claude Code usage - Added OS CA certificate store trust by default, so enterprise TLS proxies work without extra setup (set `CLAUDE_CODE_CERT_STORE=bundled` to use only bundled CAs) - `/ultraplan` and other remote-session features now auto-create a default cloud environment instead of requiring web setup first - Improved brief mode to retry once when Claude responds with plain text instead of a structured message - Improved focus mode: Claude now writes more self-contained summaries since it knows you only ...
Anthropic 官方发布的 Claude Code CLI 工具 v2.1.100 版本。
- Added interactive Google Vertex AI setup wizard accessible from the login screen when selecting "3rd-party platform", guiding you through GCP authentication, project and region configuration, credential verification, and model pinning - Added `CLAUDE_CODE_PERFORCE_MODE` env var: when set, Edit/Write/NotebookEdit fail on read-only files with a `p4 edit` hint instead of silently overwriting them - Added Monitor tool for streaming events from background scripts - Added subprocess sandboxing with PID namespace isolation on Linux when `CLAUDE_CODE_SUBPROCESS_ENV_SCRUB` is set, and `CLAUDE_CODE_SC...
- Added focus view toggle (`Ctrl+O`) in `NO_FLICKER` mode showing prompt, one-line tool summary with edit diffstats, and final response - Added `refreshInterval` status line setting to re-run the status line command every N seconds - Added `workspace.git_worktree` to the status line JSON input, set when the current directory is inside a linked git worktree - Added `● N running` indicator in `/agents` next to agent types with live subagent instances - Added syntax highlighting for Cedar policy files (`.cedar`, `.cedarpolicy`) - Fixed `--dangerously-skip-permissions` being silently downgraded to...
- Fixed Bedrock requests failing with `403 "Authorization header is missing"` when using `AWS_BEARER_TOKEN_BEDROCK` or `CLAUDE_CODE_SKIP_BEDROCK_AUTH` (regression in 2.1.94)