What
Automatic detection and cleanup of orphaned worktree directories that can accumulate when sessions crash or are interrupted.
Details
- Detects orphaned worktree directories (directories that exist but have no corresponding git worktree entry)
- Checks that the worktree has no unpushed commits before self-healing to prevent data loss
- Falls back to recursive directory cleanup if
git worktree removefails - Logs cleanup actions:
"[worktree] removed orphaned worktree directory at ..."
Evidence
Orphan worktree cleanup (search for "Cannot self-heal orphaned worktree")
Strings lifted out of the shipped bundle, so the claim above can be checked against them.