fix(doctor): add zombie session check to detect dead Claude in tmux

When gt doctor runs, it now detects and kills zombie sessions - tmux
sessions that are valid Gas Town sessions (gt-*, hq-*) but have no
Claude/node process running inside. These occur when Claude exits or
crashes but the tmux session remains.

Previously, OrphanSessionCheck only validated session names but did not
check if Claude was actually running. This left empty sessions
accumulating over time.

Fixes #472

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
gastown/crew/george
2026-01-16 14:54:45 -08:00
committed by Steve Yegge
parent 95cb58e36f
commit 08ef50047d
3 changed files with 212 additions and 0 deletions

View File

@@ -135,6 +135,7 @@ func runDoctor(cmd *cobra.Command, args []string) error {
d.Register(doctor.NewRoutesCheck())
d.Register(doctor.NewRigRoutesJSONLCheck())
d.Register(doctor.NewOrphanSessionCheck())
d.Register(doctor.NewZombieSessionCheck())
d.Register(doctor.NewOrphanProcessCheck())
d.Register(doctor.NewWispGCCheck())
d.Register(doctor.NewBranchCheck())