Claude Code v2.1.221: Focus View in VS Code, Sandbox Credential Masking, and Background Sessions That Commit and Push
Claude Code v2.1.221 adds a VS Code Focus view and sandbox credential masking on Linux and WSL, has background sessions commit and push their work, gives /fork its own worktree, and fixes permission-check issues.
Claude Code v2.1.221 is a broad release with 39 changelog entries. It adds a Focus view to the VS Code extension and credential-file masking for the sandbox on Linux and WSL, changes how background sessions and /fork handle git work, and makes plugins easier to install and validate. It also fixes a Bash permission-check bypass in zsh and PowerShell permission handling on Windows, along with MCP, session, and Vim mode issues.
What’s New
Focus View in VS Code
The VS Code extension adds a Focus view: a chat-menu toggle that hides tool activity behind an expandable per-turn summary with a live running-tool indicator. Toggle it with Ctrl+Alt+F or the “Claude Code: Toggle Focus view” command.
Credential File Masking in the Sandbox
Sandbox credential files now support mode: "mask" 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.
Background Sessions Commit and Push Their Work
Background sessions now 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.
/fork Gets Its Own Worktree
Sessions forked with /fork now create a new worktree of their own instead of working in the original session’s checkout.
Smoother Plugin Installs
Plugins installed from /plugin now activate immediately when safe, instead of always requiring /reload-plugins, and /plugin install refreshes a stale marketplace catalog and retries before reporting a plugin not found. Plugins also accept "." as a skills path, with the root-level SKILL.md validation error now suggesting the plugin root. claude plugin validate warns when a marketplace or plugin name would be rejected by Claude Desktop’s managed marketplace sync.
prompt-audit for the claude-api Skill
The claude-api skill gains a prompt-audit subcommand for auditing prompts and tool descriptions for patterns written for older models.
Fixes and Improvements
Permissions and security
- A Bash tool permission-check bypass, where zsh could execute hidden commands in
[[ ]]regex conditionals, is fixed; affected commands now prompt for permission. - On Windows, PowerShell permission checks no longer mishandle paths containing quote characters; such paths now prompt for approval.
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.
- Prompt-cache costs for auto-mode permission checks are reduced by reusing the cached conversation prefix across decisions.
MCP and print mode
- MCP servers from
--mcp-configare now connected before the first turn in print mode (-p); previously the model could emit tool calls as literal text.
Sessions and input
- The thinking toggle now takes effect for the rest of a session that started with thinking off, and disabling an MCP server mid-connect no longer silently reverts.
- @-mentioned files are no longer silently dropped when you press Esc to retract a prompt and resubmit it.
CLAUDE_CODE_RESUME_INTERRUPTED_TURN=0now disables interrupted-turn auto-resume; falsy values are honored.- Renaming a session from Claude Code Desktop or claude.ai now updates the CLI’s session name, and session names from every rename surface are sanitized.
/statusnow shows the session kind:interactive, or a background job that isattachedorunattended.
Tools and models
- WebSearch no longer fails with a 400 error at effort
xhigh/maxwhen thinking is disabled. - Tool search on Google Vertex AI is re-enabled for Claude 4.5-generation and newer models.
- Fast mode now reports on the stream when usage credits run out mid-session, instead of failing silently.
- Claude in Chrome now closes the browser tabs it opens once it no longer needs them.
Sandbox, Windows, and Bedrock
- Sandboxed large uploads no longer fail with TLS errors through the sandbox proxy.
- Windows startup now reads process creation times via a native kernel32 call instead of spawning PowerShell, so endpoint security tools that gate
powershell.exeno longer prompt. - Bedrock authentication with AWS SSO named profiles no longer fails in desktop-managed sessions on Windows machines that set a stray
HOMEenvironment variable.
Vim mode
- The yank register now survives dialogs, history search, and the transcript view, and undoing back to an empty prompt now arms the “press ← again” confirm before returning to the agent view.
Stats
- The Stats panel now counts cache tokens in its token totals, with a breakdown by input, output, cache read, and cache write.
This release contains 39 changes in total; see the Claude Code changelog for the complete list.
How to Update
- Check your installed version:
claude --version - Update in place:
claude update - Background sessions now commit and push to preserve work and follow your CLAUDE.md git instructions, so review those instructions if you use background sessions.