{"version":"2.1.269","anchor":"worktree-cleanup-hardened-against-redirectedrelinked-paths","canonical_anchor":"worktree-cleanup-hardened-against-redirectedrelinked-paths","heading":"Worktree cleanup hardened against redirected\/relinked paths","tier":"notice","area":"Git Worktrees","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.269\/e\/worktree-cleanup-hardened-against-redirectedrelinked-paths","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.269","markdown":"### Worktree cleanup hardened against redirected\/relinked paths\n\nWorktree cleanup now checks for redirected symlinks before deleting anything, and refuses if it can't confirm safety\n\n**What**\n\nWhen Claude Code removes or cleans up a git worktree, it now performs extra safety checks first: it traces the full chain of paths involved and checks whether the worktree location has been redirected by a changed symlink. If it can't confirm the deletion target is actually contained where it should be, it now refuses to delete anything, warns you to manually check sensitive locations like `.git\/hooks` first, and leaves the worktree's git registration in place.\n\n**Why**\n\nA symlink pointing a worktree path somewhere unexpected could otherwise cause cleanup to delete the wrong files, including files outside the intended worktree. Refusing to act when safety can't be confirmed, and calling out `.git\/hooks` specifically, protects against deleting or exposing sensitive files.\n\n- Area: Git Worktrees\n- Tier: You'll notice\n- Useful: 3\/5\n- Signal: 1\/5"}