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

@@ -260,6 +260,11 @@ func TestEnsureSessionFresh_ZombieSession(t *testing.T) {
t.Skip("session unexpectedly has Claude running - can't test zombie case")
}
// Verify generic agent check also treats it as not running (shell session)
if tm.IsAgentRunning(sessionName) {
t.Fatalf("expected IsAgentRunning(%q) to be false for a fresh shell session", sessionName)
}
// EnsureSessionFresh should kill the zombie and create fresh session
// This should NOT error with "session already exists"
if err := tm.EnsureSessionFresh(sessionName, ""); err != nil {