官方更新 Claude Code Releases 2026-08-04T22:39 正文 ok 481 words

Claude Code v2.1.222 发布:修复隔离、安全与连接问题

英文标题:Claude Code v2.1.222

Claude Code v2.1.222 重点修复了 worktree 隔离会话及其子 Agent 可对主检出目录执行破坏性 Git 命令的问题,现已将隔离覆盖到所有会话类型中的文件编辑和 Bash 操作。此次更新还修复了后台 Agent 任务绕过工具限制、HTTPS 代理连接检查失败、已完成响应被误报连接中断等问题。对于团队与企业用户,版本改进了 `/usage-credits`、MCP 用量归因、Pull Request 关联和组织模型限制下的模型降级行为。更新同时加强了自动模式权限检查,调整 Remote Control 的启用规则,并移除了 ultraplan 功能。
打开原文相关 10.8 · 机会 3
media1.3 KB media46.4 KB

中文

变更内容

  • 修复了由 worktree 隔离的会话及其子 Agent 能够针对主检出目录运行破坏性 Git 命令的问题;隔离现已适用于所有会话类型中的文件编辑和 Bash 操作。
  • 修复了 PreToolUse 自动允许钩子可在后台 Agent 任务(摘要、压缩、重命名)中绕过工具限制的问题。
  • 修复了 Team 和 Enterprise 版中的 /usage-credits:此前,先前申请被驳回的成员会看到“你已发送过用量额度申请”,从而无法重新提交申请。
  • 修复了在 HTTPS 代理后方启动连接检查卡住并最终失败的问题;现在该检查使用与 API 请求相同的代理感知传输机制,并会在超时时显示清晰的提示信息。
  • 修复了实际上已完成的响应被报告为“响应中连接已关闭”错误的问题。
  • 修复了 /usage 对 MCP 服务器用量归因过多的问题:服务器的占比现在只反映实际消耗其工具结果的请求,而不是在曾调用该服务器后发生的每一轮对话。
  • 修复了会话无法关联到分支推送后创建的 Pull Request 的问题,包括通过 GitHub REST API 创建的 Pull Request。
  • 修复了受组织限制的 model: opus 形式子 Agent 和队友系列别名会回退至父模型、而非降级至该系列中组织允许的最新模型的问题。
  • 修复了在自定义 ANTHROPIC_BASE_URL 网关上,即使网络层仍收到服务器 keep-alive ping,流式响应空闲超时仍会触发的问题。
  • 修复了当会话令牌无效时,claude.ai 连接器被错误标记为需要授权的问题;现在会改为显示 /login 提示。
  • 修复了本地不再可用的工具错误未被显示的问题,例如移除 MCP 服务器之后。
  • 修复了 SendMessage 拒绝过长摘要的问题;现在会改为截断摘要,因此发送不会再因字符数限制而失败。
  • 修复了子 Agent 转录视图中加载动画的工作强度标签显示会话工作强度、而不是子 Agent 自身 effort: 设置的问题。
  • 修复了文件监视器遇到文件系统错误或文件监视器清理期间偶发崩溃的问题。
  • 修复了在 --ax-screen-reader 模式下,屏幕阅读器每次按退格键都会重新朗读整行输入的问题;现在删除行尾字符时只会回显被删除的字符。
  • 修复了设置 CLAUDE_CODE_PROVIDER_MANAGED_BY_HOST 时,主机模型选择键无法优先于磁盘中陈旧的 managed-settings.json 的问题。
  • 改进了自动模式安全性:通过 SendMessage 发送给其他 Agent 会话的消息,现在会在分发前由权限分类器进行评估。
  • 改进了 Claude 尝试调用带有 disable-model-invocation 的技能时的拒绝处理:Claude 现在会提示你自行运行该技能,而不是复刻其工作流程。
  • 改进了 /diff 视图、Remote Control 工作区差异视图,以及 Claude Code 网页会话中的文件编辑差异视图:现改用原始 Git blob 内容,忽略工作区配置的 diff driver 和 textconv。
  • 调整了 Remote Control 自动启动机制:仓库本地设置(.claude/settings.json 或 .claude/settings.local.json)不再能够启用它,但仍可将其关闭;请通过 /config 在用户级别启用。
  • 移除了 ultraplan 功能。

English / 原文

  1. Releases
  2. v2.1.222

Compare

Sorry, something went wrong.

No results found

What's changed

  • Fixed worktree-isolated sessions and their subagents being able to run destructive git commands against the main checkout; isolation now applies to file edits and Bash in every session type
  • Fixed PreToolUse auto-allow hooks bypassing tool restrictions in background agent tasks (summaries, compaction, renames)
  • Fixed /usage-credits on Team and Enterprise showing "you've already sent a usage credit request" for members whose earlier request was dismissed, blocking them from sending a new one
  • Fixed the startup connectivity check hanging and then failing behind an HTTPS proxy; it now uses the same proxy-aware transport as API requests and times out with a clear message
  • Fixed "Connection closed mid-response" errors being reported on responses that had actually completed
  • Fixed /usage overattributing usage to MCP servers: a server's share now reflects only the requests that actually consumed its tool results, instead of every turn after any call to it
  • Fixed sessions not linking to pull requests created after the branch was pushed, including through the GitHub REST API
  • Fixed org-restricted model: opus-style subagent and teammate family aliases dropping to the parent model instead of stepping down to the newest org-allowed model in the family
  • Fixed stream idle timeout firing on custom ANTHROPIC_BASE_URL gateways despite server keep-alive pings arriving on the wire
  • Fixed claude.ai connectors being falsely marked as needing authorization when the session token is invalid — they now show a /login hint instead
  • Fixed tool errors not being displayed for tools no longer available locally, for example after an MCP server is removed
  • Fixed SendMessage rejecting a long summary — it now truncates instead, so sends no longer fail on a character limit
  • Fixed the spinner's effort label in a subagent's transcript view showing the session's effort level instead of the subagent's own effort: setting
  • Fixed rare crashes when a file watcher hit a filesystem error or during file-watcher teardown
  • Fixed screen readers re-reading the whole input line on every backspace in --ax-screen-reader mode — end-of-line deletions now echo just the deleted characters
  • Fixed host model-selection keys not taking precedence over a stale on-disk managed-settings.json when CLAUDE_CODE_PROVIDER_MANAGED_BY_HOST is set
  • Improved auto mode safety: messages sent to other agent sessions via SendMessage are now evaluated by the permission classifier before dispatch
  • Improved the refusal when Claude tries to invoke a skill with disable-model-invocation: Claude is now told to ask you to run the skill instead of replicating its workflow
  • Improved the /diff view, the Remote Control workspace diff, and file-edit diffs in Claude Code on the web sessions to use raw git blob content, ignoring workspace-configured diff drivers and textconv
  • Changed Remote Control auto-start so repo-local settings (.claude/settings.json or .claude/settings.local.json) can no longer turn it on (they can still turn it off); enable it at user scope via /config
  • Removed ultraplan feature

You can’t perform that action at this time.