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

Claude Code v2.1.302:子代理默认后台运行、MCP协议修复与多项Bug修复

v2.1.302

原文
发到 X
推荐理由

本次更新改变了子代理的默认执行策略(后台/前台),并修复了 MCP 协议兼容性这一关键接口问题。使用 Claude Code 进行复杂任务编排或集成 MCP 工具的开发者必须关注此版本的行为变更。

What's changed

变更内容

  • Added CLAUDE_CODE_AUTO_MODE_MODEL to choose the model the client-side auto mode classifier uses; it does not change the model for server-side auto mode
  • Added an Idle compaction row to /config for turning idle compaction off or back on; the notices shown after an idle compaction now say how to turn it off
  • Added a notice to /design-sync and /design-login that standalone Claude Design (claude.ai/design) closes by December 14, 2026
  • Fixed a "Prompt is too long" error when stopping a turn while the conversation was being compacted
  • Fixed requests failing with "diagnostics: Extra inputs are not permitted" after switching to Vertex or Bedrock mid-session
  • Fixed the Read tool loading an image file of any size, or a pipe or device named like an image, entirely into memory; image sources over 128 MB are now refused
  • Fixed /autocompact and /effort saving to the wrong model when a gateway names Opus 4 or 4.1 with a prefix, such as anthropic/claude-opus-4-1
  • Fixed a prompt cache miss when a tool added mid-session was loaded again through ToolSearch or after compaction
  • Fixed claude plugin and other subcommands sometimes exiting before a queued settings or config write finished, which could lose the change or leave a .tmp file behind
  • Fixed plugin marketplaces re-cloning on every refresh, and newly installed git plugins showing version "unknown", when git defaults to the reftable ref format
  • Fixed the PowerShell tool not finding commands in a plugin's bin/ folder, and reporting an error when a search that finds nothing (rg, grep, findstr, git grep) is piped into Select-Object or another formatting cmdlet
  • Fixed Claude in the desktop app pointing you to claude.ai settings or /mcp to authorize or reconnect an MCP server where that option isn't available
  • Fixed artifact publishes sometimes failing when Claude sent an empty list of edits, and Claude retrying an artifact update the wrong way after a newer version of the artifact turned it away
  • Fixed classifier_category missing from OpenTelemetry tool_decision events for most auto mode classifier blocks, and new tool_decision attributes pushing out tool_use_id, tool_source and tool_parameters when OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT is low
  • Fixed rows in the agents view staying blank after moving down a long list or folding a section
  • Fixed claude remote-control --help not printing its usage and exiting when not signed in
  • Fixed /design consent and /design revoke suggesting /design-login when they fail in a cloud session, where it isn't available; the message now points to claude.ai/design/settings
  • Fixed MCP servers showing no tools, or every tool call failing, when the server negotiates protocol version 2026-07-28 but omits resultType, ttlMs or cacheScope
  • Fixed prompt suggestions spending usage credits on models your plan pays for only with credits: they are now skipped after a reply billed to credits
  • Fixed URLs written in backticks being clickable only on their first row when they wrap; the whole URL is now one link in terminals that support hyperlinks
  • Fixed claude plugin details <name>@builtin suggesting claude plugin list, which never shows built-in plugins, when the plugin isn't found; it now points to /plugin
  • Fixed an emoji that a link starts inside wrapping one column too wide, which hid it in question previews and turned tables into lists
  • Fixed worktree isolation refusing to create or resume worktrees under git 2.56 or later when a stray .git file points at a directory that doesn't exist
  • Fixed a cloud session's cost and usage restarting from zero after the session resumed in a new process
  • Self-hosted runner: Fixed git fetches failing with "bad object refs/heads" in sessions that reuse a checkout stored in git's reftable format
  • Windows: Fixed every file write being refused or asked about for projects on exFAT or FAT32 drives, including in sessions started with --plugin-dir
  • Improved startup time with many plugins enabled: plugin command and agent files now take far fewer file system calls to load, most of all on Windows
  • Improved auto mode with the server-side classifier: a conversation too long for the safety check is now compacted, instead of every checked tool call being denied
  • Improved the message when a background session reopened from another folder has no LLM gateway: it now says why, instead of "Not logged in"
  • Changed claude -p and Agent SDK sessions with no permission mode to start in default mode on third-party providers, with telemetry off or on a fresh install; --permission-mode auto keeps auto
  • Changed fork subagents (subagent_type: "fork") to be on by default in claude -p, the Agent SDK, the desktop app and VS Code, as they already are in the terminal; CLAUDE_CODE_FORK_SUBAGENT=0 turns them off, and claude mcp serve never offers them
  • Changed the desktop app and VS Code to always run the main conversation's subagents in the background, as the terminal does, rather than let Claude choose; a subagent's own Agent calls in claude -p, the Agent SDK, the desktop app and VS Code now run in the foreground by default
  • Changed the ← for agents footer hint to hide 10 seconds after a session opens; the count of agents waiting on you still shows
  • Changed where the Claude in Chrome instructions sit in the system prompt so that new conversations can read them from the shared prompt cache
  • Changed prompt and agent hooks so that at most 12 of one event run at a time; the rest wait their turn
  • Changed the message shown when your organization's policy turns off /feedback: it now points to GitHub issues instead of an organization admin
  • [VSCode] Fixed text after an unclosed code block in a list showing as plain text while a reply streams, then turning into code
  • [VSCode] Fixed MCP server sign-in from the panel opening a broken authorization page when the server URL contains a query string
  • [VSCode] Fixed the @browser banner saying "Browser connected" when no browser with the Claude extension can be reached
  • [Cloud sessions] Added a banner on a routine's page that says why its last run didn't start, such as your organization reaching its limit on concurrent cloud sessions
  • [Cloud sessions] Fixed "Rewind to here" failing on every message except the newest in cloud sessions; self-hosted runners need Claude Code v2.1.246 or later
  • [Cloud sessions] Fixed the pull request status bar in cloud sessions flipping a pull request with merge conflicts back to ready while GitHub rechecked it
  • [Cloud sessions] Fixed routine runs showing as Completed after their cloud session stopped unexpectedly, and as Cancelled when archived before they started, instead of failed
  • [Cloud sessions] Fixed the diff view in cloud sessions missing changes or failing to load after the session's GitHub repository was renamed or moved
  • [Cloud sessions] Fixed a scheduled routine run that failed partway being run again from the start an hour or more later, which could repeat work such as posting the same report twice
  • [Cloud sessions] Fixed an open cloud session sometimes not showing messages sent from another device until you reloaded the page or clicked away and back
  • [Cloud sessions] Improved the error shown when a cloud session fails to start: it now says "Connection lost" or "Server error" instead of "Something went wrong"
  • [Remote Control] Fixed a subagent's pane spinning forever in a Remote Control session after your computer goes offline; it now says Remote Control is disconnected
  • [Claude Tag] Fixed "is thinking…" staying up under a mention in a Slack channel or DM after Claude answered it by editing one of its earlier messages
  • [Claude Tag] Fixed URLs in code blocks under a numbered or bulleted step of Claude's Slack replies being wrapped in angle brackets, which broke copied commands
  • 新增 CLAUDE_CODE_AUTO_MODE_MODEL,用于选择客户端自动模式分类器使用的模型;这不会更改服务器端自动模式的模型
  • 在 /config 中新增 Idle compaction(空闲压缩)行,用于关闭或重新开启空闲压缩功能;空闲压缩后显示的提示现在会说明如何关闭它
  • 在 /design-sync 和 /design-login 中新增通知,告知独立版 Claude Design(claude.ai/design)将于 2026 年 12 月 14 日关闭
  • 修复了在对话被压缩期间停止一轮操作时出现的“Prompt is too long”(提示词过长)错误
  • 修复了在会话中途切换到 Vertex 或 Bedrock 后,请求因 “diagnostics: Extra inputs are not permitted”(诊断:不允许额外输入)而失败的问题
  • 修复了 Read 工具将任意大小的图像文件、或名称类似图像的管道/设备完全加载到内存中的问题;现在拒绝加载超过 128 MB 的图像源
  • 修复了当网关使用带前缀的名称(如 anthropic/claude-opus-4-1)命名 Opus 4 或 4.1 时,/autocompact 和 /effort 保存到错误模型的问题
  • 修复了在会话中途添加的工具通过 ToolSearch 或压缩后再次加载时发生的提示词缓存未命中问题
  • 修复了 claude 插件及其他子命令有时在排队的设置或配置写入完成前就退出的问题,这可能导致更改丢失或遗留 .tmp 文件
  • 修复了当 git 默认使用 reftable 引用格式时,插件市场每次刷新都重新克隆,以及新安装的 git 插件显示版本为 “unknown”(未知)的问题
  • 修复了 PowerShell 工具未在插件的 bin/ 文件夹中查找命令,以及在搜索结果为空(rg、grep、findstr、git grep)的结果管道传输至 Select-Object 或其他格式化 cmdlet 时报错的问题
  • 修复了桌面应用中的 Claude 在您前往 claude.ai 设置或 /mcp 授权或重新连接 MCP 服务器但该选项不可用时,仍指向这些位置的问题
  • 修复了当 Claude 发送空的编辑列表时,工件发布有时会失败,以及在工件的新版本拒绝更新后,Claude 以错误方式重试工件更新的问题
  • 修复了大多数自动模式分类器块的 OpenTelemetry tool_decision 事件中缺少 classifier_category,以及在 OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT 较低时,新的 tool_decision 属性导致 tool_use_id、tool_source 和 tool_parameters 被挤出的问题
  • 修复了在向下滚动长列表或折叠某个部分后,代理视图中的行保持空白的问题
  • 修复了 claude remote-control --help 在未登录时不打印用法说明并退出的问题
  • 修复了 /design consent 和 /design revoke 在云会话中不可用时失败,却建议执行 /design-login 的问题;现在该消息会指向 claude.ai/design/settings
  • 修复了当服务器协商协议版本为 2026-07-28 但省略了 resultType、ttlMs 或 cacheScope 时,MCP 服务器显示没有工具或每次工具调用都失败的问题
  • 修复了提示建议在使用仅通过积分付费的模型时消耗使用积分的问题;现在在回复已计入积分费用后,这些建议将被跳过
  • 修复了反引号中的 URL 在换行时仅在首行可点击的问题;现在在支持超链接的终端中,整个 URL 作为一个链接
  • 修复了当插件未找到时,claude 插件详情 <name>@builtin 建议执行 claude plugin list(该命令从不显示内置插件)的问题;现在它指向 /plugin
  • 修复了一个以链接开头的表情符号因包裹而多占一列宽度,导致其在问题预览中被隐藏并将表格转换为列表的问题
  • 修复了在 git 2.56 或更高版本下,当存在一个指向不存在目录的孤立 .git 文件时,worktree 隔离拒绝创建或恢复 worktree 的问题
  • 修复了云会话在新进程中恢复后,其成本和用量从零点重新开始计算的问题
  • 自托管运行器:修复了在重用存储在 git reftable 格式中的签出内容的会话中,git fetches 因 "bad object refs/heads" 而失败的问题
  • Windows:修复了在 exFAT 或 FAT32 驱动器上的项目中,包括使用 --plugin-dir 启动的会话中,每个文件写入都被拒绝或被询问的问题
  • 改进了启用大量插件时的启动时间:插件命令和代理文件现在大大减少了加载所需的文件系统调用次数,尤其在 Windows 上
  • 改进了与服务器端分类器配合使用的自动模式:对于超出安全检查长度的对话,现在会进行压缩,而不是拒绝所有经过检查的工具调用
  • 改进了从其他文件夹重新打开后台会话且没有 LLM 网关时的提示信息:现在会说明原因,而不是显示“未登录”
  • 更改了 claude -p 和无权限模式的 Agent SDK 会话,使其在第三方提供商上默认以默认模式启动(遥测关闭或在全新安装时开启);--permission-mode auto 保持自动模式
  • 更改了 fork 子代理(subagent_type: "fork"),使其在 claude -p、Agent SDK、桌面应用和 VS Code 中默认开启(终端中已是如此);设置 CLAUDE_CODE_FORK_SUBAGENT=0 可将其关闭,且 claude mcp serve 永不提供它们
  • 更改了桌面应用和 VS Code,使其始终在后台运行主对话的子代理(subagents),就像终端那样,而不是让 Claude 自行选择;现在,claude -p、Agent SDK、桌面应用和 VS Code 中的子代理自身的 Agent 调用默认在前台运行
  • 更改了代理页脚提示中的左箭头图标,使其在会话打开后 10 秒隐藏;等待你响应的代理数量仍然显示
  • 更改了 Chrome 中 Claude 的说明在系统提示词中的位置,以便新对话可以从共享提示词缓存中读取这些说明
  • 更改了提示词和代理钩子(hooks),使得同一类型的事件最多同时运行 12 个;其余事件排队等待
  • 更改了当组织策略禁用 /feedback 时显示的消息:现在它指向 GitHub Issues,而不是组织管理员
  • [VSCode] 修复了在列表中存在未闭合代码块时,回复流式传输期间该代码块后的文本显示为纯文本,随后又变为代码的问题
  • [VSCode] 修复了从面板登录 MCP 服务器时,若服务器 URL 包含查询字符串则打开损坏的授权页面的问题
  • [VSCode] 修复了当无法连接任何安装了 Claude 扩展的浏览器时,@browser 横幅仍显示“浏览器已连接”的问题
  • [Cloud sessions] 在例行任务页面添加了一个横幅,说明其上次运行未启动的原因,例如组织达到了并发云会话的限制
  • [Cloud sessions] 修复了云会话中除最新消息外,“回退至此”功能在所有消息上均失败的问题;自托管运行器需要 Claude Code v2.1.246 或更高版本
  • [Cloud sessions] 修复了云会话中的拉取请求状态栏在 GitHub 重新检查时,将存在合并冲突的拉取请求错误地翻转为“就绪”状态的问题
  • [Cloud sessions] 修复了云会话意外停止后,例行任务运行结果显示为“已完成”,以及在开始之前归档时显示为“已取消”,而非“失败”的问题
  • [Cloud sessions] 修复了云会话中的差异视图在会话的 GitHub 仓库被重命名或移动后,未能显示更改或加载失败的问题
  • [Cloud sessions] 修复了部分失败的定时例行任务在一小时或更长时间后从头再次运行的问题,这可能导致重复工作,例如两次发布相同的报告
  • [Cloud sessions] 修复了有时打开的云会话不显示从其他设备发送的消息,直到刷新页面或点击离开再返回才显示的问题
  • [Cloud sessions] 改进了云会话启动失败时显示的错误信息:现在显示“连接丢失”或“服务器错误”,而不是“出错了”
  • [远程控制] 修复了当您的计算机离线后,在远程控制会话中子代理的面板无限旋转的问题;现在会显示“远程控制已断开连接”
  • [Claude 标签] 修复了在 Slack 频道或私聊中提到 Claude 时,即使 Claude 通过编辑其早期消息进行了回复,“正在思考…”的状态仍会持续存在的问题
  • [Claude 标签] 修复了 Claude 的 Slack 回复中编号列表或项目符号步骤下的代码块内的 URL 被包裹在尖括号中的问题,这会导致复制的命令失效

更进一步:量化金融体系

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

进入量化体系 →

相似阅读

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