feat: runtime-aware tmux agent checks

This commit is contained in:
jv
2026-01-07 12:56:00 +13:00
committed by Steve Yegge
parent 02ca9e43fa
commit 22693c1dcc
9 changed files with 117 additions and 46 deletions

View File

@@ -138,7 +138,9 @@ func (m *Manager) Start(foreground bool) error {
running, _ := t.HasSession(sessionID)
if running {
// Session exists - check if Claude is actually running (healthy vs zombie)
if t.IsClaudeRunning(sessionID) {
townRoot := filepath.Dir(m.rig.Path)
agentCfg := config.ResolveAgentConfig(townRoot, m.rig.Path)
if t.IsAgentRunning(sessionID, config.ExpectedPaneCommands(agentCfg)...) {
// Healthy - Claude is running
return ErrAlreadyRunning
}