Claude Code v2.1.212 更新说明
英文标题:Claude Code v2.1.212
Claude Code v2.1.212 主要调整了 /fork 和 /subtask 的工作方式,将对话复制为后台会话,并引入自动模式重置与会话级调用限制,避免搜索和代理无限循环。MCP 长调用自动转入后台,配合 /resume 历史选择器,让会话管理更流畅。此次更新修复了计划模式自动执行危险命令、符号链接越权、Windows 后台失败等关键问题,并改进了提示缓存、子代理权限继承与企业登录策略。
打开原文相关 10.8 · 机会 3
1.3 KB
50.8 KB
中文
更新内容
/fork现在会将你的对话复制成一个新的后台会话(在claude agents中显示为独立行),而你可以在前台继续工作;它原来启动的会话内子代理现已改为/subtask命令- 新增了
claude auto-mode reset命令,用于恢复默认的自动模式配置,并带有确认提示(可通过--yes跳过) - 新增了会话级 WebSearch 工具调用次数限制(默认 200 次,可通过
CLAUDE_CODE_MAX_WEB_SEARCHES_PER_SESSION调整),以防止搜索死循环 - 新增了每会话子代理生成数量上限(默认 200,可通过
CLAUDE_CODE_MAX_SUBAGENTS_PER_SESSION覆盖),以防止无限委派循环;/clear可重置该配额 - 运行超过 2 分钟的 MCP 工具调用现在会自动转入后台,以保持会话的可用性;可通过
CLAUDE_CODE_MCP_AUTO_BACKGROUND_MS配置阈值或禁用此行为 - 在代理视图中输入
/resume现在会打开一个历史会话选择器(包含已从列表中删除的会话),并将你选择的会话作为后台会话恢复 - 修复了计划模式自动运行修改文件的 Bash 命令(如
touch、rm)时,未经权限提示或 SDKcanUseTool回调的问题 - 修复了工作树创建会跟随仓库中提交的
.claude/worktrees符号链接,可能导致文件在仓库之外创建的问题 - 修复了当工具失败或在流式传输中途完成时,
continue:false钩子的停止操作会被丢弃,以及钩子基础设施错误被误报为用户拒绝的问题 - 修复了在打印/SDK 模式下,运行中的 Bash 工具收到 SIGTERM 时,命令的进程树成为孤儿;现在 CLI 会中止当前回合,终止进程树并以 143 退出
- 修复了在 Windows 上,当组策略阻止 PowerShell 5.1 时,
/background和claude --bg失败并显示“EUNKNOWN: unknown error, uv_spawn”的问题;守护进程现在会优先使用 PowerShell 7 - 修复了在路径自动补全弹出窗口打开时,shell 模式(
!)无法执行包含文件路径的命令的问题 - 修复了自动模式拒绝通知在长拒绝原因被截断时(恰好截断在 emoji 中间)显示乱码的问题
- 修复了在支持扩展按键报告的终端上,代理视图的派发输入框中 Ctrl+J 无法插入换行符的问题,并在
?帮助覆盖层中显示了换行快捷键 - 修复了
/ultrareview拒绝#123、PR 123和粘贴的 PR URL 等 PR 引用的问题;错误提示现在会指明你实际输入的命令名 - 修复了
/ultrareview <branch>在远程存在该分支时,未从 origin 抓取分支的问题;现在在输入错误时会建议最接近的分支名称 - 修复了
/ultrareview在/clear后的新对话中跳过计费确认的问题 - 修复了在 Claude Desktop 上
/ultrareview报错“not a git repository”时,现在会建议项目的仓库文件夹而非终端命令 - 修复了托管(host-managed)会话在仓库设置配置了 mTLS 证书、额外 CA 包或 OAuth 作用域时启动失败的问题;这些传输设置现在会被忽略并给出警告
- 修复了在恢复会话之前,编辑以 offset/limit 方式读取过的文件时,出现虚假的“File has not been read yet”错误的问题
- 修复了在打印/SDK 模式下,使用
--continue/--resume恢复会话后,ExitWorktree失败并提示“no active EnterWorktree session”的问题 - 修复了远程控制客户端在会话中途加入时,工作流代理网格一直为空的问题
- 修复了流式模式下的控制请求在其处理程序完成之前被标记为完成的问题,这可能导致会话重启时请求丢失
- 修复了通过
/fork创建的后台会话在状态写入失败后失去实时父级保护的问题 - 修复了从代理视图重新打开已停止的后台会话时静默失败的问题——现在会恢复该会话,或显示无法恢复的原因,并允许你强制重启
- 修复了智能体团队问题:当团队初始化在会话内重新运行时,正在停止的队友可能会向领导者发送重复的空闲通知
- 修复了文件路径较长时,计划批准对话框页脚将“ctrl+g to edit in ”拆分成两行的问题
- 修复了全屏模式下,终端同时调整宽度和高度后,欢迎横幅保持旧面板宽度的问题
- 修复了在窄布局中差异预览丢失行号和 +/- 标记的问题
- 修复了部分文件读取后 @ 提及附加内容为空、插件卸载指向错误的商店,以及退出码 143 时误报“Command timed out”的问题
- 修复了 OpenTelemetry HTTP 导出被 Azure Monitor 和其他不接受分块传输编码的端点以 411/400 拒绝的问题
- 修复了在 SDK/无头模式下设置
TRACEPARENT时,OTLP 事件日志记录缺少trace_id/span_id的问题 - 修复了包含大量图像的对话错误地因“Request too large”失败的问题,并改进了错误消息以说明实际原因
- 修复了当 API 过载时,网络搜索和网页抓取将“API Error”文本作为搜索结果或页面内容返回的问题
- 改进了网络搜索和网页抓取的可靠性:对 529 错误和速率限制请求进行有界退避重试
- 改进了提示缓存:对话中的系统消息块现在可在 LLM 网关和自定义基础 URL(Bedrock、Vertex、1P)后正常工作
- 改进了后台代理附加:冷附加现在会在会话启动时立即显示格式化记录,而不是空白等待
- 减少了代理间消息的令牌使用:
SendMessage消息体不再重复插入到重放的历史记录和工具结果中 - 更改了
/fork行为:当会话没有标题时,会根据你的提示词命名副本,以便在代理视图中识别该行 - 更改了直接输入
/btw的行为:现在会重新打开你最近一次交流的侧边提问面板,以便浏览之前的回答 - 更改了页脚提示
←:当后台代理完成且无需你输入时,会短暂显示脉冲效果“N done” - 已弃用 Task 工具的
mode参数(现在被忽略);子代理默认继承父会话的权限模式 - 修改了企业版
forceLoginMethod的强制执行范围:现在对 VS Code 扩展、SDK、setup-token和install-github-app登录也生效,而不仅限于终端 - 会话记录现在会在每条助手消息上记录推理工作量级别
- 无头/SDK 会话现在会在回合中间应用
set_model控制请求;接下来的模型往返会使用新模型,而不是等待下一个回合 - 代理视图 /
claude agents --json:等待沙箱、MCP 输入或托管设置提示的会话现在显示为“Needs input”而不是“Working” - 将认证状态面板标题从“Cloud authentication”更新为“Authentication”
- 更正了早期版本说明(2.1.200):tmux 3.6 系列不支持同步输出;支持该功能的新版 tmux 会被自动检测
English / 原文
Compare
Sorry, something went wrong.
No results found
What's changed
/forknow copies your conversation into a new background session (its own row inclaude agents) while you keep working; the in-session subagent it used to launch is now/subtask- Added
claude auto-mode resetto restore the default auto-mode configuration, with a confirmation prompt (pass--yesto skip) - Added a session-wide limit on WebSearch tool calls (default 200, tunable via
CLAUDE_CODE_MAX_WEB_SEARCHES_PER_SESSION) to stop runaway search loops - Added a per-session cap on subagent spawns (default 200, override with
CLAUDE_CODE_MAX_SUBAGENTS_PER_SESSION) to stop runaway delegation loops;/clearresets the budget - MCP tool calls running longer than 2 minutes now move to the background automatically so the session stays usable; configure the threshold or disable with
CLAUDE_CODE_MCP_AUTO_BACKGROUND_MS - Typing
/resumein the agent view now opens a picker of past sessions — including sessions deleted from the list — and resumes your pick as a background session - Fixed plan mode auto-running file-modifying Bash commands (e.g.
touch,rm) without a permission prompt or SDKcanUseToolcallback - Fixed worktree creation following a repository-committed symlink at
.claude/worktrees, which could create files outside the repository - Fixed a
continue:falsehook's halt being dropped when the tool fails or completes mid-stream, and hook infrastructure errors being misreported as user rejections - Fixed SIGTERM during a running Bash tool orphaning the command's process tree in print/SDK mode; the CLI now aborts the turn, kills the tree, and exits 143
- Fixed
/backgroundandclaude --bgfailing with "EUNKNOWN: unknown error, uv_spawn" on Windows when Group Policy blocks PowerShell 5.1; the daemon now prefers PowerShell 7 - Fixed shell mode (
!) not executing commands containing file paths while the path autocomplete popup was open - Fixed auto-mode denial notifications rendering broken characters when a long denial reason was truncated mid-emoji
- Fixed Ctrl+J not inserting a newline in the agent view dispatch input on terminals with extended key reporting, and surfaced the newline shortcut in the
?help overlay - Fixed
/ultrareviewrejecting PR references like#123,PR 123, and pasted PR URLs; error hints now name the command you actually typed - Fixed
/ultrareview <branch>not fetching the branch from origin when it exists remotely; it now suggests the closest branch name on typos - Fixed
/ultrareviewskipping the billing confirmation in a new conversation after/clear - Fixed
/ultrareview's "not a git repository" error on Claude Desktop now suggesting the project's repository folder instead of terminal commands - Fixed hosted (host-managed) sessions failing at startup when repository settings configured mTLS certs, extra CA bundles, or OAuth scopes; these transport settings are now ignored with a warning
- Fixed a spurious "File has not been read yet" error when editing a file that had been read with offset/limit before resuming a session
- Fixed
ExitWorktreefailing with "no active EnterWorktree session" after resuming a session with--continue/--resumein print/SDK mode - Fixed the workflow agent grid staying empty for Remote Control clients that join a session mid-run
- Fixed streaming-mode control requests being marked complete before their handler finished, which could lose the request on session restart
- Fixed background sessions created with
/forklosing their live-parent protection after a state write failure - Fixed reopening a stopped background session from the agent view failing silently — it now resumes the session, or shows why it can't and lets you force a restart
- Fixed agent teams: a stopping teammate could send the leader duplicate idle notifications when team initialization re-ran within a session
- Fixed the plan-approval dialog footer splitting "ctrl+g to edit in " apart when the file path is long
- Fixed the welcome banner keeping its old panel widths after a combined width+height terminal resize in fullscreen mode
- Fixed diff previews losing their line numbers and +/- markers in narrow layouts
- Fixed @-mentions attaching nothing after a partial file read, plugin uninstall targeting the wrong marketplace, and false "Command timed out" on exit code 143
- Fixed OpenTelemetry HTTP exports being rejected with 411/400 by Azure Monitor and other endpoints that don't accept chunked transfer encoding
- Fixed OTLP event log records missing
trace_id/span_idwhenTRACEPARENTis set in SDK/headless mode - Fixed conversations with many images incorrectly failing with "Request too large" errors, and improved the error message to explain the actual cause
- Fixed web search and web fetch returning "API Error" text as search results or page content when the API was overloaded
- Improved web search and web fetch reliability by retrying 529 errors and rate-limited requests with bounded backoff
- Improved prompt caching: the mid-conversation system block now works behind LLM gateways and custom base URLs (Bedrock, Vertex, 1P)
- Improved background agent attach: cold-attaching now instantly shows the formatted transcript while the session boots, instead of a blank wait
- Reduced token usage in inter-agent messaging:
SendMessagebodies are no longer duplicated into replayed history and tool results - Changed
/forkto name the copy after your prompt when the session has no title, so the row is recognizable in the agent view - Changed bare
/btwto reopen the side-question panel on your most recent exchange so you can browse earlier answers - Changed the
←footer hint to pulseN donefor a moment when a background agent finishes while nothing needs your input - Deprecated the Task tool's
modeparameter (now ignored); subagents inherit the parent session's permission mode by default - Changed Enterprise
forceLoginMethodto be enforced for VS Code extension, SDK,setup-token, andinstall-github-applogins, not just the terminal - Changed session transcripts to record the reasoning effort level on each assistant message
- Changed headless/SDK sessions to apply a
set_modelcontrol request mid-turn; the next model round-trip uses the new model instead of waiting for the next turn - Changed agent view /
claude agents --json: sessions waiting on a sandbox, MCP-input, or managed-settings prompt now show as "Needs input" instead of "Working" - Updated the auth status panel title from "Cloud authentication" to "Authentication"
- Corrected an earlier release note (2.1.200): tmux through the 3.6 series lacks synchronized output; newer tmux with support is detected automatically
You can’t perform that action at this time.