From 29e2c6ed9c7b7a28b2d125cdeba02b70c56ea97e Mon Sep 17 00:00:00 2001 From: julianknutsen Date: Tue, 6 Jan 2026 22:44:16 -0800 Subject: [PATCH] Fix daemon polecat respawn to pass rigPath for rig agent settings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Daemon's restartPolecatSession was calling BuildPolecatStartupCommand with empty rigPath, causing polecats to fall back to town-level defaults instead of honoring rig-specific agent settings. Now passes rigPath so rig agent settings are honored. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- internal/daemon/daemon.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/daemon/daemon.go b/internal/daemon/daemon.go index 0342dcca..6c783f29 100755 --- a/internal/daemon/daemon.go +++ b/internal/daemon/daemon.go @@ -798,7 +798,9 @@ func (d *Daemon) restartPolecatSession(rigName, polecatName, sessionName string) _ = d.tmux.SetPaneDiedHook(sessionName, agentID) // Launch Claude with environment exported inline - startCmd := config.BuildPolecatStartupCommand(rigName, polecatName, "", "") + // Pass rigPath so rig agent settings are honored (not town-level defaults) + rigPath := filepath.Join(d.config.TownRoot, rigName) + startCmd := config.BuildPolecatStartupCommand(rigName, polecatName, rigPath, "") if err := d.tmux.SendKeys(sessionName, startCmd); err != nil { return fmt.Errorf("sending startup command: %w", err) }