黄奕彬

外部精选

Claude Code · v2.1.316

本文来自外部来源,不是黄奕彬的原创文章。本站提供原文入口,并在采集端生成 AI 结构化摘要、解读与中文翻译(如有),一切以原文为准。

阅读原文(github.com)
来源
Claude Code releases ↗
作者 / 署名
ashwin-ant
来源更新时间
本站收录时间
原文域名
github.com

以上时间均为北京时间;来源更新时间由来源提供,不代表首次发布时间。

结构化摘要 AI 生成

背景与问题

背景与问题:这是 Claude Code v2.1.316 的版本发布说明(GitHub releases,commit 80c6959,标记为不可变发布),面向 Claude Code 用户与企业管理员。

它要回答的问题是:本版本新增了哪些功能与环境变量、弃用了什么、修复了哪些已知缺陷,以及哪些条目仅适用于特定平台(VSCode、云会话、Claude Tag、self-hosted runner、Windows)。

方法或内容

内容为一份 What's changed 变更清单:

  • 新增配置与功能:CLAUDE_CODE_DISABLE_ULTRATHINK、CLAUDE_CODE_DISABLE_LOOPED_CROSS_CERT_DROP、CLAUDE_CODE_SUBAGENT_EFFORT 等环境变量,以及 Claude apps gateway 的组共享预算(pooled_budget)、managed.policy_mode: layered、guardrail.input_tagging
  • 宣布弃用 Opus 4.8 fast mode 并给出时间线
  • 数十项缺陷修复(shell、网络、模型切换、网关校验、云会话等)
  • 若干改进与平台子项(VSCode、Cloud sessions、Claude Tag、Code Review)

关键发现 / 结果

新增要点:

  • 三个新环境变量:CLAUDE_CODE_DISABLE_ULTRATHINK 关闭 ultrathink 关键词;CLAUDE_CODE_DISABLE_LOOPED_CROSS_CERT_DROP 保留循环互签的系统交叉证书;CLAUDE_CODE_SUBAGENT_EFFORT 指定子代理默认 effort
  • 网关新增组共享月度预算,经 spend limits admin API 的 pooled_budget 设置,叠加于成员各自限额
  • managed.policy_mode: layered 使每条匹配开发者的策略按序合并生效
  • Bedrock 上游 guardrail.input_tagging 包装 prompt 以适配 guardrail 提示攻击过滤

弃用:Opus 4.8 fast mode 于 2026年10月30日 弃用、2026年11月30日 移除,之后请求报错且不回退,需迁移至 Opus 5.5。

修复(节选):退出后 shell 命令残留;bash 别名/函数丢失;SHELLOPTS 导出致脚本首命令后停止;压缩响应被截断时请求挂起;Vertex AI/Bedrock 最新模型不可用时改为切旧模型而非报错;网关逐个校验模型,被阻止模型返回 400;--restricted 越界上传;隐形字符提示需二次回车。

改进:大仓库 /diff 每次刷新通常少一次全仓库 git 命令;Team/Enterprise 服务器管理设置免审批应用;云会话新增表单卡片与「Catching up…」提示;Code Review 新增按严重程度的统计卡片。

结论与意义

升级到 v2.1.316 即可获得上述修复与功能。使用 Opus 4.8 fast mode 者需在 2026年11月30日 前迁移至 Opus 5.5,否则 fast mode 请求将报错且不回退标准 Opus 4.8。

网关新配置仅适用于部署 Claude apps gateway 的组织,平台子项仅对相应客户端(VSCode、Slack、云会话等)生效。原文未说明本版本在性能或整体兼容性上的其他结论。

AI 解读 AI 生成

方法:按「时空变量」分析(时间 / 空间 / 变量,严格区分包含、相关与因果),对象包括原文作者、署名人员与关键技术及其实际原理;结论用「元反空」(元思考、反思考、空思考、综合)整理。

时间:何时发生,现在是否仍成立

发布时间按来源日期为北京时间 2026年10月31日 09:01:35(对应 commit 80c6959)。原文给出的两条时间线:Opus 4.8 fast mode 于 2026年10月30日 弃用、2026年11月30日 移除。本说明仅覆盖 v2.1.316 单一版本;此后版本是否改变这些行为,原文未说明。除已注明的移除日期外,各修复与新增在发布时即生效。

