Add CleanupOrphanedSessions() function that runs at `gt start` time to detect and kill zombie tmux sessions (sessions where tmux is alive but the Claude process has died). This prevents: - Session name conflicts when restarting agents - Resource accumulation from orphaned sessions - Process accumulation that can overwhelm the system The function scans for sessions with `gt-*` and `hq-*` prefixes, checks if Claude is running using IsClaudeRunning(), and kills zombie sessions using KillSessionWithProcesses() for proper cleanup. Fixes #700 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
31 KiB
31 KiB