外部精选
Claude Code · v2.1.312
本文来自外部来源,不是黄奕彬的原创文章。本站提供原文入口,并在采集端生成 AI 结构化摘要、解读与中文翻译(如有),一切以原文为准。
阅读原文(github.com)结构化摘要 AI 生成
背景与问题
这是 Claude Code v2.1.312 的官方发布说明,来源为 GitHub releases,发布于北京时间 2026-10-28 04:24(源日期 2026年10月28日 04:24(北京时间))。
它面向 Claude Code 的现有用户与企业管理员,回答『这一版本改了什么、修了什么』,覆盖 CLI 核心、VS Code 扩展、云端会话、Remote Control、Claude Tag(Slack)与 Code Review(GitHub)等形态。
发布页标注该 release 为不可变(Immutable),此后 main 分支已有 5 个提交。
方法或内容
发布说明以变更清单形式列出本版本内容,分为新增、修复、改进与变更,并按产品形态附加 [VSCode]、[Cloud sessions]、[Remote Control]、[Claude Tag]、[Code Review] 分组。主要类别:
- 网关鉴权新增配置项
- 全屏排队消息『点击即发送』
- 多项文件、会话、命令加载与工具(Write、Read、PDF)修复
- vim 模式与
/model、/effort、/verify等命令的界面修复 - 系统提示词、hooks 并发、OpenTelemetry 遥测等行为变更
关键发现 / 结果
- 新增:Claude apps 网关支持
oidc.user_id_claim,可用sub以外的id_tokenclaim(如 Microsoft Entra ID 的oid)识别用户 - 新增:全屏下点击排队消息下方的『to send now』提示可立即发送
- 修复:VS Code 扩展登录后托管设置与组织策略本会话未再拉取;Claude 只读开头就覆盖超大
CLAUDE.md/rules/@包含文件,Write 现要求读完或原地编辑 - 修复:
cd进 git 仓库更深层后找不到 per-directory 与paths:skills;无效命令名致所有命令不加载、claude -p无输出;PDF 页 Read 报错与旧会话文件清理同时出现等 - 变更:Bedrock/Vertex/Foundry/Mantle 对未识别模型名改用较短系统提示词(
CLAUDE_CODE_SIMPLE_SYSTEM_PROMPT=0保留完整版);标记消息后的自动换模型覆盖未识别模型名(CLAUDE_CODE_DISABLE_REFUSAL_FALLBACK=1关闭) - 变更:hooks 每会话最多并行 24(含子代理)+12 超时等待;停发
claude_code.safety_event,mcp_server.name上报真实名称;5 小时窗口改称『5-hour limit』 - 其余:VS Code、云端会话、Remote Control、Claude Tag、Code Review 的多项修复与改进
结论与意义
本版本为增量修复与行为调优版本,原文未给出总体性结论或评价。意义在于提升稳定性,并为企业管理员提供新的身份映射选项与两个环境变量开关以保留旧行为。适用边界:各项变更仅针对 v2.1.312 所列形态与场景;性能数据、影响范围量化原文未说明。
AI 解读 AI 生成
方法:按「时空变量」分析(时间 / 空间 / 变量,严格区分包含、相关与因果),对象包括原文作者、署名人员与关键技术及其实际原理;结论用「元反空」(元思考、反思考、空思考、综合)整理。
时间:何时发生,现在是否仍成立
发布时间:源日期 2026年10月28日 04:24(北京时间),即北京时间 2026-10-28 04:24:20。该 release 标注 Immutable(不可变),仅标题与说明可修改;发布页显示此后 main 分支已有 5 个提交,意味着可能已存在后续版本,本清单内容是否仍对应最新代码不确定。
空间:谁的环境 / 场景
适用对象:Claude Code 产品的使用者与管理者,具体形态包括:
- CLI(终端、
claude -p、vim 模式) - VS Code 扩展(组织设置、用量提示、退出码提示)
- 云端会话(routines、cloud environment、Bash 脚本编辑器)
- Remote Control、Claude Tag(Slack 频道)、Code Review(GitHub PR)
- 企业网关与 Bedrock/Vertex/Foundry/Mantle 部署、OpenTelemetry 遥测、MCP 服务器
版本边界:v2.1.312。
变量:实际改变了什么
- 鉴权:网关新增
oidc.user_id_claim(此前按sub识别) - 行为:Write 不再覆盖超大文件;未识别模型名改用较短系统提示词;hooks 并发上限为每会话 24+12;子代理
autoCompactWindow可下调CLAUDE_CODE_AUTO_COMPACT_WINDOW设定的窗口(不会上调) - 遥测:停发
claude_code.safety_event;mcp_server.name对官方 marketplace 固定 URL 远程 MCP 服务器上报真实名称而非 custom - 文案与 UI:『session limit』改称『5-hour limit』;VS Code 用量重置显示具体钟点;云端会话新增 routine 模型选择器的 effort 档位与带高亮行号的 Bash 编辑器
- 其余为交互与多形态缺陷修复;价格、性能类数据原文未说明
区分:包含 ≠ 相关 ≠ 因果
- 明确因果(修复性陈述):『Fixed X』条目直接指明缺陷与结果,如无效命令名导致所有命令不加载、
claude -p无输出 - 相关/同时发生:Read 工具在 PDF 页报错『when the clean-up of old session files ran at the same time』,原文仅描述二者同时发生,未严格证明清理导致报错
- 条件触发关系:被标记消息(flagged message)之后的自动模型切换按设计触发,原文用『after』表述时序,具体判定机制原文未说明
- 包含关系:hooks 上限『per session, sub-agents included』指子代理计入同一会话配额,属包含而非因果
对象:作者/署名与关键技术原理
署名作者(仅来自结构化作者字段):ashwin-ant。涉及的关键技术与原文描述的原理:
- Claude Code:编码工具,含 CLI、VS Code 扩展、云端会话等形态
- OIDC:Claude apps 网关通过
id_token的 claim 识别用户,默认sub,现可配置为其他 claim 如 Microsoft Entra ID 的oid - Write/Read 工具、
CLAUDE.md与 rules 文件、@包含机制、per-directory/paths:skills 的发现 - hooks:prompt 与 agent hooks 的并发与超时调度(24/12 上限,<1 秒按 1 秒计)
- OpenTelemetry:
mcp_server.name字段与claude_code.safety_event事件
这些技术更底层的实现原理原文未说明。
元反空综合结论
元:这条内容本质是一份面向用户与运维的版本变更通告,解决『升级到 v2.1.312 会遇到什么差异、如何保留旧行为』的信息问题,并给出两个开关(CLAUDE_CODE_SIMPLE_SYSTEM_PROMPT=0、CLAUDE_CODE_DISABLE_REFUSAL_FALLBACK=1)作为行为边界控制。
反:最可能失效或受限的主张——hook 并发数值、系统提示词长短选择逻辑、遥测字段均为实现细节,后续版本可随时变更;页面显示此后已有 5 个提交,内容可能被更新版本取代;『5-hour limit』是措辞调整,不改变限制本身。
空:去掉发布叙事后剩下的必要事实是:版本号 v2.1.312、发布时间、不可变 release、一份按形态分组的代码级变更清单;其中网关鉴权配置与遥测变更对企业部署影响最直接。
综合:这是一个以缺陷修复为主的增量版本,可信度来自官方 release 页,但所有细节仅在该版本快照内成立;无性能数据、无价格变动,量化影响原文未说明。
中文译文 AI 生成
· 5 个提交至 main自本次发布以来不可变发布。仅发布标题和说明可被修改。0e1f478更新内容
- 为 Claude apps gateway 添加了
oidc.user_id_claim,用于通过sub以外的id_tokenclaim 识别用户,例如 Microsoft Entra ID 的oid - 添加了点击发送:在全屏模式下,点击排队消息下方的“立即发送”提示即可立即发送该消息,与按对应按键的效果相同
- 修复了从 VS Code 扩展登录后,会话剩余时间内不再获取 managed settings 和组织策略的问题
- 修复了 Claude 在只看到文件开头部分后,覆盖非常大的
CLAUDE.md、规则文件或子目录中被@包含的文件的问题;Write 现在会要求 Claude 完整读取该文件或就地编辑 - 修复了在 Bash 中
cd进入 git 仓库更深层目录后,找不到 per-directory 和paths:skills 的问题 - 修复了一个罕见问题:在终端中恢复会话后的第一条回复,可能在下次恢复该会话时缺失
- 修复了名称无效的命令导致所有命令无法加载的问题,这可能使
claude -p没有任何输出 - 修复了在清理旧会话文件同时运行时,Read 工具在 PDF 页面上有时会以 "pdftoppm failed: Could not write image" 失败的问题
- 修复了 spinner、OpenTelemetry effort 值和 transcripts 在任务期间、模型尚未应用新选择的 effort 级别时就显示该级别的问题;它们现在显示当前生效的级别
- 修复了
/model和/effort的缓存警告称重新读取会等待你的下一条消息的问题;在 Claude 工作期间做出的更改可能更早触发它 - 修复了最后一条消息只是在句中提到有项目在等你时,某些会话仍显示为等待你的问题
- 修复了 agent view 在退出前刚用 Ctrl+C 清空输入文本后,下次启动时又恢复该文本的问题
- 修复了从空的
!输入按 Ctrl+D 退出后,agent view 以 shell 模式重新打开的问题 - 修复了 vim 模式下
d、c和y搭配大于剩余行数的gj或gk计数时会删除或复制文本的问题;与 Vim 一致,它们现在只移动光标 - 修复了
/verify在/help和/命令菜单中显示面向 Claude 的长描述而非简短描述的问题 - 改进了提示中的 effort 指示器:任务中途做出的更改现在会说明可能等待你的下一条消息,且该说明在不再适用时会清除
- 改进了 cloud sessions 中的 WebFetch 错误:无法解析的主机现在会被解释为可能位于允许的网络域名之外,因此 Claude 会指出需要允许的主机
- 更改了 Bedrock、Vertex、Foundry 和 Mantle:对 Claude Code 无法识别的模型名称(如自定义部署名称和 inference profile ARN)使用较短的系统提示,即使它们前端是 Sonnet 或 Haiku;设置
CLAUDE_CODE_SIMPLE_SYSTEM_PROMPT=0可保留完整提示 - 更改了被标记消息后的自动模型切换,使其也覆盖 Claude Code 无法识别的模型名称,如自定义部署名称;设置
CLAUDE_CODE_DISABLE_REFUSAL_FALLBACK=1可关闭该行为 - 更改了用量限制消息,将 5 小时窗口称为"5-hour limit"而非"session limit"
- 更改了从 CLI 启动的 cloud sessions,其名称和分支名称现在从服务器获取
- 更改了 prompt 和 agent hooks:每个会话(包括 sub-agents)一次最多运行 24 个,另加最多 12 个已等待超过其事件超时的 hooks;低于 1 秒的超时现在按 1 秒计
- 更改了 subagent 的
autoCompactWindow,使其可以调低由CLAUDE_CODE_AUTO_COMPACT_WINDOW设置的窗口(此前无效果);它仍然绝不会调高该窗口 - 更改了 OpenTelemetry 的
mcp_server.name:对于由来自官方 Anthropic marketplace 的插件声明的固定 URL 远程 MCP 服务器,现在报告其真实名称而非 custom - 更改了 Claude Code,使其不再发送
claude_code.safety_eventOpenTelemetry 事件 - [VSCode] 修复了启动时无法加载组织设置或组织设置被拒绝导致会话仅以退出码结束的问题;标签页现在会说明原因并提供 Retry 或 Sign in again 选项
- [VSCode] 更改了用量限制重置提示,显示具体时间("Resets at 3:10 PM")并使用"5-hour limit"的说法
- [Cloud sessions] 在创建或编辑在云端运行的 routine 时,为模型选择器添加了 effort 级别
- [Cloud sessions] 为云端环境设置中 setup 脚本框添加了带颜色、行号和 Copy 按钮的 Bash 编辑器
- [Cloud sessions] 改进了 Claude 向 cloud session 添加仓库时显示的步骤:打开后现在显示所发生事情的简短表格,而非原始 JSON
- [Cloud sessions] 修复了在 cloud session 中发送失败后重发未更改的消息有时会执行两次的问题
- [Cloud sessions] 修复了云端环境创建失败时,错误仅以 toast 形式显示在已打开对话框之外的问题;错误现在会显示在对话框内
- [Cloud sessions] 修复了 Routines 页面上 routine 菜单中的 Edit 只跳转到该 routine 页面而不打开其编辑对话框的问题
- [Remote Control] 修复了未归档的 Remote Control 会话在计算机重新连接之前显示为工作中的问题;它现在显示为空闲
- [Claude Tag] 改进了 Claude Tag 在 Slack 中的重试通知,会指出正在使用的模型或说明触及了 rate limits,而非笼统的 API 错误
- [Claude Tag] 修复了较旧的私有 Slack 频道转为公开并获得新 ID 后,Claude Tag 频道的开/关开关和 agent 设置回退到 workspace 默认值的问题
- [Claude Tag] 修复了 Claude 在 Slack 中不回复环境网络访问设置为 None 的频道的问题
- [Claude Tag] 修复了 Claude 在 Slack 中回答同一频道另一个 thread 中的问题时,有时将文件发布到错误 thread 的问题
- [Code Review] 修复了 GitHub 延迟送达 push 事件时,Code Review 审查过时 commit 或完全不审查的问题;它现在审查 pull request 的当前 commit
展开原文提取正文(采集端自动提取,可能有缺失)
·
5 commits
to main since this release
Immutable release. Only release title and notes can be modified.
0e1f478
What's changed
Added oidc.user_id_claim to the Claude apps gateway, to identify people by an id_token claim other than sub, such as Microsoft Entra ID's oid Added click to send: in fullscreen, clicking the "to send now" hint under a queued message sends it right away, as its key does Fixed managed settings and organization policy not being fetched for the rest of the session after signing in from the VS Code extension Fixed Claude overwriting a very large CLAUDE.md, rules file or @-included file in a subdirectory after seeing only its start; Write now asks Claude to read it all or edit in place Fixed per-directory and paths: skills not being found after a Bash cd deeper into a git repository Fixed a rare case where the first reply after resuming a session in the terminal could be missing the next time the session was resumed Fixed a command with an invalid name stopping all commands from loading, which could leave claude -p with no output Fixed the Read tool sometimes failing on PDF pages with "pdftoppm failed: Could not write image" when the clean-up of old session files ran at the same time Fixed the spinner, OpenTelemetry effort values and transcripts naming a newly picked effort level during a task before the model applied it; they now show the level in force Fixed the /model and /effort cache warning saying the re-read waits for your next message; a change made while Claude is working can trigger it sooner Fixed some sessions showing as waiting on you when the last message only mentioned items waiting on you mid-sentence Fixed agent view restoring input text on the next launch after it was cleared with Ctrl+C just before exiting Fixed agent view reopening in shell mode after exiting with Ctrl+D from an empty ! input Fixed vim mode d, c and y with a gj or gk count larger than the lines left deleting or copying text; like Vim, they now only move the cursor Fixed /verify showing a long description meant for Claude in /help and the / command menu instead of a short one Improved the prompt's effort indicator: a change made mid-task now says it may wait for your next message, and the note clears when it no longer applies Improved WebFetch errors in cloud sessions: a host that does not resolve is now explained as possibly outside the allowed network domains, so Claude names the host to allow Changed Bedrock, Vertex, Foundry and Mantle to use the shorter system prompt for model names Claude Code doesn't recognize, such as custom deployment names and inference profile ARNs, even when they front Sonnet or Haiku; set CLAUDE_CODE_SIMPLE_SYSTEM_PROMPT=0 to keep the full prompt Changed automatic model switches after a flagged message to also cover model names Claude Code doesn't recognize, such as custom deployment names; set CLAUDE_CODE_DISABLE_REFUSAL_FALLBACK=1 to turn them off Changed usage limit messages to call the 5-hour window the "5-hour limit" instead of the "session limit" Changed cloud sessions started from the CLI to get their names and branch names from the server Changed prompt and agent hooks to run at most 24 at a time per session, sub-agents included, plus at most 12 that have waited longer than their event's timeout; a timeout under 1 second now counts as 1 second Changed a subagent's autoCompactWindow to lower the window set by CLAUDE_CODE_AUTO_COMPACT_WINDOW, where it had no effect before; it still never raises that window Changed OpenTelemetry mcp_server.name to report the real name of fixed-URL remote MCP servers declared by plugins from the official Anthropic marketplace, instead of custom Changed Claude Code to stop sending the claude_code.safety_event OpenTelemetry event [VSCode] Fixed sessions ending on a bare exit code when your organization's settings couldn't be loaded or were refused at startup; the tab now says why and offers Retry or Sign in again [VSCode] Changed usage limit resets to show a clock time ("Resets at 3:10 PM") and to say "5-hour limit" [Cloud sessions] Added an effort level to the model picker when you create or edit a routine that runs in the cloud [Cloud sessions] Added a Bash editor with colors, line numbers and a Copy button to the setup script box in cloud environment settings [Cloud sessions] Improved the step shown when Claude adds a repository to a cloud session: opening it now shows a short table of what happened instead of raw JSON [Cloud sessions] Fixed resending an unchanged message after a failed send in a cloud session sometimes running it twice [Cloud sessions] Fixed a failed cloud environment creation showing its error only as a toast outside the open dialog; it now appears inside the dialog [Cloud sessions] Fixed Edit in a routine's menu on the Routines page going to the routine's page without opening its edit dialog [Remote Control] Fixed an unarchived Remote Control session showing as working until a computer reconnected; it now shows as idle [Claude Tag] Improved Claude Tag's retry notice in Slack to name the model in use, or say rate limits were hit, instead of a generic API error [Claude Tag] Fixed a Claude Tag channel's on/off switch and agent settings falling back to workspace defaults when an older private Slack channel goes public and gets a new ID [Claude Tag] Fixed Claude in Slack not replying in channels whose environment has network access set to None [Claude Tag] Fixed Claude in Slack sometimes posting a file in the wrong thread when it was answering in another thread of the same channel [Code Review] Fixed Code Review reviewing an outdated commit, or none at all, when GitHub delivered a push event late; it now reviews the pull request's current commit
原文入口
阅读原文(github.com)原文将在新窗口打开。收录时间不是内容更新时间;正文、译文与解读的版权归原作者/来源所有,本站仅作个人阅读辅助并保留原文入口;页面时间均为北京时间。
了解来源批准与收录规则