Claude Code v2.1.265
英文标题:Claude Code v2.1.265
Claude Code v2.1.265 新增了 Claude Desktop 与 Cowork 经 Claude apps gateway 发送遥测数据时的 `user.email` 和 `user.groups` 字段,并支持将 `--plugin-dir` 指向包含多个插件的目录。该版本为保存到磁盘的工具结果设置 1 GB 上限,同时修复了多项会破坏 prompt cache 复用、会话恢复、插件加载、MCP 连接及 Remote Control 行为的问题。更新还改善了大型仓库的 `--worktree` 启动速度、长会话恢复性能、工作流详情展示及中途输入斜杠命令的体验。对于开发者而言,此版本重点增强了插件管理、遥测与 OpenTelemetry 导出、非交互式会话目录持久化,以及 VS Code 和 Windows 沙箱环境下的稳定性。
打开原文相关 7.2 · 机会 2
1.3 KB
52.3 KB
中文
更新内容
- 为 Claude Desktop 和 Cowork 通过 Claude apps gateway 发送的遥测数据新增
user.email和user.groups,使其与终端会话保持一致 - 新增支持将
--plugin-dir指向一个插件目录:其中每个带有清单文件的子目录都会被加载,且运行期间新增或删除的子目录也会被识别 - 对保存到磁盘的工具结果增加 1 GB 上限;会话内预览会说明保存的文件是否被截断
- 修复恢复前台启动的子 Agent 时更改其工具列表和系统提示词前缀的问题,该问题会破坏该 Agent 的 prompt cache 复用
- 修复 Agent 队友和恢复后的子 Agent 在后续轮次中将 SubagentStart hook 上下文及预加载技能移出提示词前缀的问题,该问题会破坏 prompt cache 复用
- 修复上一进程在工具运行期间终止后恢复会话的问题:最后一条提示词不再被重写,中断的工具调用会被保留并标记为已中断
- 修复
/model opusplan[1m]被以“Model not found”拒绝的问题 - 修复权限提示和消息中的语法高亮代码有时会在 Ruby
?、Erlang$或 Perl$标记符后遗漏一个字符的问题 - 修复每当斜杠命令或
@文件建议列表打开或关闭时,全屏对话记录会跳动一行的问题 - 修复包含反斜杠的插件路径可在 macOS 和 Linux 上绕过符号链接边界检查的问题
- 修复名称以两个点开头的插件目录被错误地判定为位于插件根目录之外并遭拒绝的问题
- 修复在刷新令牌期间关闭会话时,VS Code 和 SDK 会话偶尔要求重新登录的问题
- 修复 Remote Control 会话在回复最后一条消息之前发送回合结束信号的问题;此前,这可能导致 Claude 应用在回复的最后一部分到达前就显示回复已结束
- 修复后台(
--bg)会话在空闲超时前刚好收到消息时,偶尔会在回合中途被终止的问题 - 修复 Claude Code 自身执行的 git status 和 diff 探测会运行工作树内嵌套仓库配置的 clean filter 的问题
- 修复 advisor 工具及其指令会根据每次请求所用模型重新决定的问题;现在该决定仅作出一次,并会在变更时于对话中公告
- 修复 Artifact 发布接受连接器未公开的连接器工具名称的问题;现在若声明的工具均不存在,发布将被拒绝;若仅部分不存在,则会发出警告
- 修复当托管设置仅将技能锁定到插件时,
/add-dir <subdirectory>拒绝加载子目录的 Agent;以及当仅 Agent 被锁定时仍承诺加载 Agent 的问题 - 修复双键键盘快捷键在第二个按键超过一秒后到达时会静默取消的问题,这种情况可能发生在 tmux 中;现在会等待 3 秒,并在超时时显示提示
- 修复分叉技能(
context: fork)不会在 stream-json 中将其启动提示词流式传输,以及启用--forward-subagent-text时不会将其文本轮次作为进度事件传输的问题 - 修复操作系统无法检查的插件默认组件目录(例如符号链接循环)被静默跳过的问题;现在会在
/plugin中连同错误代码一并报告 - 修复 Claude apps gateway 的 OTLP 遥测中继在因格式错误或数据过大而拒绝少量负载后,会暂停向收集器转发全部数据 30 秒的问题
- 修复
/plugin的 Discover/Browse,以及claude plugin list --json --available未显示元数据仅存在于plugin.json中的市场插件描述或显示名称的问题 - 修复在由托管设置配置的 Claude apps gateway 中登录的会话再次运行
/login时,显示“no gateway URL is configured”的问题 - 修复当设置文件无法写入时,
/model仍声称模型“已保存为默认值”的问题;现在会说明保存失败及其原因 - 修复从 Remote Control 运行
/clear时,在完成前等待 SessionStart hook 和打开的终端对话框的问题 - 修复在
/config对话框的不同标签页之间切换时高度发生变化的问题 - 修复工作流运行的容器重启后恢复运行的问题;如果恢复时运行日志缺失,现在会以清晰的错误失败,而非重新运行每个 Agent
- 修复
claude-api技能的错误代码参考:模型访问失败返回 404、不可用的 beta header 返回 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 或受限令牌沙箱中运行时,Read、Write 和 Edit 拒绝所有文件,并显示“symlink resolution changed after permission was checked”的问题
- 改进大型仓库中的
--worktree启动:现在会并行检出新的 worktree(需要 git 2.32+) - 改进
/workflows的 Agent 详情:工具调用会被标记为运行中、失败或完成;当子 Agent 有任务列表时会显示该列表;按 Enter 可展开列出的调用并查看其输入和结果 - 改进在提示词输入过程中键入斜杠命令的体验:匹配项现在以列表显示(非全屏模式下可按 Tab 打开),并且现在可以通过裸名称找到插件技能
- 改进需要登录的远程 MCP 服务器:Claude Code 不再在实际进行身份验证前向其注册 OAuth 客户端
- 改进恢复读取大量文件的长会话所需的时间
- 改进无法解码超出尺寸限制的图片时显示的错误:现在会说明原因及修复方式,而不只是引用限制
- 改进 Artifact 工具读取他人写入的 artifact 的方式:摘要现在会将页面视为不受信任的内容,并标记其中嵌入的指令,而非直接转述这些指令
- 更新
.claude文件夹权限选项的说明,使其准确描述允许的操作:在该会话期间编辑项目.claude文件夹(或~/.claude)中的文件 - 调整在托管设置中配置
forceLoginGatewayUrl的机器:其从启动时起即作为 Claude apps gateway 会话运行,与forceLoginMethod: "gateway"一致;不会使用残留的 claude.ai 登录状态或 API key - 调整图像处理方式,改用运行时内置的图像支持;CLI 不再将原生图像模块提取至临时目录
- 调整插件显示元数据的优先级:在 Installed 标签页和
claude plugin details中优先使用市场条目,并使用plugin.json补齐缺失信息 - 调整 Claude apps gateway 会话的 OpenTelemetry 导出方式:现在会直接导出至 gateway 托管设置在
OTEL_EXPORTER_OTLP_ENDPOINT中指定的收集器,而非通过 gateway 中继;未指定收集器的会话仍使用中继 - [VSCode] 新增自动归档在指定时段内不活跃会话的功能(新增“Archive inactive sessions”设置,默认 14 天)
- [VSCode] 修复当对话已打开超过 10 分钟时,在 Reload Window 或重启后侧边栏聊天重新出现为空白的问题
- [VSCode] 修复“Remote Control is active”消息中的时间线圆点位于文本下方的问题
English / 原文
Compare
Sorry, something went wrong.
No results found
What's changed
- Added
user.emailanduser.groupsto the telemetry Claude Desktop and Cowork send through a Claude apps gateway, matching terminal sessions - Added support for pointing
--plugin-dirat 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
/pluginwith 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
/pluginDiscover/Browse andclaude plugin list --json --availableshowing no description or display name for marketplace plugins whose metadata lives only in theirplugin.json - Fixed
/loginshowing "no gateway URL is configured" when re-run in a session that signed in to a Claude apps gateway set by managed settings - Fixed
/modelclaiming a model was "saved as your default" when the settings file couldn't be written; it now says the save failed and why - Fixed
/clearfrom Remote Control waiting on SessionStart hooks and on open terminal dialogs before completing - Fixed the
/configdialog 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-apiskill's error-code reference: model access failures return 404 and unavailable beta headers return 400, not 403 - Fixed non-interactive sessions (
-pwith stream-json input, Agent SDK, cloud sessions) resetting the shell working directory at each new user message; acdnow persists across turns - Fixed MCP servers configured as
httpthat 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
--worktreestartup on large repositories: the new worktree is now checked out in parallel (git 2.32+) - Improved
/workflowsagent 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
.claudefolder permission option to say what it actually allows: editing files in the project's.claudefolder (or~/.claude) for the session - Changed machines with
forceLoginGatewayUrlin managed settings to be Claude apps gateway sessions from startup, likeforceLoginMethod: "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.jsonon the Installed tab andclaude plugin details, filling gaps fromplugin.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
You can’t perform that action at this time.