Agents naturally expect `gt handoff -s "Subject" -m "Message"` to work
like `gt mail send`. Now it does:
- Added --subject/-s and --message/-m flags to gt handoff
- Added --self flag to gt mail send for sending to self
- Handoff auto-sends mail to self before respawning pane
This makes agent-initiated handoff more ergonomic - they can include
context in a single command instead of two separate steps.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add auto-spawn logic to outputDeaconPatrolContext()
- Deacon now auto-spawns mol-deacon-patrol if no active patrol
- All three patrol roles now have consistent auto-bond behavior:
Deacon, Witness, Refinery
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add outputWitnessPatrolContext() function in prime.go
- Witness now auto-spawns mol-witness-patrol if no active patrol
- Fixed catalog ID parsing (strip trailing colon) for both witness and refinery
- Created mol-witness-patrol template with 10 steps (gt-qflq)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The previous implementation used session.Manager which only works for polecats.
Refinery and Witness have their own managers that handle their tmux sessions.
- Use refinery.Manager for refinery auto-start
- Use witness.Manager for witness auto-start
- Check state before starting to avoid duplicate starts
🤖 Generated with Claude Code
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add handling for POLECAT_DONE messages in processShutdownRequests()
- Track which polecats have signaled done (using SpawnedIssues with "done:" prefix)
- For LIFECYCLE:shutdown requests, wait for POLECAT_DONE before cleanup
- Add checkPendingCompletions() to nudge polecats with closed issues
- Add 10-minute timeout with force-kill after waiting for POLECAT_DONE
- Protects against losing MR submissions when Witness cleans up too early
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Implements redundant systems to ensure infrastructure stays operational:
- gt spawn: Auto-starts refinery and witness if not running
- mol-witness-patrol: Added check-refinery step to verify refinery is alive
This ensures polecats don't wait forever for merges.
🤖 Generated with Claude Code
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
New checks:
- crew-state: Validates crew worker state.json files for completeness
Can regenerate missing/invalid state files with --fix
- lifecycle-hygiene: Detects stale lifecycle state that can wedge the deacon
- Stale lifecycle messages in deacon inbox
- Stuck requesting_* flags in state.json when session is healthy
Can clean up with --fix (external intervention when deacon is stuck)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Three related fixes:
1. lifecycle.go: Use gt mail delete instead of gt mail read to prevent
lifecycle requests from accumulating.
2. handoff.go: Return exec claude command for respawn-pane instead of
gt crew at which tries to attach to existing session.
3. handoff.md skill: Work without --cycle and -m flags, send mail separately.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
InstantiateMolecule now supports two formats:
1. New format: If molecule has child issues, copy them as templates
2. Old format: If no children, parse markdown steps from Description
This unifies execution while preserving authoring flexibility.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add handling for POLECAT_DONE messages in processShutdownRequests()
- Track which polecats have signaled done (using SpawnedIssues with "done:" prefix)
- For LIFECYCLE:shutdown requests, wait for POLECAT_DONE before cleanup
- Add checkPendingCompletions() to nudge polecats with closed issues
- Add 10-minute timeout with force-kill after waiting for POLECAT_DONE
- Protects against losing MR submissions when Witness cleans up too early
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add persistent state storage for Witness across wisp burns:
- Add WorkerState and WitnessHandoffState types
- Implement loadHandoffState/saveHandoffState for bead persistence
- Update getNudgeCount/recordNudge to use persistent state
- Add activity tracking integration into healthCheck
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add persistent state storage for Witness across wisp burns:
- Add WorkerState and WitnessHandoffState types
- Implement loadHandoffState/saveHandoffState for bead persistence
- Update getNudgeCount/recordNudge to use persistent state
- Add activity tracking integration into healthCheck
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add outputRefineryPatrolContext to gt prime that automatically spawns
the refinery patrol molecule when no active patrol is found. This ensures
the merge queue is always monitored when Refinery starts up.
Key changes:
- Add RoleRefinery to outputMoleculeContext
- Implement outputRefineryPatrolContext with auto-spawn logic
- Check for existing in-progress or open patrol molecules
- Spawn mol-refinery-patrol wisp if none found
(gt-j6s8)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
When state.json contains empty JSON {}, the ClonePath and other fields
were left empty, causing "can't find pane/session" errors in gt crew at.
Now backfills essential fields (Name, Rig, ClonePath) if missing.
🤝 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>