官方更新 Claude Code Releases 2026-07-22T21:24 正文 ok 781 words

Claude Code v2.1.218 更新:后台代码审查、无障碍改进与多项稳定性修复

英文标题:Claude Code v2.1.218

Claude Code v2.1.218 将 `/code-review` 改为后台 subagent 执行,避免审查过程占满主对话,并支持将连续执行的斜杠命令作为审查目标。此次更新强化了 `--ax-screen-reader` 模式的辅助功能,包括删除文本、输入空格和面板焦点导航的屏幕阅读器提示。版本还修复了 Windows 路径转义、终端多行粘贴、MCP 连接诊断、会话恢复、PR 事件丢失及 Bedrock 配置等问题。对开发者而言,该版本提升了代码审查、自动模式、远程会话和 IDE 集成场景下的可靠性与可访问性。
打开原文相关 7.2 · 机会 2
media1.3 KB media51.9 KB

中文

更新内容

  • 将 /code-review 改为作为后台 subagent 运行,因此审查工作不再占满你的对话,同时仍会将连续叠加的斜杠命令作为审查目标
  • 在 --ax-screen-reader 模式中,为按词和按行删除操作(Option+Delete、Ctrl+W、Cmd+Backspace、Ctrl+U、Ctrl+K)新增已删除文本的屏幕阅读器播报
  • 修复工具输入中以 \u 开头的 Windows 路径片段(例如 C:\Users\unicorn)被错误转换为中日韩字符的问题;此前这会导致相应文件无法访问
  • 修复按左方向键会在无法撤销的情况下丢弃对话的问题:现在,编辑后立即按下该键会要求确认;在 Agent 视图中按 Esc 则会返回其转入后台前的对话
  • 当服务器连接失败时,claude mcp list 和 /mcp 现在会显示 HTTP 状态和错误文本;同时会对 MCP 配置值中隐藏的前导或尾随空白字符发出警告
  • 修复在将粘贴换行编码为 Ctrl+J 的终端中,多行粘贴内容被压缩为单行、且换行被替换为 j 的问题
  • 修复从消息选择器执行压缩后,/context 仍报告压缩前旧 token 使用量的问题
  • 修复 /ultrareview 在使用“review my auth changes”这类描述性参数时失败的问题:现在它会审查当前分支,并将该文本作为审查发现结果的备注
  • 修复非交互式会话中 /code-review ultra 静默执行本地审查的问题;现在会启动云端审查
  • 修复网关支出计量:现在会按照已配置模型的费率,为 Bedrock application-inference-profile ARN 及其他由配置映射的上游模型 ID 计价
  • 修复较长的 IDE 选区在 emoji 中间被截断时出现的乱码问题,以及工具执行器错误可能被静默丢弃的情况
  • 修复引擎拆卸过程中的竞态条件;该问题可能启动并遗弃一个虚假的 turn。关闭后推送的输入现在也会被稳定拒绝
  • 修复工具调用中断后错误出现的“[Request interrupted by user]”消息,以及工具在响应中途终止时转录记录中残留未配对 tool_use 块的问题
  • 修复在 --ax-screen-reader 模式中,VoiceOver 会朗读“new line”而不是回显输入末尾键入空格的问题
  • 修复插件和设置面板未将终端光标移动到获得焦点行的问题,确保屏幕阅读器和放大工具能够跟随方向键导航
  • 修复删除或移动深度嵌套的受监视目录树时,以及渲染深度嵌套 UI 树时出现的崩溃(maximum call stack exceeded)
  • 修复会话在创建或关联 PR 后立即退出时,拉取请求事件偶尔丢失的问题
  • 修复 Bedrock 设置向导在分区 AWS 区域及仅限代理网络中,无法验证 assume-role 配置文件的问题
  • 通过单调时钟为 turn 计时,修复系统时钟调整后偶尔出现负数或不正确 turn 时长测量的问题
  • 修复启动提示“N MCP servers need authentication”对未在 claude.ai 中连接的 claude.ai connector 计数过多的问题
  • 修复历史记录写入发生竞态或失败时,提示历史条目被丢弃或重复的问题
  • 修复在大 thinking budget 下发生上下文溢出错误后,重试循环会重复发送相同且注定失败请求的问题;Ctrl+B 转入后台现在会应用与其他路径相同的后台 shell 限制
  • 修复 Agent frontmatter hook 可从不受信任文件夹运行的问题:现在 hook 要求 Agent 文件所在文件夹自身已获得工作区信任
  • 修复无头会话和 SDK 会话在压缩后丢失 fork-session 血缘关系的问题
  • 修复当恢复的会话历史包含格式错误的 delta 附件时,每个 turn 都会失败或恢复时崩溃的问题
  • 改进 /ultrareview 的错误反馈,让 Claude 能够修正无效参数,而非原样重试
  • 改进自动模式:危险 rm、后台 & 和可疑 Windows 路径检查不再打开权限对话框,改由自动模式分类器进行判定
  • 改进 IDE 交互的沙箱命令限制
  • 改进信任对话框,使其明确显示授权所覆盖的仓库根目录
  • 将 /deep-research 改为仅在手动调用时启动;Claude 不再自行启动它
  • 调整启用自动模式的计划模式:对于静态分析器无法证明为只读的 Bash 命令,不再弹出提示;改由自动模式分类器判定
  • 当通过 /config model=<x> 或 Remote Control 切换模型导致快速模式变化时,新增提示通知
  • 调整服务器托管设置:无害的功能和成本开关不再触发设置审批提示
  • 调整 Agent Markdown 文件:拒绝名称中包含 : 的 Agent 名称,因为该字符保留用于插件命名空间
  • 将带有 context: fork 的技能默认改为在后台运行;可通过每个技能中的 background: false 退出该默认行为
  • 除 true/false 外,技能和插件 frontmatter 布尔值现还接受 yes/no/on/off/1/0(不区分大小写)
  • 修复远程会话在其 worker 被替换后仍持续发送心跳的问题;此前这会使长期运行的桌面端和 IDE 进程每隔几秒无限重试一个被拒绝的请求

