[BUG] Worktree existence blocks deleting agent session
Status Open
Reported on v2.1.220
Maintainer reply None cached
Activity 0 comments · opened Aug 3, 2026
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Recently released feature that blocks deleting an agent session presumes that Claude Code has permissions that it does not. This block breaks the following workflow:
- Claude in sandbox without push
- Claude does work on worktree
- User pulls from sandbox
- User attempts to delete session (X: delete blocked by Claude Code because something something uncommitted worktree)
Claude Code cannot see whether the work was committed or not, therefore, it should not block on the assumption that it has requisite visibilty.
What Should Happen?
At least let this be configurable so that I don't have to burn tokens by telling Claude to "delete worktree", but can continue to delete session via CMD+X, CMD+X.
Error Messages/Logs
Steps to Reproduce
- Claude in sandbox without push
- Claude does work on worktree
- User pulls from sandbox
- User attempts to delete session (X: delete blocked by Claude Code because something something uncommitted worktree)
Claude Model
Not sure / Multiple models
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.220 (Claud Code)
Platform
Anthropic API
Operating System
Other
Terminal/Shell
Other
Additional Information
_No response_