{"version":"2.1.101","anchor":"worktree-orphan-self-healing","canonical_anchor":"worktree-orphan-self-healing","heading":"Worktree Orphan Self-Healing","tier":null,"area":null,"scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.101\/e\/worktree-orphan-self-healing","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.101","markdown":"### Worktree Orphan Self-Healing\n\n**What**\n\nAutomatic detection and cleanup of orphaned worktree directories that can accumulate when sessions crash or are interrupted.\n\n**Details**\n\n- Detects orphaned worktree directories (directories that exist but have no corresponding git worktree entry)\n- Checks that the worktree has no unpushed commits before self-healing to prevent data loss\n- Falls back to recursive directory cleanup if `git worktree remove` fails\n- Logs cleanup actions: `\"[worktree] removed orphaned worktree directory at ...\"`\n\n**Evidence**\n\nOrphan worktree cleanup (search for `\"Cannot self-heal orphaned worktree\"`)"}