官方更新 Claude Code Releases 2026-09-09T19:58 正文 ok 1224 words

Claude Code v2.1.267 发布:新增 maxEffortLevel,并强化会话恢复与提示词缓存稳定性

英文标题:Claude Code v2.1.267

Claude Code v2.1.267 新增 `maxEffortLevel` 配置,可在全局或按模型限制各提供商的最高推理强度,同时允许用户选择更低档位。版本还新增 `--system-prompt-snapshot off`,让每次请求都重新渲染系统提示词,便于迭代提示词文本。此次更新集中修复了会话恢复、MCP 工具变化、提示词缓存、远程控制、云端凭据及 Artifact 发布等问题,并改进了 VS Code、Claude Code Web 和 Claude Tag 的体验。对开发者而言,这意味着更可控的模型推理成本与行为,以及在长会话、多工具和企业集成场景中更稳定的运行表现。
打开原文相关 7.2 · 机会 3
media1.3 KB media54.6 KB

中文

更新内容

  • 新增 maxEffortLevel 设置(可在顶层配置,也可在 modelSettings 中按模型配置):为所有提供商的推理强度设置上限,包括 Bedrock、Vertex 和 Foundry;用户仍可选择更低的强度级别。
  • 新增 --system-prompt-snapshot off:每次请求都会重新渲染系统提示词,而不是复用对话中记录的提示词,便于迭代提示词文本。
  • 修复了在托管设置要求使用沙箱的组织中,Cowork 云端定时任务启动失败的问题。
  • 修复了移动端客户端中 /context 及其他本地命令输出显示为空白的问题。
  • 修复了在 Agent 视图中重新连接 tmux 或 SSH 会话后,shift+enter 和 option+backspace 无法使用的问题。
  • 修复了全屏模式向上滚动时,对话顶部未显示淡化的上一条提示词标题的问题。
  • 修复了 Workflow 中输出 schema 较大的 agent() 调用在自动模式下被直接拒绝、而非由安全分类器检查的问题。
  • 修复了在 macOS 和 Linux 上,包含反斜杠的 marketplace 条目路径可能绕过已获取 marketplace 路径包含性检查的问题。
  • 修复了在 Claude Desktop 等宿主应用下,已过期的 AWS 或 Google Cloud 凭据会先以通用“请求失败”重试十次,之后才显示重新认证错误的问题。
  • 修复了通过 -p --resume 在 /compact 或其他斜杠命令运行后恢复会话时,会被错误插入一轮“Continue from where you left off.”的问题。
  • 修复了恢复大型会话(转录记录超过 5 MB)时,并行工具调用及其 hook 输出会从重新加载的对话中丢失的问题。
  • 修复了托管的 allowedHttpHookUrls、httpHookAllowedEnvVars 和 allowedChannelPlugins 在不可读取时会允许所有内容、而非拒绝所有内容的问题。
  • 修复了在托管设置要求通过 Claude apps gateway 登录的机器上,/login 对话框按 Esc 无响应的问题;现在 Esc 会关闭该对话框。
  • 修复了 Artifact 发布在上传过程中连接中断后被截断的问题:当 Claude Code 能判断上传从未完成时,现在会重试一次,而不是报告结果未知。
  • 修复了自定义命令、技能和子 Agent 中的 effort: frontmatter 在默认推理强度仍被固定的模型上被忽略的问题,包括 Opus 4.7、Opus 4.8 和 Fable 5。
  • 修复了当页面文件不是有效 UTF-8 或包含替换字符(U+FFFD)时,Artifact 发布失败却仅显示无帮助错误的问题;现在错误会指出需要修复的行和列。
  • 修复了 claude agents 的 @ 目录菜单不显示会话启动后创建的仓库的问题。
  • 修复了加入 Claude Desktop 或 VS Code 会话的 Remote Control 客户端会持续显示过期权限模式、直到再次变更权限模式的问题。
  • 修复了 claude remote-control 的服务器凭据过期时(启动约 30 天后)退出并断开所有已连接会话的问题;宿主现在会重新注册并持续运行。
  • 修复了会话期间不同模型或模式的请求报告不同额度窗口时,用量上限警告反复闪现的问题。
  • 修复了 MCP 服务器重新发送工具、或内置工具重新渲染模型已加载工具时,先前推理内容被丢弃的问题。
  • 修复了因 MCP 服务器断开连接或升级而在对话中途消失的工具,会重写工具列表并丢弃先前推理内容的问题。
  • 修复了从对话分叉出的后台 worker 会在会话中途向对话工具块添加 EnterWorktree、从而破坏提示词缓存复用的问题。
  • 修复了在没有 ToolSearch 的会话中,会话中途添加 MCP 和插件工具会破坏提示词缓存复用的问题;受支持模型现在会将其作为延迟定义接收。
  • 修复了通过 /model 切换模型时重新发送全部工具定义、导致提示词缓存未命中的问题;提交和 PR 归属文本现在会作为对话注释传入,并会随模型变更而更新。
  • 修复了恢复会话时,若 MCP 连接器在与此前不同的时刻重新连接,会重写内联工具集的问题。
  • 修复了恢复会话时,第一轮执行过工具后会重新渲染工具描述、而非回放已记录描述的问题。
  • 修复了当 claude.ai 连接器的工具在会话与恢复之间发生变化时,提示词缓存未命中并丢失扩展推理内容的问题。
  • 修复了恢复会话时,在连接器重新连接前会重写先前 MCP 工具公告并丢失扩展推理内容的问题。
  • 修复了以打印模式(-p)运行的对话被交互式恢复时的提示词缓存问题:系统提示词前缀不再变化。
  • 改进 /diff 面板:不再先闪现“0 files changed”和加载指示器再进入稳定状态;空状态现在会在面板中居中显示。
  • 改进 Bash 工具的描述指引:Claude 现在会用通俗语言说明命令的作用,而不是重复输出命令本身。
  • 改进沙箱指引:当 pbcopy 等剪贴板命令在沙箱中失败时,Claude 会建议使用 /copy。
  • 改进包含大量 Bash 工具调用的会话使用 --resume 时的首次渲染速度。
  • 改进提示词输入响应速度:按键不再偶尔比加载指示器或流式重绘慢一帧。
  • 改进提示词缓存稳定性:子 Agent 以及通过 --system-prompt 或 --append-system-prompt 启动的会话,现在只会记录一次系统提示词和工具定义,而非重复渲染。
  • 改进 Artifact 工具发布错误信息:当发布被拒绝时,消息现在会说明原因及应采取的操作。
  • 自托管 runner:调整 --use-anthropic-git-proxy 的行为,在注册时将其报告给服务器;对于每个仍通过旧版 git proxy 克隆的会话,都会输出警告。
  • Gateway:调整 forward_user_identity 上游行为;对于已转发电子邮件地址的开发者,429 响应现在会原样返回,而不再故障切换到下一个上游,从而确保代理的按用户限额生效。
  • [VSCode] 修复了当已保存的对话转录记录包含循环父链接时,在分叉、编辑先前消息或回退对话时扩展宿主卡在 100% CPU 的问题。
  • [VSCode] 修复了在 WSL2/WSLg 上粘贴截图时将原始图像字节插入聊天输入框的问题;现在当剪贴板提供图像时会将其作为附件添加,否则会忽略此次粘贴。
  • [VSCode] 修复了聊天差异块始终以深色编辑器主题渲染的问题;现在会跟随当前 VS Code 颜色主题,包括高对比度主题。
  • [VSCode] 修复了在消息输入框中键入时,混合从右到左文本和英文文本的显示顺序错误问题。
  • [VSCode] 修复了在使用 Windows(CRLF)换行符的文件中,于差异视图接受编辑时出现“String not found in file”失败的问题。
  • [VSCode] 修复了 @ 提及会遗漏路径中包含空格的文件的问题。
  • [VSCode] 修复了通过 Remote-SSH 连接的窗口中,当工作区文件夹仅存在于远程宿主机时,会话列表视图无法加载的问题。
  • [VSCode] 修复了在大型工作区或包含大量符号链接的工作区中查看文件时,ripgrep 进程失控的问题。
  • [Claude Code on the web] 修复了 GitHub Enterprise Server 会话在令牌过期后将 GitHub 账户显示为已断开连接的问题;PR 和 issue 操作现在会自动刷新令牌。
  • [Claude Code on the web] 修复了在未安装 Claude GitHub App 的组织中,gh 和 GitHub API 调用失败的问题;现在会使用已连接的 GitHub 账户,并会在未连接账户时明确说明。
  • [Claude Tag] 在 Claude Tag 管理员设置的预设连接表单中新增“Use a custom connector”链接,因此无需重新开始即可切换到自定义连接。
  • [Claude Tag] 修复了当组织用量额度耗尽时,Claude 回复“The API rejected the request as invalid”的问题;现在会说明额度已耗尽,并解释如何添加更多额度。
  • [Claude Tag] 修复了请求编辑或删除 Claude 发布在频道顶层的消息时,系统返回更正内容而非将请求发送至发布该消息的会话的问题。
  • [Claude Tag] 修复了在“管理设置 > 审核请求”中的工具访问请求上点击 Connect 时,出现“Authorization failed”或将请求的访问包显示为已删除的问题。

English / 原文

  1. Releases
  2. v2.1.267

Compare

Sorry, something went wrong.

No results found

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

You can’t perform that action at this time.