Files
gastown/internal/cmd/done.go
slit 01e336edb6 fix(done): use ResolveHookDir for dispatcher lookup (sc-g7bl3)
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>
2026-01-26 12:48:09 -08:00

32 KiB