Claude Code v2.1.221:Focus 视图与 Linux 凭证掩码

v2.1.221

精选理由

Claude Code 这版修了 zsh 权限绕过和 MCP 连接坑,VS Code 用户建议升级。

AI 摘要

Claude Code v2.1.221 在 VS Code 端新增 Focus 视图,能把工具活动折叠成逐轮摘要,并显示实时运行中的工具指示器,可用 Ctrl+Alt+F 切换。Linux 和 WSL 下新增 mask 沙箱凭证模式,命令只读取哨兵副本,出站时由代理替换真实值。修复了 zsh 在 [[ ]] 正则条件中执行隐藏命令、绕过 Bash 工具权限检查的问题,受影响命令会重新请求授权。还修复了 Windows 路径含引号时 PowerShell 权限判断错误、--mcp-config 在 -p 模式首轮前未连接、WebSearch 在高 effort 下关闭思考时返回 400 等多项缺陷。Vim 模式下 yank 寄存器不再因对话框、历史搜索和 transcript 视图被清空。

原文 · Claude Code: GitHub Releases

v2.1.221

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

Claude Code v2.1.221:Focus 视图与 Linux 凭证掩码 · AI 热点