fix(doctor): only cycle patrol roles on --fix, not crew/polecats (hq-qthgye)

gt doctor --fix was killing all sessions with stale settings, including
crew and polecats that cannot auto-recover. Now only kills patrol roles
(witness, refinery, deacon, mayor) which the daemon will restart.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
mayor
2026-01-06 23:57:46 -08:00
committed by beads/crew/dave
parent 85d1e783b0
commit 59799f551c
+9 -6
View File
@@ -326,12 +326,15 @@ func (c *ClaudeSettingsCheck) Fix(ctx *CheckContext) error {
continue continue
} }
// Check if agent has a running session // Only cycle patrol roles that can auto-recover (daemon restarts them).
running, _ := t.HasSession(sf.sessionName) // Crew and polecats are spawned on-demand and won't auto-restart.
if running { if sf.agentType == "witness" || sf.agentType == "refinery" ||
// Cycle the agent by killing and letting gt up restart it sf.agentType == "deacon" || sf.agentType == "mayor" {
// (or the daemon will restart it) running, _ := t.HasSession(sf.sessionName)
_ = t.KillSession(sf.sessionName) if running {
// Cycle the agent by killing and letting gt up restart it
_ = t.KillSession(sf.sessionName)
}
} }
} }