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:
committed by
Steve Yegge
parent
f7d497ba07
commit
609a4af087
@@ -62,6 +62,18 @@ func FormatStartupNudge(cfg StartupNudgeConfig) string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Build the beacon: [GAS TOWN] recipient <- sender • timestamp • topic
|
// 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)
|
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
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,6 +54,9 @@ func TestFormatStartupNudge(t *testing.T) {
|
|||||||
"gastown/witness",
|
"gastown/witness",
|
||||||
"<- self",
|
"<- self",
|
||||||
"handoff",
|
"handoff",
|
||||||
|
"Check your hook and mail", // handoff includes explicit instructions
|
||||||
|
"gt hook",
|
||||||
|
"gt mail inbox",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user