English / 原文

  1. Releases
  2. v2.1.218

Compare

Sorry, something went wrong.

No results found

What's changed

  • Changed /code-review to run as a background subagent, so review work no longer fills your conversation and keeps stacked slash commands as its review target
  • Added screen-reader announcements of deleted text for word and line deletions (Option+Delete, Ctrl+W, Cmd+Backspace, Ctrl+U, Ctrl+K) in --ax-screen-reader mode
  • Fixed Windows paths with \u-prefixed segments (like C:\Users\unicorn) being corrupted into CJK characters in tool inputs, which made those files inaccessible
  • Fixed the left arrow key discarding the conversation with no undo: presses right after editing now ask to confirm, and Esc in the agent view returns to the conversation it backgrounded
  • Added HTTP status and error text to claude mcp list and /mcp when a server fails to connect, and a warning for MCP config values with hidden leading or trailing whitespace
  • Fixed multi-line paste collapsing into one line with j in place of newlines in terminals that encode pasted newlines as Ctrl+J
  • Fixed /context reporting stale pre-compact token usage after compacting from the message picker
  • Fixed /ultrareview failing on descriptive arguments like "review my auth changes" — they now run a review of your current branch with the text applied as a note to the findings
  • Fixed /code-review ultra silently running a local review in non-interactive sessions — it now launches the cloud review
  • Fixed gateway spend metering to price Bedrock application-inference-profile ARNs and other config-mapped upstream model IDs at the configured model's rates
  • Fixed mojibake when a long IDE selection was truncated mid-emoji, and a case where a tool executor error could be silently dropped
  • Fixed an engine teardown race that could start and abandon a phantom turn, and made input pushed after close consistently rejected
  • Fixed spurious "[Request interrupted by user]" messages after interrupted tool calls, and an unpaired tool_use block left in the transcript when a tool aborted mid-response
  • Fixed VoiceOver reading "new line" instead of echoing the typed space at the end of the input in --ax-screen-reader mode
  • Fixed plugin and settings panels not moving the terminal cursor to the focused row, so screen readers and magnifiers can follow arrow-key navigation
  • Fixed crashes (maximum call stack exceeded) when a deeply nested watched directory tree was deleted or moved, and when rendering deeply nested UI trees
  • Fixed pull request events occasionally being lost when a session exited immediately after creating or linking a PR
  • Fixed the Bedrock setup wizard failing profile verification for assume-role profiles in partitioned AWS regions and on proxy-only networks
  • Fixed rare negative or incorrect turn duration measurements after a system clock adjustment by timing turns with a monotonic clock
  • Fixed the "N MCP servers need authentication" startup notice over-counting claude.ai connectors that aren't connected in claude.ai
  • Fixed prompt history entries being dropped or duplicated when history writes raced or failed
  • Fixed a retry loop that re-sent identical doomed requests after a context-overflow error with a large thinking budget; Ctrl+B backgrounding now applies the same background-shell caps as other paths
  • Fixed agent frontmatter hooks running from untrusted folders: hooks now require the agent file's own folder to have accepted workspace trust
  • Fixed fork-session lineage being lost after compaction in headless and SDK sessions
  • Fixed a resumed session failing every turn, or crashing on resume, when its history held a malformed delta attachment
  • Improved /ultrareview error feedback so Claude can correct an invalid argument instead of retrying it unchanged
  • Improved auto mode: the dangerous-rm, background-&, and suspicious-Windows-path checks no longer open permission dialogs; the auto-mode classifier adjudicates them instead
  • Improved sandbox command restrictions for IDE interactions
  • Improved trust dialogs to name the repository root the grant covers
  • Changed /deep-research to start only when invoked manually; Claude no longer launches it on its own
  • Changed plan mode with auto to no longer prompt for Bash commands the static analyzer can't prove read-only; the auto-mode classifier judges them instead
  • Added an announcement when fast mode changes as a result of switching models via /config model=<x> or Remote Control
  • Changed server-managed settings so benign feature and cost toggles no longer trigger the settings-approval prompt
  • Changed agent markdown files to reject agent names containing :, which is reserved for plugin namespacing
  • Changed skills with context: fork to run in the background by default; opt out per skill with background: false
  • Added yes/no/on/off/1/0 (case-insensitive) as accepted values for skill and plugin frontmatter booleans, alongside true/false
  • Fixed remote sessions continuing to send heartbeats after their worker was replaced, which left long-lived desktop and IDE processes retrying a rejected request every few seconds forever

You can’t perform that action at this time.