Claude Code v2.1.221 发布说明
英文标题:Claude Code v2.1.221
Claude Code v2.1.221 为 VSCode 新增 Focus view,可将工具活动折叠为按轮次展开的摘要,并支持快捷键切换。此次更新在 Linux 和 WSL 沙箱中引入凭据文件遮蔽模式,同时修复了 Bash、PowerShell、MCP、WebSearch、Bedrock 认证及插件等多项问题。更新还优化了自动权限模式、Token 统计、Windows 启动、后台会话与插件安装流程,提升了开发者的安全性、稳定性和工作效率。
打开原文相关 7.2 · 机会 2
1.3 KB
48.7 KB
中文
更新内容
- [VSCode] 新增 Focus view:聊天菜单中的切换项,可将工具活动隐藏在每轮可展开的摘要后,并显示正在运行工具的实时指示器。可通过
Ctrl+Alt+F或“Claude Code: Toggle Focus view”命令切换。 - 在 Linux 和 WSL 上为沙箱凭据文件新增
mode: "mask":沙箱内命令读取的是哨兵副本(整个文件,或仅由extract正则表达式捕获的片段),而沙箱代理会在出口处替换为真实值;在 macOS 上,文件遮蔽会回退为deny。 - 当市场或插件名称会被 Claude Desktop 的托管市场同步拒绝时,
claude plugin validate现在会发出警告。 - 为
claude-apiskill 新增prompt-audit子命令,用于审计针对旧版模型编写的 Prompt 和工具描述模式。 - 修复 Bash 工具权限检查可被绕过的问题:zsh 可在
[[ ]]正则条件中执行隐藏命令;受影响的命令现在会请求权限。 - 修复 Windows 上 PowerShell 权限检查无法正确处理含引号字符路径的问题;此类路径现在会请求批准。
- 修复在关闭 thinking 的状态下启动会话后,thinking 切换对该会话其余时间段无效的问题;在连接过程中禁用 MCP 服务器也不再会被静默还原。
- 修复在打印模式(
-p)下,来自--mcp-config的 MCP 服务器未在首轮前连接的问题;该问题曾导致模型将工具调用输出为字面文本。 - 修复按 Esc 撤回 Prompt 后重新提交时,使用 @ 提及的文件被静默丢弃的问题。
- 修复为名称与
constructor等内置对象属性相同的 SDK MCP 工具准备 API 请求时发生的崩溃。 - 修复关闭 thinking 时,WebSearch 在
xhigh/maxeffort 下出现 400 错误的问题。 - 修复通过沙箱代理进行大型上传时出现 TLS 错误的问题。
- 修复 Team 和 Enterprise 的支出限额消息错误归因于组织月度限额、而非个人支出限额的问题。
- 修复在设置了多余
HOME环境变量的 Windows 机器上,桌面端托管会话中使用 AWS SSO 命名配置文件的 Bedrock 认证失败问题。 - 修复
CLAUDE_CODE_RESUME_INTERRUPTED_TURN=0未能禁用中断轮次自动恢复的问题;现在会正确识别 falsy 值。 - 修复一种罕见的休眠唤醒竞态:两个 Claude Code 进程可能同时刷新同一 MCP 连接器或 WIF OAuth Token,导致被迫重新认证。
- 修复从 Claude Code Desktop 或 claude.ai 重命名会话时,CLI 会话名称未更新的问题;现在所有重命名入口产生的会话名称都会经过清理。
- 修复由插件或组织分发、且名称与仅终端内置命令相同的 skill(例如
/help、/feedback)无法在非交互会话中调用的问题。 - 修复插件重新加载后“Plugins changed”通知仍然保留而未清除的问题。
- 修复 Vim 模式:yank 寄存器现在可在对话框、历史搜索和转录视图之间保留,不再被静默清空。
- 修复 Vim 模式:撤销至空 Prompt 时,现在会在返回 Agent 视图前启用“再次按 ← 确认”。
- 改进 Google Vertex AI 上的工具搜索:重新为 Claude 4.5 代及更新模型启用该功能。
- 改进自动模式:并行工具调用的权限检查现在更高效地使用缓存;在检查等待期间切换模式时,会可靠地重新请求权限,而非应用过期结果。
- 通过在多次决策间复用缓存的对话前缀,降低自动模式权限检查的 Prompt 缓存成本。
- 改进 Stats 面板:Token 总数现在计入缓存 Token,并按输入、输出、缓存读取和缓存写入提供明细。
- 改进
/ultrareview在仓库与其基准没有共同历史时的错误信息:现在会提前拒绝没有分支的 checkout,并建议创建分支;对于已完整克隆的仓库,拒绝提示也不再建议执行git fetch --unshallow。 - 改进 Windows 启动流程:现在通过原生 kernel32 调用读取进程创建时间,而不再启动 PowerShell,因此会拦截
powershell.exe的终端安全工具不再弹出提示。 - 调整后台会话行为:提交并推送以保留工作成果;仅在任务需要时创建草稿 PR;遵循
CLAUDE.md中的 Git 指令;并始终在结束时报告工作所在位置。 - 调整
/plugin install:在报告找不到插件前,会刷新过期的市场目录并重试。 - 调整通过
/plugin安装的插件:在安全时立即激活,而不再总是要求执行/reload-plugins。 - 调整插件配置:
skills路径现在接受".";根目录SKILL.md验证错误现在会建议使用插件根目录。 - 调整
/status:显示会话类型,即interactive,或处于attached或unattended状态的后台任务。 - 调整 Emoji 自动补全:接受常见替代短代码,例如
:thumbsup:、:thumbsdown:和:love:。 - 调整通过
/fork创建的会话:现在会创建各自独立的新 worktree,而不再使用原会话的 checkout。 - 调整 Claude in Chrome:在不再需要时关闭其打开的浏览器标签页。
- 调整快速模式:当会话中途用量额度耗尽时,现在会在流中报告,而非静默失败。
- 调整 Monitor:不产生任何输出即退出的 watch,现在会明确说明这一情况,而不再报告“stream ended”。
- 调整 Gateway 的
model字段验证:非字符串值现在会被以 400 拒绝,而不再向后转发。 - 移除审批提示中重复出现的“Permission mode changed while the auto-mode classifier call was queued”通知。
English / 原文
Compare
Sorry, something went wrong.
No results found
What's changed
- [VSCode] Added Focus view: a chat-menu toggle that hides tool activity behind an expandable per-turn summary with a live running-tool indicator, toggled with
Ctrl+Alt+For the "Claude Code: Toggle Focus view" command - Added
mode: "mask"for sandbox credential files on Linux and WSL — sandboxed commands read a sentinel copy (the whole file, or just the spans captured by anextractregex) while the sandbox proxy substitutes the real value on egress; on macOS file masking falls back todeny - Added warnings to
claude plugin validatewhen a marketplace or plugin name would be rejected by Claude Desktop's managed marketplace sync - Added a
prompt-auditsubcommand to theclaude-apiskill for auditing prompts and tool descriptions for patterns written for older models - Fixed a Bash tool permission-check bypass where zsh could execute hidden commands in
[[ ]]regex conditionals; affected commands now prompt for permission - Fixed PowerShell permission checks mishandling paths containing quote characters on Windows; such paths now prompt for approval
- Fixed the thinking toggle having no effect for the rest of a session that started with thinking off; disabling an MCP server mid-connect no longer silently reverts
- Fixed MCP servers from
--mcp-confignot being connected before the first turn in print mode (-p), which made the model emit tool calls as literal text - Fixed @-mentioned files being silently dropped when pressing Esc to retract a prompt and resubmitting it
- Fixed a crash when preparing API requests for SDK MCP tools named after built-in object properties such as
constructor - Fixed WebSearch failing with a 400 error at effort
xhigh/maxwhen thinking is disabled - Fixed sandboxed large uploads failing with TLS errors through the sandbox proxy
- Fixed Team and Enterprise spend-limit message incorrectly blaming the org's monthly limit instead of your individual spend limit
- Fixed Bedrock authentication with AWS SSO named profiles failing in desktop-managed sessions on Windows machines that set a stray
HOMEenvironment variable - Fixed
CLAUDE_CODE_RESUME_INTERRUPTED_TURN=0not disabling interrupted-turn auto-resume; falsy values are now honored - Fixed a rare wake-from-sleep race where two Claude Code processes could both refresh the same MCP connector or WIF OAuth token at once, forcing re-authentication
- Fixed renaming a session from Claude Code Desktop or claude.ai not updating the CLI's session name; session names from every rename surface are now sanitized
- Fixed plugin- and org-delivered skills named after terminal-only built-ins (e.g.
/help,/feedback) being un-invocable in non-interactive sessions - Fixed the "Plugins changed" notification lingering after plugins were reloaded instead of clearing
- Fixed Vim mode: the yank register now survives dialogs, history search, and the transcript view instead of being silently emptied
- Fixed Vim mode: undoing back to an empty prompt now arms the "press ← again" confirm before returning to the agent view
- Improved tool search on Google Vertex AI: re-enabled for Claude 4.5-generation and newer models
- Improved auto mode: permission checks for parallel tool calls are now cache-efficient, and switching modes while a check is pending reliably prompts instead of applying the stale result
- Reduced prompt-cache costs for auto-mode permission checks by reusing the cached conversation prefix across decisions
- Improved Stats panel to count cache tokens in its token totals, with a breakdown by input, output, cache read, and cache write
- Improved
/ultrareviewerror messages when a repo shares no history with its base: a checkout with no branches is now refused up front with advice to create one, and refusal hints no longer suggestgit fetch --unshallowon clones that are already complete - Improved Windows startup: process creation times are now read via a native kernel32 call instead of spawning PowerShell, so endpoint security tools that gate
powershell.exeno longer prompt - Changed background sessions to commit and push to preserve work, open a draft PR only when the task calls for one, follow your CLAUDE.md git instructions, and always end by reporting where the work lives
- Changed
/plugin installto refresh a stale marketplace catalog and retry before reporting a plugin not found - Changed plugins installed from
/pluginto activate immediately when safe, instead of always requiring/reload-plugins - Changed plugins to accept
"."as askillspath, and the root-levelSKILL.mdvalidation error now suggests using the plugin root - Changed
/statusto show the session kind:interactive, or a background job that isattachedorunattended - Changed emoji autocomplete to accept common alternate shortcodes like
:thumbsup:,:thumbsdown:, and:love: - Changed sessions forked with
/forkto create a new worktree of their own instead of working in the original session's checkout - Changed Claude in Chrome to close the browser tabs it opens once it no longer needs them
- Changed fast mode to report on the stream when usage credits run out mid-session, instead of failing silently
- Changed Monitor: a watch that exits without producing any output now says so instead of reporting "stream ended"
- Changed the Gateway
modelfield validation: non-string values are rejected with a 400 instead of being forwarded - Removed the repeated "Permission mode changed while the auto-mode classifier call was queued" notice from approval prompts
You can’t perform that action at this time.