Worktree cleanup now checks for redirected symlinks before deleting anything, and refuses if it can't confirm safety
When 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.
A 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.