feat(doctor): Add orphan session and process detection
Add two new health checks to gt doctor: 1. orphan-sessions: Detects Gas Town tmux sessions (gt-*) that do not match expected patterns (mayor, deacon, rig-witness, rig-refinery, rig-polecat). Validates rig names against actual workspace structure. 2. orphan-processes: Detects Claude/claude-code processes without a tmux parent. Walks process tree to find orphaned instances that may be consuming resources. Both checks support --fix to clean up detected orphans: - Kills orphaned tmux sessions - Sends SIGINT (then SIGKILL) to orphaned processes Closes gt-qsvq. Generated with Claude Code Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -55,6 +55,8 @@ func runDoctor(cmd *cobra.Command, args []string) error {
|
||||
// Register built-in checks
|
||||
d.Register(doctor.NewDaemonCheck())
|
||||
d.Register(doctor.NewBeadsDatabaseCheck())
|
||||
d.Register(doctor.NewOrphanSessionCheck())
|
||||
d.Register(doctor.NewOrphanProcessCheck())
|
||||
|
||||
// Run checks
|
||||
var report *doctor.Report
|
||||
|
||||
Reference in New Issue
Block a user