[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

  1. Set up an environment with custom worktree hooks
  2. Make a change to a file within Claude Code
  3. /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_

View original on GitHub ↗

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