空间:谁的环境 / 场景

适用对象与环境:

  • 主体产品为 Claude Code v2.1.316,覆盖 macOS、Linux、Windows(含 Git Bash 与 PowerShell)及 VSCode 扩展
  • 网关条目面向部署 Claude apps gateway 的组织,含 Amazon Bedrock 上游与 Vertex AI/Bedrock 模型接入
  • 云条目面向 cloud sessions、cloud scheduled tasks、Remote Control、Claude Desktop/web
  • Claude Tag 条目面向 Slack 集成;runner 条目面向 self-hosted runner 部署

变量:实际改变了什么

相对此前的实际变化:

  • 新增配置面:三个环境变量与网关三组能力(pooled_budget、managed.policy_mode: layered、guardrail.input_tagging)
  • 行为变更:Team/Enterprise 登录的服务器管理设置免审批即应用、未通过校验的存储副本被拒绝;Enterprise 成员可增删云环境网络 secrets;autoMode.allow 无 $defaults 时不再移除定时任务提示的内置规则;Slack 「Respond automatically」开关改为「How Claude participates」选项
  • 计划中的移除:Opus 4.8 fast mode 将于 2026年11月30日 后报错且不回退
  • 数十项缺陷行为被修正,如退出后 shell 残留、别名丢失、越界上传等

区分:包含 ≠ 相关 ≠ 因果

明确因果:各 Fixed 条目直接陈述缺陷与结果(如压缩响应被截断导致请求挂起;SHELLOPTS 导出导致脚本首命令后停止;宿主应用会话中 CLAUDE_CODE_AUTO_MODE_SERVER=1 被忽略);fast mode 移除后返回错误且不回退是原文陈述的计划性因果。包含/并存而非因果:组共享预算叠加于(on top of)成员各自限额,是并存关系而非取代或导致。

仅相关或未断言因果:部分条目只描述现象与修复(如恢复会话未还原 plan 的罕见情形),原文未给出成因;/diff 改进与仓库大小是条件场景描述,非因果断言。

对象:作者/署名与关键技术原理

署名作者:ashwin-ant(来自结构化作者字段;正文未提供其更多身份信息)。关键技术及原文描述:

  • 环境变量开关:CLAUDE_CODE_DISABLE_ULTRATHINK、CLAUDE_CODE_DISABLE_LOOPED_CROSS_CERT_DROP、CLAUDE_CODE_SUBAGENT_EFFORT、CLAUDE_CODE_AUTO_MODE_SERVER
  • Claude apps gateway:spend limits admin API 的 pooled_budget、managed.policy_mode: layered 的逐层合并、对 availableModels/deniedModels/models 的逐模型校验
  • Bedrock guardrail 的 input tags 包装(all_messages_and_system 亦标记系统提示)
  • Bash 工具对别名、函数、SHELLOPTS 的解析;auto mode 的 allow 列表与 safety verdict;MCP 插件脚本与表单请求
  • 命令与工具:/code-review、/diff、/ultrareview、/model、Artifact tool、SDK 的 register_repo_root

这些机制的底层实现原理细节,原文未说明。

元反空综合结论

元:这份说明本质在解决「用户如何得知 v2.1.316 改了什么、是否需要行动」的问题,核心价值是升级决策依据与运维排查线索。

反:最可能有时效边界的是 Opus 4.8 fast mode——2026年11月30日后必然失效且不回退;网关与 Bedrock 条目仅对相应部署形态成立;平台子项对不使用 VSCode、Slack、云会话的用户无影响;后续版本可能改变任一条目,原文未说明。

空:去掉发布叙事后剩余的必要事实是:一个带 commit 80c6959 的不可变版本,新增若干环境变量与网关配置,宣布一项带明确截止日的弃用,修复数十个已点名缺陷并做若干交互改进。

综合结论:对运行受影响场景(Bash 工具、网关策略与预算、云会话、Slack 集成、Vertex AI/Bedrock 接入)的用户,升级到 v2.1.316 有直接修复与治理价值;使用 Opus 4.8 fast mode 的用户面临明确的迁移截止日;其余用户为常规版本更新。

中文译文 AI 生成

不可变的发布。只有发布标题和发布说明可被修改。

80c6959

