Under the hood
Worktree cleanup git commands now explicitly pin the git directory instead of relying on current folder
What
The logic that removes or verifies worktrees (used when exiting or cleaning one up) now resolves the git directory up front and passes it explicitly via --git-dir to every subsequent git worktree list and git worktree remove command, instead of letting git discover it based on the current working directory.
Why
This makes worktree cleanup more reliable by pointing git at the correct repository directly, avoiding cases where relying on the current directory could pick the wrong git directory.