From 4eb3915ce9e072fa7d3830d359aa8f52321172e1 Mon Sep 17 00:00:00 2001 From: Dustin Smith Date: Mon, 19 Jan 2026 21:22:46 +0700 Subject: [PATCH] fix: kill orphaned bd daemons before beads init Stale bd daemon processes from previous installs can interfere with fresh database creation, causing "issue_prefix config is missing" and "no beads database found" errors during install. --- internal/cmd/install.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/internal/cmd/install.go b/internal/cmd/install.go index dfd895f6..d993ae0c 100644 --- a/internal/cmd/install.go +++ b/internal/cmd/install.go @@ -258,6 +258,12 @@ func runInstall(cmd *cobra.Command, args []string) error { // Town beads (hq- prefix) stores mayor mail, cross-rig coordination, and handoffs. // Rig beads are separate and have their own prefixes. if !installNoBeads { + // Kill any orphaned bd daemons before initializing beads. + // Stale daemons can interfere with fresh database creation. + if killed, _, _ := beads.StopAllBdProcesses(false, true); killed > 0 { + fmt.Printf(" ✓ Stopped %d orphaned bd daemon(s)\n", killed) + } + if err := initTownBeads(absPath); err != nil { fmt.Printf(" %s Could not initialize town beads: %v\n", style.Dim.Render("⚠"), err) } else {