Claude Code v2.1.275:npm插件禁用脚本执行、会话恢复崩溃修复与多项功能改进
v2.1.275
推荐理由
npm 插件默认禁用脚本执行是重大安全加固,所有依赖本地插件的开发者必须升级以消除潜在供应链风险;同时本次修复了大量导致会话崩溃和恢复失败的破坏性 Bug,强烈建议立即更新。
What's changed
变更内容
- Added the signed-in account to Claude apps gateway sign-in: when the gateway names it, you confirm it before the credential is saved, and /status shows it
- Added a send-now key (ctrl+enter, or ctrl+x ctrl+s) that interrupts the current turn and sends all queued messages at once; sent and queued messages show in gray until the model receives them
- Added a startup warning when a configured otelHeadersHelper fails, so sessions that silently export no telemetry are noticed
- Added syncing of the skills and plugins enabled on your claude.ai account to terminal sessions signed in with it; opt out with syncClaudeAiSkills: false or syncClaudeAiPlugins: false
- Added /plugin install <plugin> --marketplace <source>, which offers to add the marketplace before installing the plugin
- Fixed a restored memory file's age note changing between requests after a compaction or resume, which caused prompt cache misses
- Fixed --forward-subagent-text stream-json and SDK output dropping the messages of subagents spawned by a context: fork skill, and of forked skills invoked by a subagent or another forked skill
- Fixed @-mention file suggestions being buried below MCP resources when using a custom fileSuggestion command or typing @./@./
- Fixed fullscreen mode placing background-task completion notices beneath a long turn's collapsed tool row instead of where they arrived; each notice now closes the open row
- Fixed claude plugin marketplace update deleting a GitHub marketplace's local copy when the fetch failed and the marketplace was named after its repository
- Fixed plugin and marketplace messages, logs and claude plugin marketplace list showing a password or token stored in a git, ssh or marketplace URL
- Fixed a resumed cloud session leaving an unanswered question open in the transcript after a queued message superseded it
- Fixed vim mode placing the cursor one character right after a dot-repeated "!" or a fast-typed "i!" switched a non-empty prompt into shell mode
- Fixed fullscreen mode freezing or blanking for several seconds when scrolling up past a large file diff
- Fixed a stray </ccmemory>-style closing tag occasionally appearing in responses
- Fixed plugin messages, logs and the VS Code plugin dialog showing the wrong server for some git addresses
- Fixed a terminal API Error: 400 on every turn for users behind a network gateway that rewrites API error responses when a beta request header is rejected
- Fixed sandboxed Bash commands on Linux reporting exit code 0 for failed commands when the shell is zsh
- Fixed the Read tool hanging instead of reporting an error when part of a large file could not be decoded under memory pressure
- Fixed --resume, the resume picker preview, resumed background agents and the transcript view failing on a session whose saved history contains a malformed task-reminder or @-file attachment entry
- Fixed a crash when resuming a conversation whose transcript contains a malformed message entry, and a fullscreen crash when such a conversation received new messages while scrolled up
- Fixed sessions failing to resume or start when their saved transcript contains a malformed message content block
- Fixed Grep, Glob and @-file suggestions hanging or running out of memory on searches over the 20MB output cap, and system ripgrep reporting "no matches" instead of an error after a flood of warnings
- Fixed /rewind in a forked or background session restoring a zero-filled or truncated file when the session's file-history backups could not be fully copied
- Fixed fullscreen sessions sometimes exiting with "Claude Code exited after an unrecoverable interface error" when typing fast or holding a key with the slash-command dropdown open
- Fixed background sessions crashing and restarting their worker when a command fed through stdin ran on a machine that had run out of file descriptors
- Fixed a crash at launch when ~/.claude.json holds a malformed mcpNeedsAuthNoticed value
- Fixed --resume and --continue dropping a conversation's earlier thinking when a built-in tool it started with has since been switched off by a server-side flag
- Fixed text selected with the mouse in the fullscreen claude --resume session picker never reaching the clipboard
- Fixed plugin reload previews replacing a running session's extracted plugin files when the plugin was loaded from a --plugin-dir or --plugin-url archive
- Fixed self-hosted runners with --drain-wait-sec losing the final result of a turn that finished during a SIGTERM drain; the runner now waits briefly for the turn to be reported
- Fixed SubagentStop hooks with a specific matcher firing for every stopping subagent whose agent type was empty
- Fixed sandboxed Bash commands being unable to write to project directories named hooks/ or config/
- Fixed Artifact updates failing with "File not found" after a session resumes on another machine or its scratchpad is cleared: the page's last published version is restored
- Fixed /update-config writing Write(path) permission rules, which file permission checks don't match, instead of Edit(path) rules
- Fixed four dead documentation URLs (Pricing, Computer Use, Skills, CLI) in the bundled claude-api skill's live-sources table
- Improved prompt caching for a --system-prompt that contains a __SYSTEM_PROMPT_DYNAMIC_BOUNDARY__ line: the text above it is now cached globally, as the SDK's array form already is
- Improved the /desktop error when Claude Desktop does not open: it now says why and what to do next
- Improved the Artifact tool's publish and read results: they now say who can open the page and what the owner's Share menu offers
- Improved artifact publish results: they name the tab icon sent, warn when the page contains a NUL byte, and retry a flaky fetch of the newer page to merge after a stale publish
- Improved pasted and attached images: they are now saved where Claude can open them as files without a permission prompt, including in Desktop and VS Code
- Improved the Artifact tool's guidance so Claude updates a shared artifact in place when you were given edit access to it, instead of publishing a separate copy
- Improved plan-usage reads: editor windows and non-interactive sessions on one machine now share a read made in the last minute instead of each calling the usage endpoint
- Improved the ListPlugins tool description so Claude knows it lists plugins enabled on your claude.ai account, not plugins installed locally with /plugin
- Improved responsiveness when the terminal is slow or paused: output no longer falls further behind while the terminal catches up
- Improved Write and Edit results for files in the synced account-skills folder: they now say the change is not saved to your account and how to save it
- Updated /logout for Claude apps gateway sign-ins to also end the session on gateways that advertise token revocation
- Changed hosted sessions to keep an unanswered permission prompt up after a container restart, instead of asking again
- Changed the Artifact tool to ask for a one-word tab icon on a first publish instead of an emoji favicon
- Changed Claude in Chrome in auto mode to skip the extension's per-site check for classifier-approved calls, as bypass mode does, fixing browser_batch "Permission denied" after a redirect
- Changed plugins installed from an npm source to be fetched with npm pack --ignore-scripts and integrity-verified, so a package's install scripts no longer run
- Changed scheduled and Run now routine runs to save data to, and republish the page of, an artifact you can edit without asking; public artifacts, first publishes and deletes still ask
- Removed the startup notice that told you a one-off scheduled routine had run since your last session
- [VSCode] Added viewing, editing and deleting a saved memory inside the Memory dialog
- [VSCode] Added sending an attached image without typing any text
- 在 Claude 应用网关登录中添加了已登录账户:当网关显示账户名时,你在凭证保存前会进行确认,/status 命令也会显示该信息
- 添加了立即发送快捷键(ctrl+enter,或 ctrl+x ctrl+s),用于中断当前轮次并一次性发送所有排队消息;已发送和排队的消息在模型接收之前会以灰色显示
- 当配置的 otelHeadersHelper 失败时,添加了启动警告,以便注意到那些静默导出无遥测数据的会话
- 将 claude.ai 账户上启用的技能和插件同步到使用该账户登录的终端会话中;可通过设置 syncClaudeAiSkills: false 或 syncClaudeAiPlugins: false 来取消同步
- 添加了 /plugin install <plugin> --marketplace <source> 命令,在安装插件前提供添加市场源的选项
- 修复了压缩或恢复后,恢复的记忆文件年龄提示在请求之间发生变化,从而导致提示缓存未命中的问题
- 修复了 --forward-subagent-text stream-json 和 SDK 输出丢弃由上下文派生技能生成的子代理的消息,以及由子代理或其他派生技能调用的派生技能的消息的问题
- 修复了在使用自定义 fileSuggestion 命令或输入 @./@./ 时,@-mention 文件建议被 MCP 资源掩盖的问题
- 修复了全屏模式下,后台任务完成通知出现在长轮次折叠工具行下方而非其到达位置的问题;现在每个通知都会关闭打开的行
- 修复了 claude 插件市场更新在获取失败且市场以仓库命名时,删除 GitHub 市场本地副本的问题
- 修复了插件和市场消息、日志以及 claude 插件市场列表显示存储在 git、ssh 或市场 URL 中的密码或令牌的问题
- 修复了恢复的云会话在排队消息取代未回答问题后,仍在转录中留下未回答问题的状态
- 修复了 vim 模式下,在点重复的 "!" 或快速输入的 "i!" 将非空提示符切换为 shell 模式后,光标向右移动一个字符的问题
- 修复了在全屏模式下向上滚动经过大型文件差异时,界面冻结或变白几秒钟的问题
- 修复了响应中偶尔出现孤立的 <ccmemory> 风格结束标签的问题
- 修复了某些 git 地址下,插件消息、日志和 VS Code 插件对话框显示错误服务器的问题
- 修复了位于重写 API 错误响应的网络网关后的用户,在 beta 请求头被拒绝时,每轮都遇到终端 API Error: 400 的问题
- 修复了在 Linux 上使用 zsh 作为 shell 时,沙盒化 Bash 命令对失败命令报告退出码 0 的问题
- 修复了 Read 工具在内存压力下无法解码大文件部分内容时挂起而非报错的问题
- 修复了 --resume、恢复选择器预览、恢复后的后台代理以及转录视图在保存的历史记录包含格式错误的任务提醒或 @-file 附件条目时会话失败的问题
- 修复了当对话的转录包含格式错误的消息条目时恢复对话导致的崩溃,以及此类对话在向上滚动时收到新消息导致的全屏崩溃
- 修复了当保存的转录包含格式错误的消息内容块时,会话无法恢复或启动的问题
- 修复了 Grep、Glob 和 @-file 建议在对超过 20MB 输出上限的搜索中挂起或耗尽内存的问题,以及系统 ripgrep 在大量警告后报告“无匹配项”而非错误的问题
- 修复了在分叉或后台会话中,/rewind 命令在无法完全复制会话的文件历史备份时恢复零填充或截断文件的问题
- 修复了在全屏会话中快速输入或按住按键且斜杠命令下拉菜单打开时,有时以“Claude Code 因不可恢复的界面错误而退出”退出的问题
- 修复了通过 stdin 运行的命令在文件描述符耗尽的机器上运行时,导致后台代理崩溃并重启其工作进程的问题
- 修复了当 ~/.claude.json 包含格式错误的 mcpNeedsAuthNoticed 值时在启动时崩溃的问题
- 修复了 --resume 和 --continue 在内置工具已被服务器端标志关闭的情况下丢弃对话早期思考过程的问题
- 修复了在全屏 claude --resume 会话选择器中用鼠标选中的文本从未复制到剪贴板的问题
- 修复了插件重载预览在插件从 --plugin-dir 或 --plugin-url 归档加载时替换正在运行的会话中提取的插件文件的问题
- 修复了使用 --drain-wait-sec 的自托管运行器在 SIGTERM 排水期间完成的回合丢失最终结果的问题;现在运行器会短暂等待回合被报告
- 修复了具有特定匹配器的 SubagentStop 钩子为每个代理类型为空的停止子代理触发的问题
- 修复了沙盒化 Bash 命令无法写入名为 hooks/ 或 config/ 的项目目录的问题
- 修复了会话在其他机器上恢复或其草稿箱被清除后,Artifact 更新因“文件未找到”而失败的问题:将恢复页面最后发布的版本
- 修复了 /update-config 写入 Write(path) 权限规则的问题,当文件权限检查不匹配时,不再使用 Edit(path) 规则
- 修复了捆绑的 claude-api skill 的 live-sources 表中四个失效的文档链接(Pricing、Computer Use、Skills、CLI)
- 改进了包含 __SYSTEM_PROMPT_DYNAMIC_BOUNDARY__ 行的 --system-prompt 的提示词缓存:该行上方的文本现在被全局缓存,就像 SDK 的数组形式一样
- 改进了 Claude Desktop 无法打开时的 /desktop 错误提示:现在会说明原因以及后续操作建议
- 改进了 Artifact 工具的发布和读取结果:现在会说明谁可以打开页面以及所有者 Share 菜单提供的选项
- 改进了 artifact 发布结果:现在会显示发送的标签页图标,当页面包含 NUL 字节时会发出警告,并在陈旧发布后重试获取较新页面以进行合并
- 改进了粘贴和附加的图片:现在它们会被保存到 Claude 无需权限提示即可作为文件打开的位置,包括在 Desktop 和 VS Code 中
- 改进了 Artifact 工具的指导逻辑,以便在您获得编辑权限时,Claude 就地更新共享的 artifact,而不是发布单独的副本
- 改进了 plan-usage 读取:同一台机器上的编辑器窗口和非交互式会话现在共享最近一分钟内进行的读取,而不是各自调用 usage 端点
- 改进了 ListPlugins 工具的描述,使 Claude 知道它列出的是您在 claude.ai 账户上启用的插件,而不是通过 /plugin 本地安装的插件
- 改进了终端缓慢或暂停时的响应能力:输出不再在终端追赶时进一步滞后
- 改进了已同步 account-skills 文件夹中文件的 Write 和 Edit 结果:现在会说明更改未保存到账户以及如何保存
- 更新了 Claude 应用网关登录的 /logout,使其也在支持令牌撤销的网关上结束会话
- 更改托管会话的行为,使其在容器重启后保留未回答的权限提示,而不是重新询问
- 更改了 Artifact 工具,使其在首次发布时要求提供单字标签页图标,而不是 emoji 网站图标 (favicon)
- 更改了 Chrome 中自动模式下的 Claude 行为,使其跳过扩展程序对分类器批准调用的逐站点检查(与 bypass 模式一样),从而修复重定向后的 browser_batch "Permission denied" 错误
- 更改了从 npm 源安装的插件的获取方式,使用 npm pack --ignore-scripts 并验证完整性,因此包的安装脚本不再运行
- 将定时运行和立即运行的例行任务更改为:保存数据至、并重新发布你无需申请即可编辑的工件页面;公开工件、首次发布和删除操作仍需申请
- 移除了启动通知,该通知曾提示自上次会话以来已运行过一次性的定时例行任务
- [VSCode] 在 Memory 对话框中新增查看、编辑和删除已保存记忆的功能
- [VSCode] 新增发送附带图片的功能,无需输入任何文本
更进一步:量化金融体系
看懂新闻只是起点——沿量化金融路径,把它变成能交付的工程能力