更新内容

  • 新增 CLAUDE_CODE_DISABLE_ULTRATHINK,用于关闭 ultrathink 关键词
  • 向 Claude apps gateway 新增分组共享预算(pooled group budgets):即一个由分组成员共享的月度预算,叠加在每个成员自身限额之上,通过 spend limits admin API 上的 pooled_budget 进行设置
  • 新增 CLAUDE_CODE_DISABLE_LOOPED_CROSS_CERT_DROP,用于保留彼此循环互签的系统交叉证书,适用于其私有 CA 需要此类证书的服务器
  • 新增 CLAUDE_CODE_SUBAGENT_EFFORT,用于在没有其他来源指定时设定子代理运行的投入等级,而不是继承会话的等级
  • 向 Claude apps gateway 新增 managed.policy_mode: layered:与开发者匹配的每条策略都会生效,每条都会合并覆盖其下方所列的策略,而不仅仅是第一条
  • 在 Claude apps gateway 的 Bedrock 上游新增 guardrail.input_tagging,它会把提示词包裹在 Amazon Bedrock guardrail 的 prompt attacks 过滤器所需的输入标签中;all_messages_and_system 还会为系统提示词加标签
  • 自 2026 年 10 月 30 日起弃用 Opus 4.8 的 fast mode;它将于 2026 年 11 月 30 日被移除。移除后,在 Opus 4.8 上发起的 fast mode 请求会返回错误,且不会回退到标准 Opus 4.8。请迁移到 Opus 5.5 以保留提速效果
  • 修复了在 macOS 和 Linux 上,当 Claude Code 自行退出(例如凭证被拒绝或云端会话被归档)时 shell 命令仍在运行的问题
  • 修复了值中包含换行符的 bash 别名(Git Bash 中除外)以及名称以连字符开头的函数在 Bash 工具的 shell 中出现乱码或丢失的问题
  • 修复了当导出 SHELLOPTS 时,从 Bash 工具启动的 bash 脚本在第一条命令后即停止的问题
  • 修复了当命令以类型转换(type cast)、param、using 或 attribute 开头时,PowerShell 钩子在退出码为 2 时不阻塞的问题
  • 修复了压缩响应被截断或损坏时部分网络请求挂起的问题
  • 修复了在 Vertex AI 和 Amazon Bedrock 上,当最新模型尚未对该账户或区域开放时,sonnet、opus 和 haiku 在会话中途报错而不是切换到较旧模型的问题
  • 修复了 Claude apps gateway 未将请求中指定的每个模型与 availableModels、deniedModels 和 models 核对的问题;现在指定了被阻止模型的请求会收到 400 错误并指明相关字段
  • 修复了在托管设置要求使用 Claude apps gateway 时 claude auth login 拒绝运行的问题;现在它在终端中会显示 gateway 登录
  • 修复了当某条 Read 允许规则覆盖了工作目录之外的文件时,--restricted 会话会上传这些文件的问题
  • 修复了包含不可见字符的提示需要按第二次 Enter 才能发送的问题;现在普通提示在第一次 Enter 时即发送已清理的内容,命令仍需等待审查
  • 修复了继承了父级子代理模型的子代理在后台任务或消息唤醒它们时改用主模型的问题
  • 修复了不含 "$defaults" 的托管 autoMode.allow 列表会从宿主应用的 --settings、在 /permissions 中添加的首条规则或 /auto-mode-setup 处重新取回内置例外的问题
  • 修复了当自动模式因服务器未返回安全判定而停止一轮时,云端会话和云端定时任务未被标记为失败的问题
  • 修复了在后台代理仍在运行时,claude -p 的文本输出有时不说明自动模式为何停止一轮的问题
  • 修复了在关闭实验性 beta 功能的情况下,位于代理或 LLM gateway 之后的宿主应用(如 Claude Desktop)所启动的会话中 CLAUDE_CODE_AUTO_MODE_SERVER=1 被忽略的问题
  • 修复了当以凭据命名的环境变量被设为开关值(如 1)时,插件 MCP 的 headersHelper 脚本收到损坏的 CLAUDE_PLUGIN_ROOT 和服务器 URL 的问题
  • 修复了 SDK 的 register_repo_root 控制请求不加载工作目录之外目录的 CLAUDE.md 的问题(配合 CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD=1)
  • 修复了 Artifact 工具在 self 层级对 artifact 数据库访问规则显示 ? 的问题,以及当它拒绝某个会丢弃这些规则的重新发布时未将这些规则引述回来的问题
  • 修复了当模型不被此版本识别且 auto-compact 将假定 200K 上下文窗口时 /model <id> 不发出警告的问题
  • 修复了“按住空格键说话”提示在单次会话中用尽其三次显示机会的问题,以及当 push-to-talk 未绑定按键时显示空按键的问题
  • 修复了当搜索进程在超时被杀死但未退出时,Grep 和 Glob 永不返回的问题(在 Windows 上出现)
  • 修复了一个罕见情况:当该对话的一部分仍在保存时运行了 /clear 或 /resume,随后恢复对话时未能还原其计划
  • 修复了首次运行设置在窄终端中丢失安全说明和终端设置解释中部分字词的问题
  • 修复了 Enterprise 调查卡片在短暂停顿后接受键入的 1 或 0 的问题;现在键入的回答需要按 Enter
  • 自托管 runner:修复了一旦会话进程被替换,Claude 工作期间发送的消息会在一次 Stop 之后被回答的问题
  • 自托管 runner:修复了会话迁移到新机器时 MCP 服务器的开/关开关有时丢失的问题
  • Windows:修复了当 rc 文件设置了 errexit 和 pipefail 且仅定义了 winpty 别名或未定义任何别名时,Bash 工具在 Git Bash 中丢失别名和函数的问题
  • 改进了从 Claude Desktop 或网页端 Code 标签页发起的 /code-review:云端和 claude 远程控制会话现在显示发现结果卡片,而不是纯文本列表
  • 改进了大型仓库上的 /diff:每次刷新通常少运行一条全仓库范围的 git 命令,并且在 git 缓慢时会拉开刷新间隔
  • 改进了当 /ultrareview、云端会话或云端代理找不到 GitHub remote 时显示的消息:现在会提示在 https://github.com/new 创建仓库,且 /ultrareview 不再建议会被 gh 拒绝的 gh 命令
  • 改进了 SSL 证书错误,使其指出可能的原因(其中包括服务器遗漏了中间证书)以及每种原因对应的修复方法
  • 更改了 auto mode,使不含 "$defaults" 的 autoMode.allow 列表不再移除 scheduled-task 提示上的内置规则
  • 更改了 Team 和 Enterprise 登录的服务器管理设置:从 Anthropic 的 API 获取的设置现在无需批准提示即可应用,且无法通过验证的已存储副本会被拒绝
  • [VSCode] 新增了从聊天面板登录 Claude apps gateway 的功能,无需终端
  • [VSCode] 更改了 ultrathink,使其以 xhigh effort 运行其回合,并在聊天框中以彩虹色显示,与终端中一致
  • [VSCode] 修复了当模型设置带有 [1m] 标签(例如 opus[1m])时,Effort 滑块、Ultracode 开关和模型名称缺失的问题
  • [VSCode] 修复了在设置文件存在错误时,已保存的 /btw 侧问历史被过早删除的问题
  • [VSCode] 修复了当会话的计划以 "Yes, and manually approve edits" 获得批准后,重新加载或重启时该会话以 Auto mode 恢复的问题
  • [Cloud sessions] 为 cloud sessions 新增了表单卡片,因此你可以填写或拒绝 MCP 服务器请求的表单,而不是该请求在你未看到的情况下被取消
  • [Cloud sessions] 新增了 "Catching up…" 一行,当你切换回的 cloud 或 Remote Control 会话仍在更新其消息时显示
  • [Cloud sessions] 更改了 network secrets,使 Enterprise 成员可以在自己的 cloud environments 中添加和删除它们,而不仅仅是查看
  • [Cloud sessions] 改进了 cloud sessions 的 Changes 面板:关于列表未包含内容的说明现在显示为分支名旁的徽章,而不是 diff 上方的一行
  • [Cloud sessions] 修复了在 Claude 更改目录后,cloud session 的 Files 面板中的文件搜索将文件夹显示为 ../.. 路径的问题;结果现在显示其相对于项目根目录的路径
  • [Claude Tag] 修复了当 Claude 在某个 Slack 频道中创建的 canvas 也被分享到另一个频道或 DM 后,Claude 拒绝从该频道编辑或向其追加内容的问题
  • [Claude Tag] 修复了当两个组织都安装了 Claude 且 Slack 将回复投递给对方组织的应用时,Slack Connect 线程中未加标签的回复无人应答的问题
  • [Claude Tag] 修复了 cloud 计划任务的实时状态清单在 Slack 中停留在半完成状态的问题;现在一次运行可以编辑它在此次运行期间发布的顶层消息
  • [Claude Tag] 将 Slack 频道的 Respond automatically 开关更改为频道 Configure 页面和 Claude Tag 管理设置中的 "How Claude participates" 选项
  • [Code Review] 在 Code Review 分析页面新增了按严重程度分类的发现结果卡片,显示该期间的总发现数、按严重程度堆叠的每日图表,以及每种严重程度的计数
