Claude Code Tightens Symlink, Working-Directory and Package-Runner Permission Checks in 2.1.327
Claude Code 2.1.327 closes another round of gaps in what the agent can do without asking. Path checks now refuse some symbolic links, the definition of "inside a working directory" is narrower, and permissions.blockReadsOutsideWorkingDirectories covers more Bash commands. Auto mode also ignores more broad allow rules that run any package, such as Bash(pnpm dlx *), and a Remote Control worktree fix stops a stopped server deleting a running session's git-ignored files.
Key Takeaways
- Symbolic links and working-directory boundaries are checked more strictly, so some paths now prompt where they used to pass.
permissions.blockReadsOutsideWorkingDirectoriesnow asks about more Bash commands and denies some in auto mode, which makes Read and Edit deny rules harder to sidestep with a shell command.- Auto mode ignores more "run any package" allow rules like
Bash(pnpm dlx *), leaving those commands to the safety check. - A subagent resumed by a sibling now follows the session's permission settings instead of acting more freely.
--worktreewith a relative--add-dirnow scopes the Bash sandbox to the right folder, in both the beside and above-the-launch-folder cases.- Remote Control worktree mode no longer deletes a running session's git-ignored files such as
.envwhen the server stops.
Path and directory checks get stricter
Claude Code 2.1.327 changes how the tool decides whether a path is safe to touch. Path checks now refuse some symbolic links, and the rule for what counts as inside a working directory has been tightened, so a few paths that used to pass silently now ask for permission. Users who keep links pointing out of a project may see new prompts after updating, and that is the intended outcome.
The permissions.blockReadsOutsideWorkingDirectories setting also reaches further. In bypass and auto modes it now asks about more Bash commands, and in auto mode it denies some outright. It also refuses more commands that name a path covered by a Read or Edit deny rule, where it previously only asked. A deny rule on a file therefore holds up better against a shell command that reads the same file.
Auto mode ignores more "run anything" allow rules
Auto mode now ignores more allow rules that would run any package, such as Bash(pnpm dlx *), along with path and version forms of rules it already ignored, such as /usr/bin/npm run:*. The safety check decides those commands instead. A broad allow rule for a package runner effectively lets the agent execute arbitrary downloaded code, so removing it from the automatic path narrows what auto mode can do unattended.
Two related fixes land alongside. Auto mode no longer ignores some wildcard PowerShell allow rules that name a script with .\, such as PowerShell(.\scripts\build.ps1 *). The PowerShell tool also asks before one more kind of command, even under a rule naming it, and where nothing can answer the prompt the call is refused unless a whole-tool rule, auto mode or bypass permissions mode allows it.
Subagents, worktrees and Chrome
A subagent resumed by a sibling's message now follows the session's permission settings. It may ask, or be refused where nobody can answer. Previously it could carry on under looser assumptions.
For --worktree launches, a relative --add-dir beside the launch folder now gives the Bash sandbox that folder rather than one beside the worktree. A relative --add-dir above the launch folder, such as .., now gives the sandbox and a --bg session only the worktree. Claude in Chrome also refuses to upload some credential files, and users who need to attach those must do it on the page themselves.
Smaller guardrails
Bash commands whose variables expand to very long text are now denied, with a message that says to use shorter values or a file. The Remote Control worktree mode also no longer deletes a running session's git-ignored files, such as .env, when the server is stopped.