Leaving a worktree session now reliably drops you somewhere sensible even if the original directory is gone.
What's wrong with this entry?
Leaving or cleaning up a worktree session now returns you to a directory resolved from a recorded anchor, rather than potentially failing when the original cwd is gone or unsafe.
- Active worktree sessions carry
liveLaunchAnchor, stripped out before the session is persisted into app state - On leave/cleanup, a new helper resolves the chdir target; when the original cwd is unsafe it falls back to a repo root inferred from a
.claude/worktreespath shape, and failing that to the home directory - The anchor is also part of the accepted path set when validating changed files
liveLaunchAnchor
Strings lifted out of the shipped bundle, so the claim above can be checked against them.
Related
Other releases about the same thing. Found by shared names or similar wording; neither means one caused the other.
-
v2.1.239
worktree.locationsetting for Desktop SSH sessionsBoth mention worktree
-
v2.1.246
Worktree cleanup only removes directories Claude Code created
Both mention worktree
-
v2.1.247
Cloud-session seeding names linked worktrees and split git layouts as un-seedable
Both mention worktree