{"version":"2.1.222","anchor":"worktree-sessions-record-a-launch-anchor-and-use-it-when-lea","canonical_anchor":"worktree-sessions-record-a-launch-anchor-and-use-it-when-lea","heading":"Worktree sessions record a launch anchor and use it when leaving","tier":"notice","area":"Worktrees","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.222\/e\/worktree-sessions-record-a-launch-anchor-and-use-it-when-lea","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.222","markdown":"### Worktree sessions record a launch anchor and use it when leaving\n\nLeaving a worktree session now reliably drops you somewhere sensible even if the original directory is gone.\n\n**What**\n\nLeaving 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.\n\n**Details**\n\n- Active worktree sessions carry `liveLaunchAnchor`, stripped out before the session is persisted into app state\n- 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`\/`worktrees` path shape, and failing that to the home directory\n- The anchor is also part of the accepted path set when validating changed files\n\n**Evidence**\n\n`liveLaunchAnchor`\n\n- Area: Worktrees\n- Tier: You'll notice\n- Useful: 3\/5\n- Signal: 0\/5"}