Claude Code v2.1.211 发布
英文标题:Claude Code v2.1.211
Claude Code v2.1.211 带来了多项开发体验与稳定性提升。新增 `--forward-subagent-text` 选项和环境变量,可将子代理上下文流式输出到 JSON。修复了权限预览中的Unicode欺骗字符、后台会话唤醒、并行会话登出、MCP 重连失败等关键缺陷,并改进了终端性能与 VSCode 集成。此次更新显著增强了 Agent 流程的可观测性与跨平台可靠性。
打开原文相关 7.2 · 机会 2
1.3 KB
51.8 KB
中文
比较
更新内容
- 新增
--forward-subagent-text标志及CLAUDE_CODE_FORWARD_SUBAGENT_TEXT环境变量,可在 stream-json 输出中包含子代理的文本和思考内容 - 修复了发送到聊天频道的权限预览未消除双向覆写、零宽度及仿冒引号字符的问题,使工具输入无法在视觉上篡改审批消息
- 修复了自动模式会覆盖
PreToolUse钩子对未沙箱化 Bash 发出的ask决定的问题——现在钩子的ask会将决策降级为至少弹出提示 - 修复了多个并行 Claude Code 会话在从睡眠唤醒后因共享同一凭据存储而同时登出的问题
- 修复了插件 MCP 服务器在闲置 Web 会话唤醒后无法重新连接,导致 MCP 调用持续失败直至下一条消息的问题
- 修复了 Claude Code 在 Vertex 与 Bedrock 上启动时尝试默认 Opus 模型,且在已显式配置模型时仍打印多余回退通知的问题
- 修复了以显式模型覆盖生成的子代理在恢复或收到后续消息后回退到父模型的问题
- 修复了嵌套
.claude/rules/*.md文件即使在设置源已排除项目设置时仍被加载的问题 - 修复了文件上传校验:现在允许文件名以 DOS 设备后缀(
.prn)或尾部加点结尾,同时拒绝具有多个硬链接的文件 - 修复了从远程和 CLI 会话在 Chrome 版 Claude 中上传文件的问题
- 修复了将输入编辑为 “?” 后被静默丢弃并切换快捷面板的问题
- 修复了启用 Chrome 版 Claude 扩展但 Chrome 未运行时启动挂起的问题
- 修复了异步内容(设置标签页、统计、差异视图及其他加载中状态)出现 300 毫秒延迟显示的问题
- 修复了在代理视图中重新打开刚停止的后台会话时,在同会话 ID 下创建空白对话的问题
- 修复了
/loop使用一次后即从/resume中隐藏会话的问题 - 修复了屏幕阅读器用户在
/terminal-setup或首次终端设置后丢失可听终端响铃的问题 - 修复了使用 LLM 网关认证(
ANTHROPIC_AUTH_TOKEN+ANTHROPIC_BASE_URL)的后台作业在守护进程重新生成后返回“未登录”的问题 - 修复了当 git 不再识别其工作树时,
claude agents作业变为永久不可删除的问题——现在行内会显示拒绝删除的原因,而非静默重新出现 - 修复了
/clear未重置会话费用计数器的问题——执行/clear后状态栏费用现在从 $0 开始 - 修复了 Windows 上 Chrome 版 Claude 的设置页面无法在浏览器中打开的问题
- 修复了 Windows 上头无头打印模式会话在 stdin 不可读时崩溃或静默退出的问题
- 修复了代理视图的后台会话标题在提示包含链接时显示模型命名拒绝文本的问题
- 修复了被用户终止的后台代理自动重新生成,以及恢复的代理重新运行旧会话中的陈旧提示的问题
- 修复了无计划的例程报告下一次运行时间为公元 1 年的问题
- 加强了 Windows 上同步技能/插件目录的命名,并确保
/clear后 CCR Web 获取/搜索代理持续可用 - 改进了终端布局与渲染性能
- 改进了后台代理结果报告——Claude 现在报告仍在运行的代理状态,并等待真实完成,而非编造结果
- 改进了内存索引超限警告,仅统计加载的内容,排除前置元数据和 HTML 注释
- 更新整数型环境变量(超时、令牌预算、重试次数)以支持科学记数法和数字分隔符写法,如
1e6和64_000 - 更新文档链接至当前文档站点
- 将“始终允许”权限规则改为保存在仓库根目录,使在 git 工作树中授予的批准可在会话和工作树间持久保留
- 修改
/usage-credits为在向组织管理员发送请求前要求确认 - 修改 Vim 模式下的
s和S(替换字符/行)使其在 NORMAL 模式中可用,与 Vim 行为一致 - [VSCode] 更新了远程控制横幅以说明其功能
- Chrome 版 Claude:强化了文件上传路径验证
- Chrome 版 Claude:截图操作中的
save_to_disk现在会将图像写入磁盘并返回路径;此前该操作无效 - 修复了 Bedrock、Vertex、Mantle 和 Foundry 上提示缓存回归问题,该问题曾在每次请求时将尾随系统上下文块按新鲜输入令牌计费
English / 原文
Compare
Sorry, something went wrong.
No results found
What's changed
- Added
--forward-subagent-textflag andCLAUDE_CODE_FORWARD_SUBAGENT_TEXTenvironment variable to include subagent text and thinking in stream-json output - Fixed permission previews relayed to chat channels not neutralizing bidirectional-override, zero-width, and look-alike quote characters, so tool inputs cannot visually alter the approval message
- Fixed auto mode overriding a PreToolUse hook's
askdecision for unsandboxed Bash — a hookasknow floors the decision at a prompt - Fixed parallel Claude Code sessions all logging out simultaneously after wake-from-sleep when many sessions share one credential store
- Fixed plugin MCP servers not reconnecting after an idle web session woke, leaving MCP calls failing until the next message
- Fixed Claude Code on Vertex and Bedrock attempting the default Opus model at startup and printing a spurious fallback notice when a model is explicitly configured
- Fixed subagents spawned with an explicit model override reverting to the parent's model when resumed or sent a follow-up message
- Fixed nested
.claude/rules/*.mdfiles loading even when setting sources exclude project settings - Fixed file upload validation: filenames ending in a DOS device suffix (
.prn) or trailing dot are now accepted, and files with multiple hard links are refused - Fixed file uploads to Claude in Chrome from remote and CLI sessions
- Fixed edits that leave the input as "?" being silently swallowed and toggling the shortcuts panel
- Fixed a startup hang when the Claude in Chrome extension is enabled but Chrome is not running
- Fixed a 300ms delay revealing async content (Settings tabs, Stats, diff views, and other loading states)
- Fixed reopening a just-stopped background session from the agents view starting a blank conversation under the same session id
- Fixed
/loophiding the session from/resumeafter a single use - Fixed screen reader users losing the audible terminal bell after
/terminal-setupor onboarding terminal setup - Fixed background jobs on LLM gateway auth (
ANTHROPIC_AUTH_TOKEN+ANTHROPIC_BASE_URL) coming back "Not logged in" after the daemon respawns them - Fixed
claude agentsjobs becoming permanently undeletable when git no longer recognizes their worktree — the row now shows why the delete was refused instead of silently reappearing - Fixed
/clearnot resetting the session cost counter — the statusline's cost now starts at $0 after/clear - Fixed Claude in Chrome setup pages failing to open in the browser on Windows
- Fixed headless print-mode sessions on Windows crashing or silently exiting when stdin is unreadable
- Fixed background session titles in the agents view showing the naming model's refusal text when the prompt contains a link
- Fixed background agents killed by the user auto-respawning, and revived agents re-running stale prompts from old sessions
- Fixed routines with no schedule reporting a next run time in the year 1
- Hardened synced skill/plugin directory naming on Windows and kept CCR web fetch/search proxies working after
/clear - Improved terminal layout and rendering performance
- Improved background agent result reporting — Claude now reports the status of still-running agents and waits for the real completion instead of fabricating results
- Improved the memory index over-limit warning to measure only loaded content, excluding frontmatter and HTML comments
- Updated integer environment variables (timeouts, token budgets, retry counts) to accept scientific notation and digit-separator spellings like
1e6and64_000 - Updated documentation links to the current docs sites
- Changed "always allow" permission rules to save at the repository root, so approvals granted in a git worktree persist across sessions and worktrees
- Changed
/usage-creditsto ask for confirmation before sending a request to organization admins - Changed Vim mode
sandS(substitute char/line) to work in NORMAL mode, matching vim behavior - [VSCode] Updated the Remote Control banner to describe what it does
- Claude in Chrome: hardened file-upload path validation
- Claude in Chrome:
save_to_diskon screenshot actions now writes the image to disk and returns the path; previously it did nothing - Fixed a prompt-caching regression on Bedrock, Vertex, Mantle, and Foundry that billed the trailing system context block as fresh input tokens on every request.
You can’t perform that action at this time.