You'll noticeTier: how much it should matter to you
2Useful: my rating, 1 to 5
1Signal: worth watching, 1 to 5
WorktreesArea: what it touches
ImprovementsKind: in v2.1.324,
ImprovementsSection of the release
What
A worktree is a second working copy of a git repository, kept in its own folder so work can happen there without touching the main copy. EnterWorktree is the tool Claude uses to move a session (one running conversation with Claude Code) into a worktree.
The tool now checks whether the new worktree folder actually leads to some other folder through a symlink, a shortcut on disk that points to another location. If it does, the session stays where it is and the tool fails with a message saying nothing was removed and asking Claude to tell you. If you use a WorktreeCreate hook (your own script that creates worktrees), it has to print the folder's real path, not a shortcut to it.
This check, and the way Claude Code now works out a worktree's real path, only run when a feature switch is on.
Why
It stops a worktree path from quietly pointing the session at a folder outside the ones it is allowed to work in.
The entry above is what we published on the day. These lines were added later, as Anthropic's own pages caught up, and they sit beside the original rather than replacing it.
Confirmed sinceAnthropic's documentation has since written up EnterWorktree, on Explore the .claude directory.**When it loads**: Read when Claude creates a [git worktree](https://code.claude.com/docs/en/worktrees.md) via `--worktree`, the `EnterWorktree` tool, or subagent `isolation: worktree`claude-directorysee the edit
How sure we are
One source agreesOne thing we can check says the same as this entry.
Anthropic's documentation agreesAnthropic's documentation has since written up EnterWorktree, on Explore the .claude directory.