v0.175.1Release

Worktree cleanup protects every checkout

Cleaning up an isolated agent worktree on Windows is now guarded against npm workspace junctions that point into another checkout. Git for Windows can follow those directory links while removing a worktree, which means a link left in node_modules could make cleanup traverse into the primary project directory. Pekan now finds and safely detaches every directory link that resolves outside the worktree before Git is allowed to remove anything. The link itself is removed while its target and all source files remain untouched.

Cleanup also verifies that its target is a registered linked worktree inside Pekan's managed worktree directory. The primary checkout is rejected independently at both the controller and Git boundaries, and an unknown or unverifiable target fails closed instead of being removed. Automated tests reproduce the Windows junction behavior with a real temporary Git repository and confirm that the primary checkout survives, while ordinary clean worktrees still clean up normally.

Highlights

  • External npm workspace junctions are detached safely before worktree removal.
  • The primary checkout cannot be selected as a cleanup target.
  • Unknown and out-of-scope worktree paths fail closed.
  • A real Git regression test protects against the original Windows deletion scenario.

← Browse all Pekan releases