1. 2.1.328 Next
  2. 2.1.327 This release
  3. 2.1.326 Previous

Claude Code 2.1.327: the sandbox tightens further, worktrees now ask before removal

Version 2.1.327 tightens permissions and the sandbox again, makes worktree removal ask for confirmation, and speeds up the first Bash command at the cost of running shell startup files before you approve.

2.1.333 has shipped since, on December 1. Read 2.1.333

published
reading
4 min

Written by a Claude routine from the official changelog, checked by a script.

Claude Code 2.1.327, released on November 17, 2026, ships nine additions, around forty changes, twenty-six improvements, and a hundred bug fixes. The thread running through the last few releases continues: permissions and the sandbox keep tightening, across bypass mode, auto mode, and Bash commands that touch a path outside the working directory. Two more concrete changes join the list: removing a worktree now asks for confirmation, and a session's first Bash command starts faster, but by letting the shell's own startup files run before you've answered.

The sandbox and permissions tighten on several fronts

The permissions.blockReadsOutsideWorkingDirectories setting already strips sandboxed commands of read access to your home directory and other personal folders when it's on, as the sandboxing docs describe. 2.1.327 extends it: it now asks about more Bash commands in both bypass and auto mode, and outright denies some of them in auto mode instead of just asking. A second change tightens the same setting: a command naming a path covered by a Read or Edit deny rule used to just prompt again; now it's refused outright. Separately, what counts as "inside the working directory" was redefined, which means some paths that used to pass through without friction now trigger a permission prompt, and path checks now refuse some symbolic links outright, extending what the sandboxing docs already describe for denied paths reached through a symlink.

Auto mode changes too. The permission modes docs explain that entering auto mode already drops overly broad allow rules, including package-manager run commands, letting the safety classifier decide instead. 2.1.327 widens that list to more rules that run any package, like Bash(pnpm dlx *), and to full-path or versioned forms of rules it already dropped, such as /usr/bin/npm run:*. If you'd written a rule like that specifically to skip prompts in auto mode, it no longer applies: the classifier decides every time now. Auto mode's notice about falling back to billed classifier requests also now warns that an upcoming release removes that fallback: each action it would have checked will then be asked about or denied.

Worktrees now ask for confirmation before removal

The worktrees docs already describe what happens when you exit an interactive worktree session: a clean worktree from an unnamed session is removed automatically, while a worktree holding work, or one from a named session, prompts you to keep or remove it. 2.1.327 extends that safeguard to the ExitWorktree tool, the one Claude calls to leave a worktree mid-session: it now asks before removing a worktree that may hold unsaved work, and the removal is refused in dontAsk mode or when nobody is around to answer, unless an allow rule, auto mode, or bypass permissions mode allows it. In practice, a scheduled task or an automated session that relied on ExitWorktree to clean up after itself will now have the removal refused, and the worktree will stay on disk.

The first Bash command starts faster, but your shell's startup files run before approval

One improvement is worth a close read. To speed up a session's first Bash command, shell startup files, .bashrc, .zshrc, and the like, can now run before that command is approved, even if you end up refusing it. The changelog frames this purely as a speed win, and it is one: the wait before the first command disappears. But the usual assumption, that refusing a command means nothing happened, no longer quite holds: your shell's own startup file may have run regardless of your answer. To get the old behavior back, set CLAUDE_CODE_DISABLE_SHELL_HEAD_START=1. If your shell startup files do more than set aliases and environment variables, this is a good moment to check exactly what.

The rest that matters

A handful of smaller changes close real gaps. claude mcp add --scope project now stops instead of overwriting .mcp.json when that file lists its servers at the top level with no mcpServers key. /export now asks before overwriting an existing file, instead of doing it silently. The PowerShell tool asks for confirmation before one more command, even under a rule that names it explicitly. Claude in Chrome now refuses to upload some credential files to a page; attach those yourself if you need to. And on commits, Claude is now explicitly told not to commit a file that looks like it holds secrets, on newer models and under PowerShell. On the diagnostics side, /status now lists broken agent, skill, command, and output-style files, keybinding errors, an unavailable sandbox, ignored permission settings, and hook matchers that never match anything, which makes it easier to spot a config that's quietly drifted.

Among the hundred bug fixes, one touches trust in the Stop button directly: a command you'd approved could keep running after you pressed Stop, when the approval arrived after a restart, in cloud sessions or on a self-hosted runner with no feature flags loaded. Three others fix data deletion: stopping the Remote Control server in worktree mode deleted a running session's git-ignored files, such as .env; a self-hosted runner started with --use-anthropic-git-proxy deleted a non-empty directory named by GIT_CONFIG_GLOBAL at startup; and claude mcp add or claude mcp remove with project scope deleted other top-level keys from .mcp.json, such as $schema. The rest, login, VS Code, and terminal display, is mostly polish that won't change how you work.

Previous release: 2.1.326, November 17.

Next release: 2.1.328, November 19.

This digest is written by a Claude routine from the official Claude Code changelog, then checked by a script and a full build before it goes live. How that works: Claude Routines, the complete guide. Claude Hub is published by Pierre Rondeau.

Back to top

The Claude Hub newsletter

One email a week: new guides and the week's articles. Unsubscribe in one click.