# Claude Code v2.1.163 发布

- 来源：Claude Code：GitHub Releases（RSS）
- 作者：ashwin-ant
- 发布时间：2026-06-05 05:52
- AIHOT 分数：70
- AIHOT 标记：精选
- AIHOT 链接：https://aihot.virxact.com/items/cmq01mta1021nsltrwdaxe7ya
- 原文链接：https://github.com/anthropics/claude-code/releases/tag/v2.1.163

## 精选理由

Claude Code 这次的版本管理设置对团队标准化很关键，plugin list 命令也让插件管理顺手多了，但这种工具更新属于用的人自然懂，不是所有人都需要关注。

## AI 摘要

新增 `requiredMinimumVersion` 和 `requiredMaximumVersion` 托管设置，版本超范围时拒绝启动并引导用户使用经批准版本。新增 `/plugin list` 命令及 `--enabled`/`--disabled` 筛选；`/btw` 添加 "c to copy" 快捷键，复制原始 markdown 答案到剪贴板。Hooks 方面，Stop 和 SubagentStop 可返回 `additionalContext` 给 Claude 反馈并保持对话。Skills 新增 `\$` 转义语法，支持在命令中数字前使用字面 `$`。stdio MCP 服务器在 `--resume` 时接收与 hooks/Bash 相同的 `CLAUDE_CODE_SESSION_ID`。修复了 `claude -p` 永久挂起、`$TMPDIR` 被覆盖、Windows 上 session-env 目录 EEXIST 错误、后台 agent 会话在更新后自动升级等多处问题。

## 正文

What's changed

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
