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

Claude Code v2.1.265:修复MCP SSE兼容、插件路径绕过及Prompt缓存破坏等

v2.1.265

原文
发到 X
推荐理由

本次更新修复了 MCP 连接与 Prompt 缓存的关键 Bug,且存在插件路径绕过安全检查的漏洞。依赖 Claude Code 进行自动化开发的读者应尽快升级以保障工作流稳定与安全。

What's changed

变更内容

  • Added user.email and user.groups to the telemetry Claude Desktop and Cowork send through a Claude apps gateway, matching terminal sessions
  • Added support for pointing --plugin-dir at a folder of plugins: each child folder with a manifest loads, and children added or removed while running are picked up
  • Added a 1 GB cap on tool results saved to disk; the in-conversation preview says when a saved file was truncated
  • Fixed resuming a foreground-spawned subagent changing its tool list and system prompt prefix, which broke prompt-cache reuse for that agent
  • Fixed agent teammates and resumed subagents moving SubagentStart hook context and preloaded skills out of the prompt prefix on later turns, which broke prompt-cache reuse
  • Fixed resume after the previous process died while a tool was running: the last prompt is no longer rewritten, and the interrupted tool call is kept and marked interrupted
  • Fixed /model opusplan[1m] being rejected with "Model not found"
  • Fixed syntax-highlighted code in permission prompts and messages sometimes omitting a character after a Ruby ?, Erlang $, or Perl $ sigil
  • Fixed the fullscreen transcript jumping by one row whenever the slash-command or @-file suggestion list opened or closed
  • Fixed a plugin path containing a backslash bypassing the symlink containment check on macOS and Linux
  • Fixed plugin directories whose names begin with two dots being wrongly refused as outside the plugin root
  • Fixed VS Code and SDK sessions occasionally requiring re-login when a session was closed while refreshing its token
  • Fixed Remote Control sessions sending the end-of-turn signal before the reply's last message, which could show a reply as finished in the Claude app before its last part arrived
  • Fixed background (--bg) sessions occasionally being retired mid-turn when a message arrived just before the idle timeout
  • Fixed Claude Code's own git status and diff probes running clean filters configured by a nested repository inside the working tree
  • Fixed the advisor tool and its instructions being re-decided per request from the request's model; the decision is now made once and announced in the conversation when it changes
  • Fixed artifact publish accepting connector tool names the connector doesn't expose; the publish is now refused when none of the declared tools exist, and warned when only some don't
  • Fixed /add-dir <subdirectory> refusing to load a subdirectory's agents when managed settings lock only skills to plugins, and promising agents when only agents are locked
  • Fixed two-key keyboard shortcuts cancelling silently when the second key arrived more than a second later, as happens inside tmux; they now wait 3 seconds and show a notice when they time out
  • Fixed forked skills (context: fork) not streaming their kickoff prompt and, with --forward-subagent-text, their text turns as progress events in stream-json
  • Fixed a plugin's default component folder that the OS cannot check, such as a symlink loop, being silently skipped; it is now reported in /plugin with the error code
  • Fixed the Claude apps gateway's OTLP telemetry relay pausing all forwarding to a collector for 30 seconds after it rejected a few payloads as malformed or too large
  • Fixed /plugin Discover/Browse and claude plugin list --json --available showing no description or display name for marketplace plugins whose metadata lives only in their plugin.json
  • Fixed /login showing "no gateway URL is configured" when re-run in a session that signed in to a Claude apps gateway set by managed settings
  • Fixed /model claiming a model was "saved as your default" when the settings file couldn't be written; it now says the save failed and why
  • Fixed /clear from Remote Control waiting on SessionStart hooks and on open terminal dialogs before completing
  • Fixed the /config dialog changing height when switching between its tabs
  • Fixed resuming a workflow run after its container restarted; a resume whose run journal is missing now fails with a clear error instead of rerunning every agent
  • Fixed the claude-api skill's error-code reference: model access failures return 404 and unavailable beta headers return 400, not 403
  • Fixed non-interactive sessions (-p with stream-json input, Agent SDK, cloud sessions) resetting the shell working directory at each new user message; a cd now persists across turns
  • Fixed MCP servers configured as http that only speak the legacy HTTP+SSE transport never connecting; Claude Code now falls back to SSE as the MCP spec describes
  • Fixed some claude.ai connectors in cloud sessions showing as needing authentication even though they are connected in claude.ai (servers that answer an unsupported request with HTTP 401)
  • Fixed remote sessions keeping their sandbox container alive while a connector approval or sign-in link waits for you
  • Fixed resumed sessions showing long model-facing recovery instructions in "background task didn't finish" notices instead of a short status line
  • Windows: Fixed Read, Write and Edit refusing every file ("symlink resolution changed after permission was checked") when running inside an AppContainer or restricted-token sandbox
  • Improved --worktree startup on large repositories: the new worktree is now checked out in parallel (git 2.32+)
  • Improved /workflows agent detail: tool calls are marked running, failed or done, the subagent's task list is shown when it has one, and Enter unfolds the listed calls with their inputs and results
  • Improved slash commands typed mid-prompt: matches now show in a list (Tab opens it outside fullscreen) instead of a single suggestion, and a plugin skill is now found by its bare name
  • Improved remote MCP servers that need sign-in: Claude Code no longer registers an OAuth client with them until you actually authenticate
  • Improved the time to resume long sessions that read many files
  • Improved the error shown when an image over the size limits cannot be decoded: it now names the cause and how to fix it instead of only citing the limit
  • Improved the Artifact tool's read of an artifact someone else wrote: the summary now treats the page as untrusted content and flags embedded instructions rather than relaying them
  • Updated the .claude folder permission option to say what it actually allows: editing files in the project's .claude folder (or ~/.claude) for the session
  • Changed machines with forceLoginGatewayUrl in managed settings to be Claude apps gateway sessions from startup, like forceLoginMethod: "gateway"; a leftover claude.ai login or API key is not used
  • Changed image processing to use the runtime's built-in image support; the CLI no longer extracts a native image module to the temp directory
  • Changed plugin display metadata to prefer the marketplace entry over plugin.json on the Installed tab and claude plugin details, filling gaps from plugin.json
  • Changed Claude apps gateway sessions to export OpenTelemetry directly to a collector the gateway's managed settings name in OTEL_EXPORTER_OTLP_ENDPOINT, instead of through the gateway's relay; sessions without a named collector still use the relay
  • [VSCode] Added automatic archiving of sessions inactive for a set period (new "Archive inactive sessions" setting, default 14 days)
  • [VSCode] Fixed the sidebar chat coming back blank after Reload Window or a restart when the conversation had been open for more than 10 minutes
  • [VSCode] Fixed the timeline dot sitting below the text on the "Remote Control is active" message
  • 向通过 Claude 应用网关发送遥测数据的 Claude Desktop 和 Cowork 添加了 user.email 和 user.groups,以匹配终端会话
  • 新增支持将 --plugin-dir 指向插件文件夹:加载每个包含清单的子文件夹,并在运行时检测子文件夹的添加或移除
  • 对保存到磁盘的工具结果增加了 1 GB 上限;对话中的预览会在保存的文件被截断时显示提示
  • 修复了恢复前台生成的子代理时更改其工具列表和系统提示前缀的问题,该问题会导致该代理的提示缓存无法复用
  • 修复了代理队友和恢复的子代理在后续轮次中将 SubagentStart 钩子上下文和预加载技能移出提示前缀的问题,该问题会导致提示缓存无法复用
  • 修复了在工具运行期间上一个进程死亡后的恢复问题:不再重写最后一个提示,并保留中断的工具调用,将其标记为已中断
  • 修复了 /model opusplan[1m] 因“未找到模型”而被拒绝的问题
  • 修复了权限提示和消息中语法高亮代码有时遗漏 Ruby ?、Erlang $ 或 Perl $ 符号后字符的问题
  • 修复了每当打开或关闭斜杠命令或 @-文件建议列表时,全屏转录本跳动一行的问题
  • 修复了包含反斜杠的插件路径绕过 macOS 和 Linux 上的符号链接限制检查的问题
  • 修复了名称以两个点开头的插件目录被错误地拒绝为超出插件根目录的问题
  • 修复了当会话在刷新令牌期间关闭时,VS Code 和 SDK 会话偶尔需要重新登录的问题
  • 修复了远程控制会话在回复的最后一条消息之前发送回合结束信号的问题,这可能导致在 Claude 应用中显示回复已完成,而其最后一部分尚未到达
  • 修复了后台(--bg)会话在空闲超时前收到消息时偶尔在回合中途被终止的问题
  • 修复了 Claude Code 自身的 git status 和 diff 探针运行由工作树内嵌套仓库配置的干净过滤器的问题
  • 修复了顾问工具及其指令根据请求模型在每个请求中重新决策的问题;现在决策仅进行一次,并在发生变化时在对话中宣布
  • 修复了 artifact publish 接受连接器未暴露的连接器工具名称的问题;现在当声明的工具都不存在时发布会被拒绝,并且当只有部分不存在时会发出警告
  • 修复了 /add-dir <subdirectory> 在托管设置仅锁定技能到插件、且承诺的代理仅锁定代理时,拒绝加载子目录代理的问题
  • 修复了两键键盘快捷键在第二个按键在一秒后到达时(如在 tmux 内部发生的情况)静默取消的问题;现在它们会等待 3 秒,并在超时时显示通知
  • 修复了分叉技能(上下文:fork)不流式传输其启动提示以及在使用 --forward-subagent-text 时,其文本未作为进度事件在 stream-json 中流转的问题
  • 修复了操作系统无法检查的插件默认组件文件夹(例如符号链接循环)被静默跳过的问题;现在会在 /plugin 中使用错误代码报告该问题
  • 修复了 Claude 应用网关的 OTLP 遥测中继在因负载格式错误或过大而拒绝几个负载后,暂停向收集器转发所有数据 30 秒的问题
  • 修复了 /plugin Discover/Browse 和 claude plugin list --json --available 对于元数据仅存在于其 plugin.json 中的市场插件不显示描述或显示名称的问题
  • 修复了在已登录由托管设置设置的 Claude 应用网关的会话中重新运行 /login 时显示“未配置网关 URL”的问题
  • 修复了 /model 在设置文件无法写入时声称模型“已保存为您的默认值”的问题;现在它会说明保存失败及原因
  • 修复了 /clear 从远程控制完成前等待 SessionStart 钩子和打开终端对话框的问题
  • 修复了 /config 对话框在切换标签页时改变高度的问题
  • 修复了在容器重启后恢复工作流运行的问题;现在如果运行日志缺失,恢复操作将失败并显示清晰的错误,而不是重新运行每个代理
  • 修复了 claude-api 技能的错误代码参考:模型访问失败返回 404,不可用的 beta 标头返回 400,而非 403
  • 修复了非交互式会话(使用 stream-json 输入的 -p、Agent SDK、云会话)在每个新用户消息时重置 shell 工作目录的问题;现在 cd 命令将在各轮次间持久化
  • 修复了配置为 http 且仅支持遗留 HTTP+SSE 传输的 MCP 服务器从未连接的问题;Claude Code 现在按照 MCP 规范回退到 SSE
  • 修复了云会话中某些 claude.ai 连接器即使已在 claude.ai 中连接(服务器以 HTTP 401 响应不支持的请求),仍显示需要身份验证的问题
  • 修复了远程会话在连接器批准或登录链接等待用户操作时保持其沙箱容器存活的问题
  • 修复了恢复的会话在“后台任务未完成”通知中显示冗长的面向模型恢复说明的问题,改为显示简短的状态行
  • Windows:修复了在 AppContainer 或受限令牌沙箱内运行时,读取、写入和编辑功能拒绝所有文件(“权限检查后符号链接解析发生变化”)的问题
  • 改进了大型仓库的 --worktree 启动速度:新工作树现在并行检出(git 2.32+)
  • 改进了 /workflows 代理详情:工具调用标记为运行中、失败或已完成;当子代理有任务列表时显示该列表;按 Enter 展开列出的调用及其输入和结果
  • 改进了提示词中途输入的斜杠命令:匹配项现在以列表形式显示(Tab 键在非全屏模式下打开列表),而非单个建议,并且插件技能现可通过其裸名称找到
  • 改进了需要登录的远程 MCP 服务器:Claude Code 仅在您实际进行身份验证后才向它们注册 OAuth 客户端
  • 改进了读取大量文件的长会话的恢复时间
  • 改进了无法解码超出大小限制的图片时显示的错误信息:现在会指明原因及解决方法,而不仅仅是引用限制条件
  • 改进了 Artifact 工具读取他人编写的工件时的行为:摘要现在将页面视为不受信任的内容,并标记嵌入式指令,而不是直接转发它们
  • 更新了 .claude 文件夹权限选项的描述,使其准确反映其实际允许的操作:允许编辑项目中的 .claude 文件夹(或 ~/.claude)内的文件
  • 更改了配置了 forceLoginGatewayUrl 的受管设置机器,使其从启动开始即为 Claude apps 网关会话,类似于 forceLoginMethod: "gateway";不再使用残留的 claude.ai 登录信息或 API 密钥
  • 更改图像处理方式以使用运行时内置的图像支持;CLI 不再将原生图像模块提取到临时目录
  • 更改插件显示元数据,优先使用已安装选项卡上的市场条目而非 plugin.json,并在 claude 插件详情中填充 plugin.json 的缺失部分
  • 更改 Claude apps 网关会话,使其直接将 OpenTelemetry 导出到受管设置中通过 OTEL_EXPORTER_OTLP_ENDPOINT 命名的收集器,而不是通过网关中继;没有命名收集器的会话仍使用中继
  • [VSCode] 添加了自动归档一段时间不活跃的会话的功能(新增“归档不活跃会话”设置,默认 14 天)
  • [VSCode] 修复了在对话打开超过 10 分钟后,重新加载窗口或重启时侧边栏聊天恢复为空的问题
  • [VSCode] 修复了“远程控制已激活”消息中时间线圆点位于文本下方的问题

更进一步:量化金融体系

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

进入量化体系 →

相似阅读

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