---
title: "Claude Code v2.1.211 发布：多项修复与改进"
source: "Claude Code：GitHub Releases（RSS）"
source_tier: "t1_5"
url: "https://github.com/anthropics/claude-code/releases/tag/v2.1.211"
permalink: "https://feed.astralor.com/items/itm_ced8cc7595bcd673faf17c5d"
published: "2026-07-15T23:02:35.000Z"
score: 86
channel: "ai"
tags: ["Anthropic","Claude Code","代码生成工具","安全性更新","版本发布"]
---

# Claude Code v2.1.211 发布：多项修复与改进

## AI 点评

> 作为一个经常使用 Claude Code 进行自动化编码的开发者，我特别关注这次的安全修复，尤其是权限预览字符绕过和自动模式覆盖钩子决策的问题——这些直接关系到团队协作时的安全边界。后台代理报告的改进也让长时间运行的任务更可靠。建议所有使用者尽快升级。

## 速览

Anthropic 发布了 Claude Code v2.1.211，新增 --forward-subagent-text 标志以在流式 JSON 中包含子代理文本与思考过程。修复了多项安全漏洞，包括权限预览字符绕过、自动模式覆盖钩子决策、并行会话登出等问题。改进了后台代理报告、终端布局性能、内存索引警告等。更新了文档链接和环境变量支持科学记数法。此次更新增强了工具的可靠性与安全性，尤其对团队协作和自动化工作流有重要影响。

## 关键点

- 新增 --forward-subagent-text 标志和 CLAUDE_CODE_FORWARD_SUBAGENT_TEXT 环境变量，支持在流式 JSON 中查看子代理文本
- 修复了权限预览中字符绕过、自动模式覆盖钩子决策等多个安全漏洞
- 改进了后台代理结果报告，Claude 现在等待真实完成而非伪造结果
- 修复了多个平台（Vertex、Bedrock等）的集成问题以及并行会话、文件上传等稳定性问题

## 全文

What's changed Added --forward-subagent-text flag and CLAUDE_CODE_FORWARD_SUBAGENT_TEXT environment 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 ask decision for unsandboxed Bash — a hook ask now 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/*.md files 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 /loop hiding the session from /resume after a single use Fixed screen reader users losing the audible terminal bell after /terminal-setup or 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 agents jobs becoming permanently undeletable when git no longer recognizes their worktree — the row now shows why the delete was refused instead of silently reappearing Fixed /clear not 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 1e6 and 64_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-credits to ask for confirmation before sending a request to organization admins Changed Vim mode s and S (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_disk on 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.

---

引用前请核对原文;本文由星际流动整理:https://feed.astralor.com/items/itm_ced8cc7595bcd673faf17c5d
