[BUG] Worktree cleanup prompt isn't used when custom worktree hooks are enabled
Resolved 💬 6 comments Opened Mar 13, 2026 by winterqt Closed Jun 4, 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?
When using custom WorktreeAdd and WorktreeRemove hooks, Claude Code does not prompt whether the worktree should be deleted or not, like the documentation claims.
What Should Happen?
The prompt should be shown, and the WorktreeRemove hook (not) run accordingly.
Error Messages/Logs
Steps to Reproduce
- Set up an environment with custom worktree hooks
- Make a change to a file within Claude Code
/exit
Claude Model
None
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.74 (Claude Code)
Platform
Anthropic API
Operating System
Other Linux
Terminal/Shell
Other
Additional Information
_No response_
This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