Claude Code v2.1.269:新增插件评估与并发限制,修复会话恢复及终端异常
v2.1.269
推荐理由
v2.1.269 包含关键的安全修复(插件解压权限泄露)和严重的可用性阻断修复(会话卡死),同时大幅提升了工作流并发能力。重度依赖 Claude Code 进行自动化编排或插件开发的读者必须升级以消除安全隐患并保障长会话稳定性。
What's changed
变更内容
- Added claude plugin eval: run a plugin's eval suite against Claude Code and get scored, reproducible results (JSON + HTML report); see claude plugin eval --help
- Added /output-style [name] to list and switch output styles, including over Remote Control and in cloud and other headless sessions
- Added a diff of the files a Bash command changed to the Bash tool result when the Bash tool handles file edits (setting bashEditDiffEnabled)
- Added OTEL_METRICS_INCLUDE_REPOSITORY to tag OpenTelemetry metrics and events with vcs.* repository attributes; commit events get vcs.ref.head.* with OTEL_LOG_TOOL_DETAILS
- Added CLAUDE_CODE_GATEWAY_MODEL_DISCOVERY_TIMEOUT_MS to extend the LLM gateway /v1/models discovery timeout (default 3s)
- Added a spinner tip suggesting /focus for a view with just your prompt, a one-line work summary, and the response
- Added CLAUDE_CODE_WORKFLOW_MAX_CONCURRENT_AGENTS (1–256) to raise the Workflow tool's per-run concurrent agent limit for inference-bound fan-outs
- Fixed the prompt cache being partially invalidated on the turn after a response was cut off at the output-token limit and automatically resumed
- Fixed a case where resuming a session after interrupting Claude mid-thought could change how earlier context was re-sent, hurting prompt-cache reuse
- Fixed F1/F2/F4 not working in kitty-protocol terminals and Delete in st, Alt+arrows acting as Escape in rxvt-unicode, and Shift+punctuation typing the unshifted key in WezTerm (regression in 2.1.247)
- Fixed remote and headless sessions reporting "waiting for your input" while background agents were still running (set CLAUDE_CODE_BG_TASKS_REPORT_RUNNING=0 to restore the old behavior)
- Fixed the terminal's replies to capability queries (^[[?1;2c) appearing as stray text at startup in some terminals
- Fixed rows at the top or bottom of the transcript going blank in fullscreen after resizing the terminal
- Fixed a deny or ask permission rule starting with ! applying beyond the settings source that wrote it; such a rule now applies only within its own source, and a bare ! negation is ignored
- Fixed the git status Claude is told after a compaction: it is now the current status, not the one from the start of the session
- Fixed synced plugin MCP servers not connecting when a remote session resumes
- Fixed resumed headless sessions losing a turn's replies when the model was switched or a request was retried mid-turn
- Fixed terminal escape codes, line breaks and oversized text from a background task's on-disk record reaching the task list and task notifications when work is resumed
- Fixed CMYK JPEG images failing to attach with "cannot decode"; they are now converted and resized like other JPEGs
- Fixed the managed settings approval dialog not naming the collector for a gRPC telemetry endpoint set without a scheme
- Fixed plugin headersHelper consent prompts showing a URL path that could be misread as a different host
- Fixed plugin errors showing [redacted URL] in place of a relative Windows path with a folder name that starts with @
- Fixed missing cursor in the permission-rule, auto-mode-rule, add-directory, session-rename and feedback-review text fields when the terminal's native cursor is enabled
- Fixed repeated clicks on a /fork receipt, each under a second apart, never backgrounding the session right away while it waited for the current tool to finish
- Fixed plugin LSP servers that reject shutdown params (e.g. rust-analyzer) being left running at session end; exit is now sent even if shutdown fails
- Fixed the attribution reminder overriding a CLAUDE.md or memory rule against commit and pull request attribution; lines set by managed settings still apply
- Fixed prompt suggestions being dropped for text in Japanese, Chinese, Thai and other languages written without spaces between words
- Fixed synchronized output being assumed from the terminal's name in GNOME Terminal and Konsole versions that do not support it
- Fixed permission_denials in --output-format stream-json results omitting Read, Edit and Write calls blocked by a path-scoped deny rule
- Fixed sessions run through the SDK or the desktop app showing an unknown status in other sessions' agent list
- Fixed /insights failing on Bedrock, Vertex, Foundry, and gateway deployments whose account can't reach the default Opus model by using the session model there instead
- Fixed organization policy limits not loading for the session when another Claude Code process refreshed the login at the same moment
- Fixed Claude Desktop sessions using Bedrock, Vertex, or a gateway not getting the contextual "what Claude needs" turn-end notification text
- Fixed MCP servers reconnecting when an updated config only changed the order of the server URL's query parameters
- Fixed the prompt box's top border splitting into extra lines when viewing a background agent whose name or description has line breaks or is wider than the terminal
- Fixed sessions getting permanently stuck on "Prompt is too long" when auto-compaction had no complete earlier exchange to summarize (mostly Agent SDK sessions with very large prompts)
- Fixed /goal runs silently stalling after API errors, network drops, or token limits: the goal now retries with backoff, or pauses and says why, including until a usage limit resets
- Fixed prompt cache misses in cloud sessions by waiting briefly for server configuration before the first request
- Fixed /btw answers that contained made-up tool calls and output: the side question is now told not to write them, and any that appear are flagged as not executed
- Fixed CLAUDE_CODE_RESUME_INTERRUPTED_TURN re-running a turn that had failed with an API error over 6 hours earlier, or longer ago than CLAUDE_CODE_RESUME_INTERRUPTED_TURN_MAX_AGE_MS when set
- Fixed organization plugins enabled through managed settings not loading in headless sessions and on Claude Desktop (once Desktop bundles this CLI version); they load from the next session
- Fixed plugin archives extracted for a session being readable by other local users, extracted files keeping world-writable bits from the archive, and stale files surviving re-extraction
- Fixed Edit() deny rules and the write-path check not applying to the file a Bash tee command writes; a Bash(tee:*) allow rule no longer covers destinations outside the working directories
- Fixed stray characters like 22c, or a terminal's color or version reply, being typed into the prompt at startup over slow connections (ssh, browser terminals)
- Fixed the terminal's block cursor showing under the interface in rxvt-unicode after leaving or re-entering fullscreen
- Fixed the cursor block staying visible after returning from an external editor in fullscreen mode on rxvt-unicode
- Fixed the interface being drawn twice after returning from an external editor (Ctrl+G) outside fullscreen mode
- Fixed the interface being drawn twice in Konsole after returning from an external editor
- Windows: Fixed PowerShell tool commands sent to the background stopping when Claude Code exits
- Improved the /diff panel to open fully rendered in one step instead of showing a loading state first
- Improved prompt suggestion filtering for Japanese, Chinese and Korean text: mixed-script and single-word suggestions are kept, and meta or evaluative text is dropped as it is for English
- Improved the Skill tool's "Unknown skill" error to name the plugin skill's full name when a bare name matches exactly one plugin skill
- Improved keyboard support over SSH and in unrecognized terminals: terminals that answer the kitty keyboard query (such as foot and Alacritty 0.16+) now get Shift+Enter and Ctrl+Shift shortcuts
- Improved responsiveness in long sessions: transcript updates no longer re-process the whole conversation to build the collapsed tool-use summaries
- 新增 claude plugin eval:针对 Claude Code 运行插件的评估套件,并获得评分、可复现的结果(JSON + HTML 报告);参见 claude plugin eval --help
- 新增 /output-style [name] 用于列出和切换输出样式,包括在远程控制以及云端和其他无头会话中
- 当 Bash 工具处理文件编辑时(设置 bashEditDiffEnabled),在 Bash 工具结果中添加 Bash 命令所更改文件的差异对比
- 新增 OTEL_METRICS_INCLUDE_REPOSITORY,以 vcs.* 仓库属性标记 OpenTelemetry 指标和事件;提交事件通过 OTEL_LOG_TOOL_DETAILS 获取 vcs.ref.head.* 属性
- 新增 CLAUDE_CODE_GATEWAY_MODEL_DISCOVERY_TIMEOUT_MS 以延长 LLM 网关 /v1/models 的发现超时时间(默认 3 秒)
- 新增一个旋转提示符,建议用户使用 /focus 查看仅包含您的提示词、一行工作摘要和响应的视图
- 新增 CLAUDE_CODE_WORKFLOW_MAX_CONCURRENT_AGENTS(1–256),以提高 Workflow 工具在推理密集型扇出场景下的每次运行并发代理限制
- 修复了在响应因输出令牌限制被截断并在下一轮自动恢复后,提示词缓存部分失效的问题
- 修复了一种情况:在中途打断 Claude 思考后恢复会话,可能会改变早期上下文的重新发送方式,从而损害提示词缓存的复用效果
- 修复了 kitty-protocol 终端中 F1/F2/F4 无效、st 中 Delete 键无效、rxvt-unicode 中 Alt+方向键被当作 Escape 键处理,以及 WezTerm 中 Shift+标点符号输入未加 Shift 状态的字符等问题(2.1.247 版本回归问题)
- 修复了远程和无头会话在后台代理仍在运行时错误地报告“等待您的输入”的问题(设置 CLAUDE_CODE_BG_TASKS_REPORT_RUNNING=0 以恢复旧行为)
- 修复了某些终端在启动时,能力查询(^[[?1;2c)的回复作为杂乱文本显示的问题
- 修复了调整终端大小后,全屏模式下转录记录顶部或底部的行变为空白的问题
- 修复了以 ! 开头的拒绝或询问权限规则超出写入该规则的设置源范围生效的问题;此类规则现在仅在其自身源内生效,且裸 ! 否定将被忽略
- 修复了压缩操作后告知 Claude 的 git 状态:现在为当前状态,而非会话开始时的状态
- 修复了同步插件 MCP 服务器在远程会话恢复时无法连接的问题
- 修复了恢复无头会话时,在模型切换或请求重试过程中丢失一轮回复的问题
- 修复了当恢复工作时,后台任务的磁盘记录中的固定终端转义码、换行符和过大文本到达任务列表和任务通知的问题
- 修复了 CMYK JPEG 图像因“无法解码”而未能附加的问题;现在它们会像其他 JPEG 图像一样进行转换和调整大小
- 修复了托管设置审批对话框未命名未设置方案的 gRPC 遥测端点的收集器的问题
- 修复了插件 headersHelper 同意提示显示可能被误读为不同主机的 URL 路径的问题
- 修复了插件错误在相对 Windows 路径(文件夹名以 @ 开头)处显示 [redacted URL] 而非实际路径的问题
- 修复了在启用终端原生光标时,permission-rule、auto-mode-rule、add-directory、session-rename 和 feedback-review 文本字段中缺少光标的问题
- 修复了在等待当前工具完成时,每次间隔不到一秒地多次点击 /fork 收据不会立即将会话置于后台的问题
- 修复了拒绝关闭参数的插件 LSP 服务器(例如 rust-analyzer)在会话结束时仍在运行的问题;即使关闭失败,现在也会发送退出指令
- 修复了归属提醒覆盖针对提交和拉取请求归属的 CLAUDE.md 或记忆规则的问题;由托管设置设置的行仍然适用
- 修复了对于日语、中文、泰语及其他词间无空格的文字,提示建议被丢弃的问题
- 修复了在 GNOME Terminal 和 Konsole 的不支持同步输出的版本中,从终端名称假设存在同步输出的问题
- 修复了 --output-format stream-json 结果中的 permission_denials 省略被路径范围拒绝规则阻止的 Read、Edit 和 Write 调用的问题
- 修复了通过 SDK 或桌面应用运行的会话在其他会话的代理列表中显示未知状态的问题
- 修复了 /insights 在 Bedrock、Vertex、Foundry 以及网关部署上失败的问题,这些部署的账户无法访问默认的 Opus 模型,现已改用该处的会话模型
- 修复了当另一个 Claude Code 进程在同一时刻刷新登录时,会话的组织策略限制未加载的问题
- 修复了使用 Bedrock、Vertex 或网关的 Claude Desktop 会话未获得上下文相关的“Claude 需要什么”的回合结束通知文本的问题
- 修复了当更新后的配置仅更改了服务器 URL 查询参数的顺序时,MCP 服务器重新连接的问题
- 修复了查看名称或描述包含换行符或宽度超过终端宽度的后台代理时,提示框顶部边框分裂成多行的问题
- 修复了当自动压缩没有更早的完整对话可供总结时(主要是具有非常大提示词的 Agent SDK 会话),会话永久卡在“Prompt is too long”的问题
- 修复了 /goal 在 API 错误、网络中断或令牌限制后无声停滞的问题:现在 /goal 会进行退避重试,或者暂停并说明原因,包括直到使用限额重置
- 通过在第一个请求之前短暂等待服务器配置,修复了云会话中的提示词缓存未命中问题
- 修复了 /btw 回答中包含捏造的 tool calls 和输出的问题:现在会告知侧边问题不要编写这些内容,任何出现的此类内容都会被标记为未执行
- 修复了 CLAUDE_CODE_RESUME_INTERRUPTED_TURN 重新运行超过 6 小时前因 API 错误而失败的轮次,或在设置 CLAUDE_CODE_RESUME_INTERRUPTED_TURN_MAX_AGE_MS 时超过该时间范围的轮次的问题
- 修复了通过托管设置启用的组织插件在无头会话和 Claude Desktop(一旦桌面捆绑此 CLI 版本)中无法加载的问题;它们将在下一个会话中加载
- 修复了为会话提取的插件归档文件被其他本地用户读取、提取的文件保留来自归档文件的全球可写位,以及陈旧文件在重新提取后仍然存在的问题
- 修复了 Edit() 拒绝规则和写入路径检查不适用于 Bash tee 命令写入的文件的问题;Bash(tee:*) 允许规则不再覆盖工作目录之外的目标位置
- 修复了在启动时通过缓慢连接(ssh、浏览器终端)将类似 22c 的杂散字符或终端的颜色/版本回复键入到提示符中的问题
- 修复了在 rxvt-unicode 中离开或重新进入全屏模式后,终端的块光标显示在界面下方的问题
- 修复了在 rxvt-unicode 的全屏模式下从外部编辑器返回后,光标块保持可见的问题
- 修复了在非全屏模式下从外部编辑器(Ctrl+G)返回后,界面被绘制两次的问题
- 修复了在 Konsole 中从外部编辑器返回后,界面被绘制两次的问题
- Windows:修复了 PowerShell 工具命令发送到后台后,当 Claude Code 退出时停止运行的问题
- 改进了 /diff 面板,使其一步打开完全渲染的状态,而不是先显示加载状态
- 改进了对日语、中文和韩语文本的提示建议过滤:保留混合脚本和单字建议,并像处理英语一样丢弃元数据或评估性文本
- 改进了 Skill 工具的“Unknown skill”错误信息,当裸名精确匹配一个插件技能时,显示该插件技能的完整名称
- 改进了 SSH 和未识别终端中的键盘支持:响应 kitty 键盘查询的终端(如 foot 和 Alacritty 0.16+)现在支持 Shift+Enter 和 Ctrl+Shift 快捷键
- 改进了长会话的响应速度:转录更新不再重新处理整个对话以构建折叠的工具使用摘要
更进一步:量化金融体系
看懂新闻只是起点——沿量化金融路径,把它变成能交付的工程能力