Fix: /handoff regression - use respawn-pane with direct claude command

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>
This commit is contained in:
Steve Yegge
2025-12-23 00:23:18 -08:00
parent 441bafe7a8
commit a5a37f5d63
3 changed files with 26 additions and 17 deletions

View File

@@ -1,6 +1,6 @@
---
description: Hand off to fresh session, work continues from hook
allowed-tools: Bash(gt handoff:*)
allowed-tools: Bash(gt mail send:*),Bash(gt handoff:*)
argument-hint: [message]
---
@@ -8,8 +8,14 @@ Hand off to a fresh session.
User's handoff message (if any): $ARGUMENTS
Execute the appropriate command:
- If user provided a message: `gt handoff --cycle -m "USER_MESSAGE_HERE"`
- If no message provided: `gt handoff --cycle`
Execute these steps in order:
1. If user provided a message, send handoff mail to yourself first.
Construct your mail address from your identity (e.g., gastown/crew/max for crew, mayor/ for mayor).
Example: `gt mail send gastown/crew/max -s "🤝 HANDOFF: Session cycling" -m "USER_MESSAGE_HERE"`
2. Run the handoff command (this will respawn your session with a fresh Claude):
`gt handoff`
Note: The new session will auto-prime via the SessionStart hook and find your handoff mail.
End watch. A new session takes over, picking up any molecule on the hook.