fix(daemon): use gt mail instead of bd mail for lifecycle requests

The handoff command sends lifecycle requests via 'gt mail send' to
town-level beads, but the daemon was reading with 'bd mail inbox'
which reads from the local beads database. This fixes the mismatch.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Steve Yegge
2025-12-21 00:47:05 -08:00
parent 9c3cc0255c
commit c4892938d0

View File

@@ -25,8 +25,8 @@ type BeadsMessage struct {
// ProcessLifecycleRequests checks for and processes lifecycle requests from the deacon inbox.
func (d *Daemon) ProcessLifecycleRequests() {
// Get mail for deacon identity
cmd := exec.Command("bd", "mail", "inbox", "--identity", "deacon/", "--json")
// Get mail for deacon identity (using gt mail, not bd mail)
cmd := exec.Command("gt", "mail", "inbox", "--identity", "deacon/", "--json")
cmd.Dir = d.config.TownRoot
output, err := cmd.Output()
@@ -295,7 +295,8 @@ func (d *Daemon) syncWorkspace(workDir string) {
// closeMessage marks a mail message as read by closing the beads issue.
func (d *Daemon) closeMessage(id string) error {
cmd := exec.Command("bd", "close", id)
// Use gt mail commands for town-level beads
cmd := exec.Command("gt", "mail", "read", id)
cmd.Dir = d.config.TownRoot
return cmd.Run()
}