跳到主内容
@wquguru
精选88Claude Code(GitHub Releases)AI 编程与模型

Claude Code v2.1.331:修复MCP挂起与崩溃,弃用插件默认自动更新

v2.1.331

原文
发到 X
推荐理由

本次更新包含两项关键破坏性/弃用变更:一是修复了导致 MCP 工具调用严重挂起的阻塞性 Bug,直接影响自动化工作流稳定性;二是明确了 2026 年底插件默认自动更新的策略转向,涉及管理配置变更。建议重度使用 MCP 或托管环境的开发者关注并测试升级。

What's changed

变更内容

  • Added Code Mode support in terminal sessions on Amazon Bedrock, Google Cloud's Agent Platform, Microsoft Foundry and Claude Platform on AWS
  • Added oidc.groups_jsonpath to the Claude apps gateway, to read groups from the matching entries of a list of objects with a small subset of JSONPath (RFC 9535)
  • Added an API connectivity section to claude doctor that reports whether the API can be reached, with the HTTP status or the error, or says why it wasn't tested
  • Added a notice when tap-mode voice dictation stops by itself, after 15 seconds without recognized speech or at its 2-minute limit
  • Added CLAUDE_CODE_DISABLE_RESPONSE_COMPRESSION to ask for uncompressed model responses behind a proxy that cuts compressed ones off; not advised yet for self-hosted runners or Remote Control
  • Added CLAUDE_GATEWAY_IDP_CONNECT_BY_HOSTNAME=1 for Claude apps gateways: with oidc.use_proxy: true, sign-in requests hand the proxy an https IdP's hostname even with NO_PROXY set
  • Added gen_ai.usage.*, gen_ai.response.model and gen_ai.operation.name to claude_code.llm_request trace spans; gen_ai.usage.input_tokens includes prompt cache tokens
  • Added optionalDependencies to plugin manifests: plugins that install with the plugin listing them and can be disabled or uninstalled on their own
  • Fixed MCP tool calls hanging for up to 30 minutes on some malformed replies from a local or WebSocket server
  • Fixed PushNotification telling a headless run, such as a scheduled one, that the terminal was active in its first minute, instead of saying whether a mobile push was requested
  • Fixed /install-github-app skipping the repository step after setup warnings when no repository was found, and Esc not going back from its workflow list and sign-in steps
  • Fixed one-line tool results cut with no ellipsis in narrow windows, Markdown stars in the Auto mode tab of /permissions, and a hook's reason to stop a forked skill showing twice
  • Fixed /diff hiding its key hints and not selecting files in windows of 24 to 26 rows, and leaving out files added with git add -N in a repository with no commits
  • Fixed the first-run theme list showing too few themes in short windows, and /usage and other tall screens coming out garbled there
  • Fixed /bug in fullscreen hiding its Yes and No answers behind a long report, and Yes staying out of view in very short windows
  • Fixed /compact and auto-compact sometimes losing part of the conversation summary when the summary quoted certain XML tags
  • Fixed Claude not being told when permission rules on the Agent tool dropped its queued message to a subagent that had already ended
  • Fixed a Remote Control message sometimes showing above the reply that was finishing when it was sent
  • Fixed Stop hooks that read the transcript missing the last reply in Claude Desktop; SubagentStop hooks now wait for it too
  • Fixed turns and subagents failing in cloud sessions, or timing out on long replies elsewhere, when a reply went silent while Claude was still thinking; Claude Code now tries the request once more
  • Fixed Esc and Stop waiting about a minute or more when the contents of a cloud or network file that Claude is reading stall
  • Fixed Code Mode sessions resumed with --resume or --continue in another permission mode losing thinking and the prompt cache; one begun in a mode that asks keeps that mode's limits on scripts
  • Fixed Code Mode sending a request about every second when a ! or slash command was typed while a script was running
  • Fixed an interrupted or failed plugin update leaving a partial plugin folder that later loaded with skills or other components missing (#102186)
  • Windows: Fixed file writes on FAT32 and exFAT drives asking for permission every time in some plugin sessions
  • Fixed Claude failing to read a notebook that has a null output or an error output with no traceback
  • Fixed a rewind deleting files after a restore had failed
  • Fixed auto mode sometimes refusing Claude's call to stop a /loop, which left the next wake-up to fire
  • Fixed a Workflow agent's background shells and MCP servers sometimes being left running after it handed back its report
  • Windows: Fixed /desktop downloading the older Claude Desktop installer, and asking for an update when an older install's folder was left behind
  • Fixed claude plugin install, marketplace add and similar commands hanging with no output when managed settings needed an approval that could not be asked for
  • Fixed a permission rule on a subagent's model, such as Agent(model:*), blocking Claude's follow-up message to a subagent started on this version with no model named
  • Fixed PermissionRequest hooks not saving Skill(name:*) allow rules outside local settings
  • Fixed "Ask your admin" asking to raise your own limit when your team's pooled group budget blocked you, and saying "Request sent" when an admin had approved your request in the last few minutes
  • Fixed Code Mode losing the middle of a long script output; Claude now gets a path to the uncut text (#111373)
  • Fixed hold-to-talk dictation stopping early and losing words when Claude Code was busy
  • Fixed Code Mode with --bare not telling Claude what its scripts can call
  • Fixed a crash when a custom API endpoint returned a tool call with no tool name; the call now fails with an error and the session continues
  • Windows: Fixed a possible crash when the machine is almost out of memory
  • Fixed the CLI freezing on some replies, and quoted text sometimes going missing or showing twice
  • Windows: Fixed Claude Code refusing to start when managed settings in the registry contain non-ASCII characters such as Japanese (#93280)
  • Windows: Fixed Remote Control clients showing no steps for a new subagent
  • Fixed @-mentions written as @file#10-12 attaching the whole file instead of those lines
  • Fixed Claude misreading a pasted artifact invitation link; it now asks you to accept the invitation and paste the artifact's own link
  • Fixed sandboxed Bash commands sometimes failing to start on a full temp disk, for sandboxes whose file rules keep commands out of the temp directory
  • Improved typing speed in screen reader mode, most of all in long sessions
  • Improved start-up time: a session started soon after another no longer waits for the model list, and one outside a git repository without .claude/settings.local.json no longer waits on git
  • Windows: Improved the speed of the first Bash command in a session on machines with no custom shell start-up files
  • Improved the plugin auto-update notice to name plugins it newly installs as dependencies, separately from updated plugins
  • Improved Code Mode tool search to show more of an MCP tool's description, with its limits, formats and defaults
  • Improved the Console sign-in link shown by /login and claude auth login --console: it is now much shorter
  • Improved Claude's list of your artifacts: it now marks web pages, so Claude is less likely to try opening one with the Claude Docs connector
  • Improved the folder trust prompts in short terminals: fullscreen /cd and /add-dir show their choices in fewer rows, and the prompt at launch keeps the folder path in view when it has many warnings
  • Changed the questions for stopping auto-connect in /ide and for /clear, /compact or /rewind in a subagent's view to list Yes first; they still start on No, so Down then Enter now answers No
  • Changed what a PermissionDenied hook's retry: true tells Claude: make the refused call again only if you asked for that call
  • Changed in a future release, on or after November 30, 2026: plugin marketplaces in managed extraKnownMarketplaces will auto-update by default. To opt one out, set "autoUpdate": false on its entry
  • Windows: Changed start-up with managed settings in the registry: check them before upgrading, as an HKLM policy outranks managed-settings.json and a broken value can stop the start
  • 在 Amazon Bedrock、Google Cloud 的 Agent Platform、Microsoft Foundry 以及 AWS 上的 Claude Platform 的终端会话中添加了 Code Mode 支持
  • 在 Claude 应用网关中添加了 oidc.groups_jsonpath,用于通过 JSONPath(RFC 9535)的小子集从对象列表的匹配条目中读取组信息
  • 在 claude doctor 中添加了 API 连通性部分,用于报告 API 是否可达,并显示 HTTP 状态码或错误信息,或者说明为何未进行测试
  • 当 tap-mode 语音听写因 15 秒内未识别到语音或达到 2 分钟上限而自动停止时,添加了通知提示
  • 添加了 CLAUDE_CODE_DISABLE_RESPONSE_COMPRESSION 环境变量,用于请求在被截断压缩响应的代理服务器后获取未压缩的模型响应;目前不建议在自托管运行器或远程控制中使用
  • 为 Claude 应用网关添加了 CLAUDE_GATEWAY_IDP_CONNECT_BY_HOSTNAME=1:当设置 oidc.use_proxy: true 时,即使设置了 NO_PROXY,登录请求也会将 HTTPS IdP 的主机名传递给代理
  • 在 claude_code.llm_request 跟踪跨度中添加了 gen_ai.usage.*、gen_ai.response.model 和 gen_ai.operation.name;其中 gen_ai.usage.input_tokens 包含提示缓存令牌
  • 在插件清单中添加了 optionalDependencies:允许通过列出该插件来安装,并可单独禁用或卸载的插件
  • 修复了由于本地服务器或 WebSocket 服务器的某些格式错误的回复,导致 MCP 工具调用挂起长达 30 分钟的问题
  • 修复了 PushNotification 向无头运行(如计划任务)报告其在第一分钟内终端处于活动状态,而不是告知是否请求了移动推送通知的问题
  • 修复了在未找到仓库且出现设置警告后,/install-github-app 跳过仓库步骤的问题,以及按 Esc 键无法从其工作流列表和登录步骤返回的问题
  • 修复了在窄窗口中单行工具结果被截断且无省略号显示的问题,/permissions 的 Auto 模式选项卡中的 Markdown 星号问题,以及分叉技能停止原因的钩子信息显示两次的问题
  • 修复了 /diff 在 24 至 26 行的窗口中隐藏其快捷键提示且不选择文件的问题,以及在无提交记录的仓库中遗漏使用 git add -N 添加的文件的问题
  • 修复了在短窗口中首次运行主题列表显示主题过少的问题,以及 /usage 和其他高屏幕在此处显示乱码的问题
  • 修复了全屏模式下 /bug 命令将其 Yes 和 No 答案隐藏在长报告之后,以及在极短窗口中 Yes 选项不可见的问题
  • 修复了 /compact 和自动紧凑模式在摘要引用特定 XML 标签时有时丢失部分对话摘要的问题
  • 修复了当 Agent 工具中的权限规则导致其将排队消息丢弃给已结束的子代理时,Claude 未收到通知的问题
  • 修复了远程控制消息有时会在正在发送的回复完成前显示在回复上方的问题
  • 修复了读取对话记录的停止钩子(Stop hooks)在 Claude Desktop 中遗漏最后一条回复的问题;SubagentStop 钩子现在也会等待该回复
  • 修复了在云端会话中回合和子代理失败,或在其他地方因回复长时间无响应而超时的问,原因是 Claude 仍在思考时回复陷入沉默;Claude Code 现在会重试一次请求
  • 修复了按 Esc 或 Stop 后需等待约一分钟或更久才能生效的问题,原因是 Claude 正在读取的云文件或网络文件内容卡住
  • 修复了使用 --resume 或 --continue 在其他权限模式下恢复 Code Mode 会话时丢失思考过程和提示词缓存的问题;在询问模式下开始的会话会保留该模式的脚本限制
  • 修复了运行脚本期间输入 ! 或斜杠命令时,Code Mode 每秒发送一次请求的问题
  • 修复了中断或失败的插件更新留下部分插件文件夹,导致后续加载时缺失技能或其他组件的问题 (#102186)
  • Windows:修复了在 FAT32 和 exFAT 驱动器的某些插件会话中,每次写入文件都要求权限的问题
  • 修复了 Claude 无法读取包含空输出或无回溯信息的错误输出的笔记本的问题
  • 修复了还原失败后撤销操作删除文件的问题
  • 修复了自动模式有时拒绝 Claude 调用以停止 /loop 的问题,这导致下一次唤醒触发
  • 修复了工作流代理在交回报告后,其后台 shell 和 MCP 服务器有时仍处于运行状态的问题
  • Windows:修复了 /desktop 下载旧版 Claude Desktop 安装程序,以及在旧版安装的文件夹遗留时提示更新的问题
  • 修复了 claude plugin install、marketplace add 及类似命令在需要审批但无法发起审批请求的管理设置下挂起且无输出的问题
  • 修复了子代理模型上的权限规则(如 Agent(model:*))阻止 Claude 向在此版本上启动且未指定模型的子代理发送后续消息的问题
  • 修复了 PermissionRequest 钩子未在本地设置之外保存 Skill(name:*) 允许规则的问题
  • 修复了当团队共享组预算阻止你时,“Ask your admin”提示提升你自己的限额,以及在管理员最近几分钟内批准你的请求时显示“Request sent”的问题
  • 修复了 Code Mode 丢失长脚本输出中间部分的问题;Claude 现在可获得未截断文本的路径 (#111373)
  • 修复了在 Claude Code 忙碌时,按住说话式听写过早停止并丢失部分字词的问题
  • 修复了使用 --bare 参数开启代码模式时,未告知 Claude 其脚本可调用内容的问题
  • 修复了当自定义 API 端点返回一个没有工具名称的工具调用时发生的崩溃;现在该调用会报错失败,且会话继续运行
  • Windows:修复了在内存几乎耗尽时可能发生的崩溃问题
  • 修复了 CLI 在某些回复中卡死,以及引用文本有时丢失或重复显示的问题
  • Windows:修复了当注册表中的托管设置包含非 ASCII 字符(如日文)时,Claude Code 拒绝启动的问题 (#93280)
  • Windows:修复了远程控制客户端在新子代理中不显示步骤的问题
  • 修复了以 @file#10-12 格式编写的 @提及功能,之前会附加整个文件而非仅那几行
  • 修复了 Claude 误读粘贴的工件邀请链接的问题;现在它会要求你接受邀请并粘贴工件自身的链接
  • 修复了当临时磁盘已满时,某些沙盒 Bash 命令无法启动的问题,这适用于那些通过文件规则将命令排除在临时目录之外的沙盒
  • 改进了屏幕阅读器模式下的打字速度,特别是在长会话中效果显著
  • 改进了启动时间:紧随另一个会话之后启动的新会话不再等待模型列表加载,且在 git 仓库外、没有 .claude/settings.local.json 文件的会话不再等待 git
  • Windows:改进了在没有自定义 shell 启动文件的机器上,会话中第一个 Bash 命令的执行速度
  • 改进了插件自动更新通知,将其新安装为依赖项的插件与已更新的插件分开列出
  • 改进了代码模式下的工具搜索,展示更多 MCP 工具的描述信息,包括其限制、格式和默认值
  • 改进了 /login 和 claude auth login --console 显示的 Console 登录链接:现在该链接大幅缩短
  • 改进了 Claude 对你工件的列表展示:现在它会对网页进行标记,从而降低 Claude 尝试使用 Claude Docs 连接器打开网页的可能性
  • 改进了短终端中的文件夹信任提示:全屏模式的 /cd 和 /add-dir 以更少的行数展示选项,且在启动时的提示会在存在大量警告时将文件夹路径保持在可视范围内
  • 更改了 /ide 中用于停止自动连接以及子代理视图中 /clear、/compact 或 /rewind 的提问方式,将“是”列在前面;它们仍默认从“否”开始,因此现在按向下键再按回车键即回答“否”
  • 更改了 PermissionDenied 钩子的 retry: true 对 Claude 的指示含义:仅在你明确要求该调用时,才重新执行被拒绝的调用
  • 未来版本(2026年11月30日或之后发布)中的变更:托管 extraKnownMarketplaces 中的插件市场将默认自动更新。如需禁用某市场的自动更新,请将其条目设置为 "autoUpdate": false
  • Windows:使用注册表中的托管设置更改启动行为:升级前请检查这些设置,因为 HKLM 策略的优先级高于 managed-settings.json,且损坏的值可能导致无法启动

更进一步:量化金融体系

看懂新闻只是起点——沿量化金融路径,把它变成能交付的工程能力

进入量化体系 →

相似阅读

关联信息,但可能不是同一事件