From fc4bddd694f3a55f60447bab309fc2a09d8151ea Mon Sep 17 00:00:00 2001 From: Steve Yegge Date: Thu, 25 Dec 2025 21:39:58 -0800 Subject: [PATCH] Add gt doctor --fix for session cleanup in Deacon patrol (gt-psj76.2) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The previous commit only fixed wisp gc, but the session cleanup was also using non-existent commands. Now session-gc step properly documents: 1. gt doctor --fix for orphaned sessions and processes 2. bd --no-daemon wisp gc for orphaned wisps Also noted that log pruning and molecule archival are handled elsewhere (not implemented / bd mol squash|burn respectively). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- .beads/formulas/mol-deacon-patrol.formula.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.beads/formulas/mol-deacon-patrol.formula.json b/.beads/formulas/mol-deacon-patrol.formula.json index 849a3a14..9d599127 100644 --- a/.beads/formulas/mol-deacon-patrol.formula.json +++ b/.beads/formulas/mol-deacon-patrol.formula.json @@ -36,7 +36,7 @@ "id": "session-gc", "title": "Clean dead sessions", "needs": ["orphan-check"], - "description": "Clean dead sessions.\n\nGarbage collect terminated sessions:\n- Remove stale polecat directories\n- Clean up orphaned wisps\n- Prune old logs and temp files\n- Archive completed molecule state\n\n```bash\n# Clean wisps older than 1 hour (default threshold)\nbd --no-daemon wisp gc\n\n# Or with custom age threshold\nbd --no-daemon wisp gc --age 2h\n\n# Preview what would be cleaned\nbd --no-daemon wisp gc --dry-run\n```\n\nThe `--no-daemon` flag is required when the bd daemon is running, since wisp gc needs direct database access.\n\nPreserve audit trail. Only clean sessions confirmed dead." + "description": "Clean dead sessions and orphaned state.\n\nGarbage collect terminated sessions and orphaned artifacts:\n\n## 1. Clean orphaned sessions and processes\n\n```bash\n# Check for orphans (dry run)\ngt doctor -v\n\n# Fix orphaned sessions and processes\ngt doctor --fix\n```\n\nThis handles:\n- Orphaned tmux sessions (gt-* not matching valid rig/role patterns)\n- Orphaned Claude processes (no tmux parent)\n\n## 2. Clean orphaned wisps\n\n```bash\n# Clean wisps older than 1 hour (default threshold)\nbd --no-daemon wisp gc\n\n# Or with custom age threshold\nbd --no-daemon wisp gc --age 2h\n\n# Preview what would be cleaned\nbd --no-daemon wisp gc --dry-run\n```\n\nThe `--no-daemon` flag is required when the bd daemon is running, since wisp gc needs direct database access.\n\n## Notes\n\n- Preserve audit trail - only clean confirmed dead sessions\n- Old logs and temp files: not yet implemented\n- Completed molecule archival: handled by bd mol squash/burn" }, { "id": "context-check",