From cfb33241ddca0127da82db27f689736ab1e57700 Mon Sep 17 00:00:00 2001 From: Steve Yegge Date: Sat, 20 Dec 2025 08:44:17 -0800 Subject: [PATCH] spawn: Use detectSender() for From field, document Deacon fallback --- internal/cmd/spawn.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/internal/cmd/spawn.go b/internal/cmd/spawn.go index 4d243be3..8e3de0a2 100644 --- a/internal/cmd/spawn.go +++ b/internal/cmd/spawn.go @@ -338,23 +338,27 @@ func runSpawn(cmd *cobra.Command, args []string) error { style.Dim.Render(fmt.Sprintf("gt session at %s/%s", rigName, polecatName))) // Notify Witness about the spawn - Witness will monitor startup and nudge when ready + // Note: If Witness is down, Deacon's health check will wake it and Witness will + // process the SPAWN message from its inbox on startup. witnessAddr := fmt.Sprintf("%s/witness", rigName) + sender := detectSender() spawnNotification := &mail.Message{ To: witnessAddr, - From: "mayor/", + From: sender, Subject: fmt.Sprintf("SPAWN: %s starting on %s", polecatName, assignmentID), Body: fmt.Sprintf(`Polecat spawn notification. Polecat: %s Issue: %s Session: %s +Spawned by: %s Please monitor this polecat's startup. When Claude is ready (you can see the prompt in the tmux session), send a nudge to start working: tmux send-keys -t %s "Check your inbox with 'gt mail inbox' and begin working." Enter -The polecat has a work assignment in its inbox.`, polecatName, assignmentID, sessMgr.SessionName(polecatName), sessMgr.SessionName(polecatName)), +The polecat has a work assignment in its inbox.`, polecatName, assignmentID, sessMgr.SessionName(polecatName), sender, sessMgr.SessionName(polecatName)), } if err := router.Send(spawnNotification); err != nil {