When a polecat runs gt done after work is complete, it should notify the dispatcher (the agent that slung the work). This notification was failing silently when the polecat's worktree was deleted before gt done finished. The issue was that getDispatcherFromBead() used ResolveBeadsDir(cwd) which relies on the polecat's .beads/redirect file. If the worktree is deleted (e.g., by Witness cleanup), the redirect file is gone and bead lookup fails. Fix: Use ResolveHookDir(townRoot, issueID, cwd) instead. ResolveHookDir uses prefix-based routing via routes.jsonl which works regardless of worktree state. This ensures dispatcher notifications are sent reliably even when the worktree is cleaned up before gt done completes. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
32 KiB
32 KiB