feat(handoff): add explicit instructions to handoff nudge message

When a session starts via handoff, the nudge message now includes
clear instructions to check hook and mail. This prevents agent
confusion when SessionStart hooks haven't loaded CLAUDE.md yet.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
gastown/crew/jack
2026-01-09 22:58:32 -08:00
committed by Steve Yegge
parent f7d497ba07
commit 609a4af087
2 changed files with 16 additions and 1 deletions

View File

@@ -62,6 +62,18 @@ func FormatStartupNudge(cfg StartupNudgeConfig) string {
}
// Build the beacon: [GAS TOWN] recipient <- sender • timestamp • topic
return fmt.Sprintf("[GAS TOWN] %s <- %s • %s • %s",
beacon := fmt.Sprintf("[GAS TOWN] %s <- %s • %s • %s",
cfg.Recipient, cfg.Sender, timestamp, topic)
// For handoff, add explicit instructions so the agent knows what to do
// even if hooks haven't loaded CLAUDE.md yet
if cfg.Topic == "handoff" {
beacon += "\n\nCheck your hook and mail, then act on the hook if present:\n" +
"1. `gt hook` - shows hooked work (if any)\n" +
"2. `gt mail inbox` - check for messages\n" +
"3. If work is hooked → execute it immediately\n" +
"4. If nothing hooked → wait for instructions"
}
return beacon
}

View File

@@ -54,6 +54,9 @@ func TestFormatStartupNudge(t *testing.T) {
"gastown/witness",
"<- self",
"handoff",
"Check your hook and mail", // handoff includes explicit instructions
"gt hook",
"gt mail inbox",
},
},
{