# Claude Code v2.1.221 发布：新增 Focus view、沙箱凭据掩码与多项修复

- 来源：Claude Code：GitHub Releases（RSS）
- 作者：ashwin-ant
- 发布时间：2026-08-04 08:14
- AIHOT 分数：50
- AIHOT 链接：https://aihot.virxact.com/items/cmsdy1orw04vsro2ei0n026gl
- 原文链接：https://github.com/anthropics/claude-code/releases/tag/v2.1.221

## AI 摘要

Claude Code v2.1.221 发布，为 VSCode 新增 Focus view 聊天菜单开关，可隐藏工具活动并显示实时运行指示器。新增 Linux/WSL 沙箱凭据文件 "mask" 模式，并修复 zsh 隐藏命令执行、PowerShell 路径引号处理等多项权限检查绕过问题。同时改进 Vertex AI 工具搜索、自动模式权限检查缓存效率，并降低提示词缓存成本。

## 正文

What's changed

[VSCode] Added Focus view: a chat-menu toggle that hides tool activity behind an expandable per-turn summary with a live running-tool indicator, toggled with Ctrl+Alt+F or the "Claude Code: Toggle Focus view" command

Added mode: "mask" for sandbox credential files on Linux and WSL — sandboxed commands read a sentinel copy (the whole file, or just the spans captured by an extract regex) while the sandbox proxy substitutes the real value on egress; on macOS file masking falls back to deny

Added warnings to claude plugin validate when a marketplace or plugin name would be rejected by Claude Desktop's managed marketplace sync

Added a prompt-audit subcommand to the claude-api skill for auditing prompts and tool descriptions for patterns written for older models

Fixed a Bash tool permission-check bypass where zsh could execute hidden commands in [[ ]] regex conditionals; affected commands now prompt for permission

Fixed PowerShell permission checks mishandling paths containing quote characters on Windows; such paths now prompt for approval

Fixed the thinking toggle having no effect for the rest of a session that started with thinking off; disabling an MCP server mid-connect no longer silently reverts

Fixed MCP servers from --mcp-config not being connected before the first turn in print mode (-p), which made the model emit tool calls as literal text

Fixed @-mentioned files being silently dropped when pressing Esc to retract a prompt and resubmitting it

Fixed a crash when preparing API requests for SDK MCP tools named after built-in object properties such as constructor

Fixed WebSearch failing with a 400 error at effort xhigh/max when thinking is disabled

Fixed sandboxed large uploads failing with TLS errors through the sandbox proxy

Fixed Team and Enterprise spend-limit message incorrectly blaming the org's monthly limit instead of your individual spend limit

Fixed Bedrock authentication with AWS SSO named profiles failing in desktop-managed sessions on Windows machines that set a stray HOME environment variable

Fixed CLAUDE_CODE_RESUME_INTERRUPTED_TURN=0 not disabling interrupted-turn auto-resume; falsy values are now honored

Fixed a rare wake-from-sleep race where two Claude Code processes could both refresh the same MCP connector or WIF OAuth token at once, forcing re-authentication

Fixed renaming a session from Claude Code Desktop or claude.ai not updating the CLI's session name; session names from every rename surface are now sanitized

Fixed plugin- and org-delivered skills named after terminal-only built-ins (e.g. /help, /feedback) being un-invocable in non-interactive sessions

Fixed the "Plugins changed" notification lingering after plugins were reloaded instead of clearing

Fixed Vim mode: the yank register now survives dialogs, history search, and the transcript view instead of being silently emptied

Fixed Vim mode: undoing back to an empty prompt now arms the "press ← again" confirm before returning to the agent view

Improved tool search on Google Vertex AI: re-enabled for Claude 4.5-generation and newer models

Improved auto mode: permission checks for parallel tool calls are now cache-efficient, and switching modes while a check is pending reliably prompts instead of applying the stale result

Reduced prompt-cache costs for auto-mode permission checks by reusing the cached conversation prefix across decisions

Improved Stats panel to count cache tokens in its token totals, with a breakdown by input, output, cache read, and cache write

Improved /ultrareview error messages when a repo shares no history with its base: a checkout with no branches is now refused up front with advice to create one, and refusal hints no longer suggest git fetch --unshallow on clones that are already complete

Improved Windows startup: process creation times are now read via a native kernel32 call instead of spawning PowerShell, so endpoint security tools that gate powershell.exe no longer prompt

Changed background sessions to commit and push to preserve work, open a draft PR only when the task calls for one, follow your CLAUDE.md git instructions, and always end by reporting where the work lives

Changed /plugin install to refresh a stale marketplace catalog and retry before reporting a plugin not found

Changed plugins installed from /plugin to activate immediately when safe, instead of always requiring /reload-plugins

Changed plugins to accept "." as a skills path, and the root-level SKILL.md validation error now suggests using the plugin root

Changed /status to show the session kind: interactive, or a background job that is attached or unattended

Changed emoji autocomplete to accept common alternate shortcodes like :thumbsup:, :thumbsdown:, and :love:

Changed sessions forked with /fork to create a new worktree of their own instead of working in the original session's checkout

Changed Claude in Chrome to close the browser tabs it opens once it no longer needs them

Changed fast mode to report on the stream when usage credits run out mid-session, instead of failing silently

Changed Monitor: a watch that exits without producing any output now says so instead of reporting "stream ended"

Changed the Gateway model field validation: non-string values are rejected with a 400 instead of being forwarded

Removed the repeated "Permission mode changed while the auto-mode classifier call was queued" notice from approval prompts
