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
Internal ChangesKind: in v2.1.271,
ImprovementsSection of the release
What
When spawning a subagent with isolation: 'worktree' on a hook-based worktree, Claude Code now resolves and stores the worktree's real path (vettedRealPath) after creation, logging a warning and keeping the worktree around at cleanup time if that resolution fails.
Worktree creation now computes a baseChangeset when no HEAD commit is available for hook-based worktrees, and threads it along with sessionDir through the worktree's metadata for later dirty-check comparisons.
The confirmation message shown before discarding a worktree with uncommitted work can now note that commits made in the worktree are already stored server-side (with a changeset id) and won't be lost by removing it.
When exiting a worktree with the "keep" action, if the session is hook-based and already has a recorded originalChangeset, Claude Code now skips re-running the git status/diff commands used to compute changed files and commits.
Why
These changes make hook-based worktree sessions (used in managed/cloud setups without a normal git HEAD) track their state more reliably and avoid unnecessary git work or misleading warnings about losing uncommitted changes.