展开原文提取正文(采集端自动提取,可能有缺失)

Immutable release. Only release title and notes can be modified.

80c6959

What's changed

Added CLAUDE_CODE_DISABLE_ULTRATHINK, which turns the ultrathink keyword off Added pooled group budgets to the Claude apps gateway: one monthly budget that a group's members share, on top of each member's own limit, set with pooled_budget on the spend limits admin API Added CLAUDE_CODE_DISABLE_LOOPED_CROSS_CERT_DROP to keep system cross-certificates that certify each other in a loop, for servers whose private CA needs one Added CLAUDE_CODE_SUBAGENT_EFFORT to set the effort level subagents run at when nothing else names one, instead of inheriting the session's Added managed.policy_mode: layered to the Claude apps gateway: every policy that matches a developer applies, each merged over the ones listed below it, not only the first Added guardrail.input_tagging on Claude apps gateway Bedrock upstreams, which wraps prompts in the input tags that an Amazon Bedrock guardrail's prompt attacks filter needs; all_messages_and_system also tags the system prompt Deprecated fast mode for Opus 4.8 as of October 30, 2026; it will be removed on November 30, 2026. After removal, fast mode requests on Opus 4.8 return an error and do not fall back to standard Opus 4.8. Migrate to Opus 5.5 to keep the speedup Fixed shell commands being left running on macOS and Linux when Claude Code exits by itself, for example when credentials are refused or a cloud session is archived Fixed bash aliases with line breaks in their value (except in Git Bash), and functions whose names start with a dash, being garbled or lost in the Bash tool's shell Fixed bash scripts started from the Bash tool stopping after their first command when SHELLOPTS is exported Fixed PowerShell hooks not blocking on exit code 2 when the command begins with a type cast, param, using or an attribute Fixed some network requests hanging when a compressed response was cut off or corrupted Fixed sonnet, opus and haiku on Vertex AI and Amazon Bedrock showing an error mid-session instead of switching to an older model when the newest is not yet available to the account or region Fixed the Claude apps gateway not checking every model a request names against availableModels, deniedModels and models; a request that names a blocked model now gets a 400 naming the field Fixed claude auth login refusing to run where managed settings require a Claude apps gateway; in a terminal it now shows the gateway sign-in Fixed --restricted sessions uploading files from outside the working directories when a Read allow rule covered them Fixed prompts containing invisible characters needing a second Enter to send; plain prompts now send cleaned on the first Enter, and commands still wait for review Fixed sub-agents that inherited a parent sub-agent's model moving to the main model when a background job or message woke them Fixed a managed autoMode.allow list without "$defaults" getting the built-in exceptions back from a host app's --settings, a first rule added in /permissions, or /auto-mode-setup Fixed cloud sessions and cloud scheduled tasks not being marked as failed when auto mode stopped a turn because the server returned no safety verdict Fixed claude -p text output sometimes not saying why auto mode stopped a turn when a background agent was still running Fixed CLAUDE_CODE_AUTO_MODE_SERVER=1 being ignored in sessions started by a host application (such as Claude Desktop) behind a proxy or LLM gateway with experimental betas turned off Fixed plugin MCP headersHelper scripts receiving a corrupted CLAUDE_PLUGIN_ROOT and server URL when a credential-named environment variable was set to a switch value such as 1 Fixed the SDK register_repo_root control request not loading the CLAUDE.md of a directory outside the working directory (with CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD=1) Fixed the Artifact tool showing ? for artifact database access rules at the self level, and not quoting those rules back when it refuses a republish that would drop them Fixed /model <id> not warning when the model isn't recognized by this version and auto-compact will assume a 200K context window Fixed the "hold space to speak" hint using up its three showings in one session, and showing an empty key when push-to-talk is unbound Fixed Grep and Glob never returning when the search process is killed at the timeout but does not exit, seen on Windows Fixed a rare case where resuming a conversation did not restore its plan, when /clear or /resume had been run while part of that conversation was still being saved Fixed first-run setup dropping words from the security notes and the terminal-setup explanation in narrow terminals Fixed the Enterprise survey card taking a typed 1 or 0 after a short pause; a typed answer now needs Enter Self-hosted runner: Fixed a message sent while Claude was working being answered after a Stop, once the session's process had been replaced Self-hosted runner: Fixed an MCP server's on/off switch sometimes being lost when a session moved to a new machine Windows: Fixed the Bash tool losing your aliases and functions in Git Bash when the rc file sets errexit and pipefail and only winpty aliases, or none, are defined Improved /code-review started from the Code tab in Claude Desktop or on the web: cloud and claude remote-control sessions now show the findings card, not a plain-text list Improved /diff on large repositories: each refresh usually runs one fewer full-repository git command, and refreshes are spaced out when git is slow Improved the messages shown when /ultrareview, a cloud session or a cloud agent finds no GitHub remote: they now say to create a repository at https://github.com/new, and /ultrareview no longer suggests a gh command that gh rejects Improved SSL certificate errors to name the likely causes, among them a server that leaves out an intermediate certificate, and the fix for each Changed auto mode so that an autoMode.allow list without "$defaults" no longer removes the built-in rule on scheduled-task prompts Changed server-managed settings for Team and Enterprise logins: settings fetched from Anthropic's API now apply without an approval prompt, and a stored copy that doesn't verify is refused [VSCode] Added sign-in to a Claude apps gateway from the chat panel, with no terminal needed [VSCode] Changed ultrathink to run its turn at xhigh effort and show in a rainbow in the chat box, as in the terminal [VSCode] Fixed the missing Effort slider, Ultracode switch and model name when the model setting has the [1m] tag, such as opus[1m] [VSCode] Fixed saved /btw side-question history being deleted too early while a settings file has errors [VSCode] Fixed a conversation coming back in Auto mode after a reload or restart when its plan was approved with "Yes, and manually approve edits" [Cloud sessions] Added a form card to cloud sessions, so you can fill in or decline a form an MCP server asks for instead of the request being canceled without you seeing it [Cloud sessions] Added a "Catching up…" line that shows while a cloud or Remote Control session you switch back to is still bringing its messages up to date [Cloud sessions] Changed network secrets so Enterprise members can add and delete them on their own cloud environments, instead of only viewing them [Cloud sessions] Improved the Changes pane for cloud sessions: the note about what the list leaves out is now a badge beside the branch name, not a row above the diff [Cloud sessions] Fixed file search in a cloud session's Files pane showing folders as ../.. paths after Claude changed directory; results now show their path from the project's root [Claude Tag] Fixed Claude refusing to edit or append to a canvas it made in a Slack channel, from that channel, once the canvas was also shared to another channel or a DM [Claude Tag] Fixed untagged replies going unanswered in a Slack Connect thread when both organizations have installed Claude and Slack delivered the reply to the other organization's app [Claude Tag] Fixed a cloud scheduled task's live status checklist in Slack staying half-done; a run can now edit the top-level messages it posted during that run [Claude Tag] Changed a Slack channel's Respond automatically switch to a "How Claude participates" choice on the channel's Configure page and in Claude Tag admin settings [Code Review] Added a findings-by-severity card to the Code Review analytics page, showing the period's total findings, a daily chart stacked by severity, and each severity's count

原文入口

阅读原文(github.com)

原文将在新窗口打开。收录时间不是内容更新时间;正文、译文与解读的版权归原作者/来源所有,本站仅作个人阅读辅助并保留原文入口;页面时间均为北京时间。

作者/署名来自原文结构化字段(Atom/RSS/HTML meta/JSON-LD;GitHub release 显示的是发布者账号),未经模型补充。

了解来源批准与收录规则