Unlike cleanup-orphans (which uses TTY="?" detection), zombie-scan uses tmux verification: it checks if each Claude process is in an active tmux session by comparing against actual pane PIDs. A process is a zombie if: - It's a Claude/codex process - It's NOT the pane PID of any active tmux session - It's NOT a child of any pane PID - It's older than 60 seconds Also refactors: - getChildPIDs() with ps fallback when pgrep unavailable - State file handling with file locking for concurrent access Usage: gt deacon zombie-scan # Find and kill zombies gt deacon zombie-scan --dry-run # Just list zombies Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
40 KiB
40 KiB