Claude Code v2.1.267:新增maxEffortLevel与--system-prom
v2.1.267
推荐理由
Prompt-cache 失效和会话恢复时的上下文丢失是重度用户的高频痛点,直接影响长对话的稳定性;建议升级以获得更可靠的缓存机制。
What's changed
变更内容
- Added maxEffortLevel setting (top-level or per model under modelSettings): caps the effort level on every provider, including Bedrock, Vertex and Foundry; users can still pick a lower level
- Added --system-prompt-snapshot off to render the system prompt fresh on every request instead of reusing the conversation's recorded prompt (for iterating on prompt text)
- Fixed Cowork scheduled tasks in the cloud failing at startup for organizations whose managed settings require sandboxing
- Fixed /context and other local command output rendering blank on mobile clients
- Fixed shift+enter and option+backspace not working after reconnecting to a tmux or ssh session inside an agent view
- Fixed the dim last-prompt header not appearing at the top of the conversation when scrolling up in fullscreen mode
- Fixed Workflow agent() calls with large output schemas being refused in auto mode instead of being checked by the safety classifier
- Fixed a case where a marketplace entry path containing a backslash could bypass the containment check for fetched marketplaces on macOS and Linux
- Fixed expired AWS or Google Cloud credentials under a host app such as Claude Desktop retrying ten times with a generic "request failed" before the re-authenticate error appeared
- Fixed resuming a session after /compact or another slash command ran via -p --resume: a spurious "Continue from where you left off." turn is no longer inserted
- Fixed resuming a large session (transcript over 5 MB): parallel tool calls and their hook output are no longer dropped from the reloaded conversation
- Fixed managed allowedHttpHookUrls, httpHookAllowedEnvVars and allowedChannelPlugins to admit nothing, not everything, when unreadable
- Fixed /login on machines whose managed settings require Claude apps gateway sign-in: Esc now closes the dialog instead of doing nothing
- Fixed artifact publishes cut off by a dropped connection mid-upload: they now retry once when Claude Code can tell the upload never completed, instead of reporting an unknown outcome
- Fixed effort: frontmatter on custom commands, skills, and subagents being ignored on models whose default effort is still pinned (Opus 4.7, Opus 4.8, Fable 5)
- Fixed artifact publish failing with an unhelpful error when the page file isn't valid UTF-8 or contains a replacement character (U+FFFD); the error now names the line and column to fix
- Fixed claude agents @ directory menu not listing repositories created after the session started
- Fixed Remote Control clients that join a Claude Desktop or VS Code session showing a stale permission mode until it was changed again
- Fixed claude remote-control exiting and dropping every attached session when its server credential expires (about 30 days after start); the host now re-registers and keeps going
- Fixed the usage-limit warning flickering on and off during a session when requests for different models or modes report different limit windows
- Fixed earlier reasoning being dropped when an MCP server re-sends, or a built-in tool re-renders, a tool the model already loaded
- Fixed a tool that disappears mid-conversation, from a disconnected MCP server or an upgrade, rewriting the tool list and discarding earlier thinking
- Fixed a background worker forked from a conversation adding EnterWorktree to the conversation's tool block mid-session, which broke prompt-cache reuse
- Fixed mid-session MCP and plugin tools being added to the tool list in sessions without ToolSearch, which broke prompt-cache reuse; supported models now receive them as deferred definitions
- Fixed switching models with /model re-sending every tool definition (a prompt-cache miss); commit and PR attribution text now arrives as a conversation note that updates on model changes
- Fixed resumed sessions rewriting the inline tool set when an MCP connector reconnects at a different moment than before
- Fixed resumed sessions re-rendering tool descriptions instead of replaying the recorded ones when the first turn ran a tool
- Fixed prompt-cache misses and dropped extended thinking when a claude.ai connector's tools change between a session and its resume
- Fixed resumed sessions rewriting earlier MCP tool announcements (and dropping extended thinking) before their connectors reconnect
- Fixed a prompt-cache break when a print-mode (-p) conversation is resumed interactively: the system prompt prefix no longer changes
- Improved the /diff panel: it no longer flashes "0 files changed" and a spinner before settling, and its empty state is centered in the panel
- Improved the Bash tool's description guidance so Claude describes what a command does in plain words instead of echoing the command
- Improved sandbox guidance so Claude suggests /copy when clipboard commands such as pbcopy fail inside the sandbox
- Improved --resume first-render time for sessions with many Bash tool calls
- Improved prompt input responsiveness: keystrokes no longer occasionally wait a frame behind spinner or streaming repaints
- Improved prompt-cache stability: subagents and sessions started with --system-prompt or --append-system-prompt now record the system prompt and tool definitions once instead of re-rendering them
- Improved Artifact tool publish errors: when a publish is refused, the message now says why and what to do about it
- Self-hosted runner: Changed --use-anthropic-git-proxy to be reported to the server at registration and to print a warning for each session that still clones through the legacy git proxy
- Gateway: Changed forward_user_identity upstreams to return a 429 as-is to a developer whose email was forwarded, instead of failing over to the next upstream, so the proxy's per-user limits hold
- [VSCode] Fixed the extension host hanging at 100% CPU when forking, editing an earlier message, or rewinding in a conversation whose saved transcript contains a cyclic parent link
- [VSCode] Fixed pasting a screenshot on WSL2/WSLg inserting raw image bytes into the chat input; the image is now attached when the clipboard provides it, otherwise the paste is ignored
- [VSCode] Fixed chat diff blocks always rendering with a dark editor theme; they now follow the active VS Code color theme, including high contrast
- [VSCode] Fixed mixed right-to-left and English text rendering in the wrong order while typing in the message input
- [VSCode] Fixed accepting an edit in the diff view on a file with Windows (CRLF) line endings failing with "String not found in file"
- [VSCode] Fixed @-mentions dropping files whose paths contain spaces
- [VSCode] Fixed the sessions list view failing to load in windows connected over Remote-SSH when the workspace folder exists only on the remote host
- [VSCode] Fixed runaway ripgrep processes when viewing files in large or symlink-heavy workspaces
- [Claude Code on the web] Fixed GitHub Enterprise Server sessions showing your GitHub account as disconnected once its token expired; PR and issue operations now refresh it automatically
- [Claude Code on the web] Fixed gh and GitHub API calls failing in organizations without the Claude GitHub App; they now use your connected GitHub account and say so when none is connected
- [Claude Tag] Added a "Use a custom connector" link to the preset connection forms in Claude Tag admin settings, so you can switch to a custom connection without starting over
- [Claude Tag] Fixed Claude replying "The API rejected the request as invalid" when the organization has run out of usage credits; the reply now says so and explains how to add more
- [Claude Tag] Fixed thread requests to edit or delete a message Claude posted at the channel's top level being answered with a correction instead of reaching the session that posted it
- [Claude Tag] Fixed Connect on Tool access requests under Admin settings > Review requests failing with "Authorization failed" or showing the requested access bundle as deleted
- 新增 maxEffortLevel 设置(顶层或 modelSettings 下的每个模型):限制所有提供商(包括 Bedrock、Vertex 和 Foundry)的 effort 级别;用户仍可选择较低的级别
- 新增 --system-prompt-snapshot off 选项,以便在每次请求时重新渲染系统提示词,而不是复用对话中记录的提示词(用于迭代提示词文本)
- 修复了云环境中 Cowork 定时任务在启动时失败的问题,该问题出现在其托管设置要求沙盒化的组织中
- 修复了移动端客户端上 /context 及其他本地命令输出显示为空的问题
- 修复了在 agent 视图中重新连接到 tmux 或 ssh 会话后,shift+enter 和 option+backspace 无法使用的问题
- 修复了全屏模式下向上滚动时,对话顶部未显示变暗的 last-prompt 标题的问题
- 修复了 Workflow agent() 调用在使用大型输出模式时,在自动模式下被拒绝而非由安全分类器检查的问题
- 修复了 macOS 和 Linux 上包含反斜杠的市场条目路径可能绕过已获取市场隔离检查的问题
- 修复了主机应用(如 Claude Desktop)下过期的 AWS 或 Google Cloud 凭证在出现重新认证错误前会重试十次并返回通用“请求失败”消息的问题
- 修复了通过 -p --resume 运行 /compact 或其他斜杠命令后恢复会话时,会插入多余的“从上次中断处继续。”回合的问题
- 修复了恢复大型会话(转录超过 5 MB)时,并行工具调用及其钩子输出不再从重新加载的对话中被丢弃的问题
- 修复了当 managed allowedHttpHookUrls、httpHookAllowedEnvVars 和 allowedChannelPlugins 不可读时,应拒绝所有而非允许所有的问题
- 修复了在托管设置要求 Claude apps 网关登录的机器上执行 /login 时,Esc 键现在关闭对话框而不是无响应的问题
- 修复了因上传过程中连接断开导致 artifact 发布被截断的问题:现在当 Claude Code 能够判断上传从未完成时,会重试一次,而不是报告未知结果
- 修复了自定义命令、技能和子代理上的 effort frontmatter 在默认 effort 仍被固定的模型(Opus 4.7、Opus 4.8、Fable 5)上被忽略的问题
- 修复了当页面文件不是有效的 UTF-8 或包含替换字符 (U+FFFD) 时,artifact 发布失败且错误信息不友好的问题;现在错误信息会指出需要修复的行和列
- 修复了 claude agents @ 目录菜单未列出会话开始后创建的仓库的问题
- 修复了加入 Claude Desktop 或 VS Code 会话的固定远程客户端在权限模式更改前显示过期权限模式的问题
- 修复了 claude 远程控制在其服务器凭证过期(启动后约 30 天)时退出并丢弃所有附加会话的问题;主机现在会重新注册并继续运行
- 修复了在会话期间,当对不同模型或模式的请求报告不同的限制窗口时,使用量限制警告闪烁的问题
- 修复了当 MCP 服务器重新发送或内置工具重新渲染模型已加载的工具时,导致早期推理被丢弃的问题
- 修复了由于断开连接的 MCP 服务器或升级导致工具在对话中途消失,重写工具列表并丢弃早期思考的问题
- 修复了从会话分叉的背景工作进程在会话中途将 EnterWorktree 添加到会话的工具块中,从而破坏了提示缓存重用的问题
- 修复了在无 ToolSearch 的会话中,将在会话中途添加的 MCP 和插件工具加入工具列表,从而破坏提示缓存重用的问题;支持的模型现在将其作为延迟定义接收
- 修复了通过 /model 切换模型时重新发送每个工具定义(导致提示缓存未命中)的问题;提交和 PR 归属文本现在作为对话笔记到达,并在模型更改时更新
- 修复了恢复的会话在 MCP 连接器以不同于之前的时刻重新连接时重写内联工具集的问题
- 修复了恢复的会话在首轮运行工具时重新渲染工具描述而不是回放记录的描述的问题
- 修复了当 claude.ai 连接器的工具在会话与其恢复之间发生变化时,导致的提示缓存未命中和扩展思考丢失的问题
- 修复了恢复的会话在其连接器重新连接之前重写早期 MCP 工具公告(并丢弃扩展思考)的问题
- 修复了交互式恢复 print-mode (-p) 会话时的提示缓存中断:系统提示前缀不再发生变化
- 改进了 /diff 面板:它不再在稳定前闪烁显示“0 files changed”和旋转图标,且其空状态在面板中居中显示
- 改进了 Bash 工具的描述指导,使 Claude 用通俗语言描述命令的作用,而不是回显命令本身
- 改进了沙箱指导,使 Claude 在沙箱内 pbcopy 等剪贴板命令失败时建议执行 /copy
- 改进了具有大量 Bash 工具调用的会话的 --resume 首次渲染时间
- 改进了提示输入的响应性:按键输入不再偶尔滞后于旋转图标或流式重绘一帧
- 改进了 prompt-cache 稳定性:使用 --system-prompt 或 --append-system-prompt 启动的子代理和会话现在仅记录一次系统提示词和工具定义,而非重复渲染它们
- 改进了 Artifact 工具发布错误处理:当发布被拒绝时,消息现在会说明原因及后续操作建议
- 自托管运行器:将 --use-anthropic-git-proxy 改为在注册时向服务器报告,并对仍通过旧版 git 代理克隆的每个会话打印警告
- 网关:将 forward_user_identity 上游改为直接向邮箱已转发的开发者返回 429 状态码,而不是故障转移到下一个上游,从而确保代理的用户级限制生效
- [VSCode] 修复了在包含循环父链接的对话中,进行分叉、编辑早期消息或回退时,扩展主机因 CPU 占用率达 100% 而挂起的问题
- [VSCode] 修复了在 WSL2/WSLg 上粘贴截图时,原始图像字节被插入聊天输入框的问题;现在若剪贴板提供图像则将其作为附件添加,否则忽略粘贴操作
- [VSCode] 修复了聊天差异块始终使用深色编辑器主题渲染的问题;现在它们遵循活动的 VS Code 颜色主题,包括高对比度模式
- [VSCode] 修复了在消息输入框中输入时,混合的从右到左文本与英文文本以错误顺序渲染的问题
- [VSCode] 修复了在具有 Windows (CRLF) 换行符的文件上接受差异视图中的编辑时,因找不到文件中的字符串而失败的问题
- [VSCode] 修复了 @-mentions 丢弃路径中包含空格的文件的问题
- [VSCode] 修复了在工作区文件夹仅存在于远程主机上且通过 Remote-SSH 连接时,会话列表视图无法加载的问题
- [VSCode] 修复了在查看大型或符号链接较多的工作区中的文件时,ripgrep 进程失控运行的问题
- [Web 版 Claude Code] 修复了 GitHub Enterprise Server 会话在其令牌过期后显示您的 GitHub 账户处于断开连接状态的问题;PR 和 Issue 操作现在会自动刷新令牌
- [Web 版 Claude Code] 修复了在没有安装 Claude GitHub App 的组织中 gh 命令和 GitHub API 调用失败的问题;现在它们会使用您已连接的 GitHub 账户,并在未连接时予以说明
- [Claude Tag] 在 Claude Tag 管理设置的预设连接表单中添加了“使用自定义连接器”链接,以便您可以切换到自定义连接而无需重新开始
- [Claude Tag] 修复了当组织用尽使用额度时 Claude 回复“API 因请求无效而拒绝”的问题;现在回复会明确说明情况并解释如何添加更多额度
- [Claude Tag] 修复了针对在频道顶层发布的 Claude 消息的编辑或删除线程请求,这些请求被回复为更正信息,而非转发至发布该消息的会话
- [Claude Tag] 修复了在管理设置 > 审核请求下访问 Connect 工具的请求因“授权失败”而报错,或显示所请求的访问包已删除的问题
更进一步:量化金融体系
看懂新闻只是起点——沿量化金融路径,把它变成能交付的工程能力