[Bug] Incorrect branch validation when deleting worktree after checkout

Resolved 💬 2 comments Opened Mar 20, 2026 by davidparsson Closed Apr 18, 2026

Bug Description
I often start claude with --worktree to work on an existing branch. I then switch to that branch in the worktree, without committing anything to the branch that claude created. When exiting Claude, claude asks if the worktree should be deleted and Claude currently seems to delete the branch that was initially created by Claude, not the branch i checked out (and this I think is good and as expected). However, before deleting, claude incorrectly states that there are commits on that branch that would be deleted. That seems to look at the checked out branch, not the branch that will be deleted.

Environment Info

  • Platform: darwin
  • Terminal: WarpTerminal
  • Version: 2.1.80
  • Feedback ID: 949487a9-73f0-4361-aa45-6716e84d3d27

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