fix(spawn): use rig-level beads instead of mayor/rig path
The spawn command and polecat manager were incorrectly looking for beads in <rig>/mayor/rig/.beads instead of <rig>/.beads. This caused: - `gt spawn --issue ga-xxp` to fail with "no issue found" even when `bd show ga-xxp` worked from the rig directory - Polecats couldn't find rig-level issues (with ga- prefix) because mayor/rig has a different beads database (with gt- prefix) This fix: - spawn.go: Use r.Path instead of filepath.Join(r.Path, "mayor", "rig") - polecat/manager.go: Use r.Path for beads.New() initialization - session/manager.go: Use r.Path/.beads for BEADS_DIR environment Closes beads-2nh 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -128,9 +128,9 @@ func (m *Manager) Start(polecat string, opts StartOptions) error {
|
||||
_ = m.tmux.SetEnvironment(sessionID, "GT_POLECAT", polecat)
|
||||
|
||||
// CRITICAL: Set beads environment for worktree polecats
|
||||
// Polecats share the rig's beads directory (in mayor/rig/.beads)
|
||||
// Polecats share the rig's beads directory (at rig root, not mayor/rig)
|
||||
// BEADS_NO_DAEMON=1 prevents daemon from committing to wrong branch
|
||||
beadsDir := filepath.Join(m.rig.Path, "mayor", "rig", ".beads")
|
||||
beadsDir := filepath.Join(m.rig.Path, ".beads")
|
||||
_ = m.tmux.SetEnvironment(sessionID, "BEADS_DIR", beadsDir)
|
||||
_ = m.tmux.SetEnvironment(sessionID, "BEADS_NO_DAEMON", "1")
|
||||
_ = m.tmux.SetEnvironment(sessionID, "BEADS_AGENT_NAME", fmt.Sprintf("%s/%s", m.rig.Name, polecat))
|
||||
|
||||
Reference in New Issue
Block a user