What
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.
Details
- 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
Evidence
liveLaunchAnchor
Strings lifted out of the shipped bundle, so the claim above can be checked against them.