From 8110aab257117e8b17818b3367bc09154cb22618 Mon Sep 17 00:00:00 2001 From: slit Date: Mon, 5 Jan 2026 17:14:49 -0800 Subject: [PATCH] fix: Add GUPP propulsion nudge to daemon restartSession MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When Deacon respawns refinery/witness sessions via LIFECYCLE requests, the new sessions were starting at the Claude welcome screen without the propulsion nudge that triggers autonomous execution. Added StartupNudge and PropulsionNudgeForRole calls to restartSession() in lifecycle.go, matching the pattern used in ensureRefinerySession() in start.go. This ensures respawned agents receive the GUPP nudge and begin autonomous work immediately. Fixes: gt-01jpg 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- internal/daemon/lifecycle.go | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/internal/daemon/lifecycle.go b/internal/daemon/lifecycle.go index 92579dbb..6fcd634a 100644 --- a/internal/daemon/lifecycle.go +++ b/internal/daemon/lifecycle.go @@ -364,9 +364,21 @@ func (d *Daemon) restartSession(sessionName, identity string) error { // Non-fatal - Claude might still start } _ = d.tmux.AcceptBypassPermissionsWarning(sessionName) + time.Sleep(constants.ShutdownNotifyDelay) - // Note: gt prime is handled by Claude's SessionStart hook, not injected here. - // Injecting it via SendKeysDelayed causes rogue text to appear in the terminal. + // GUPP: Gas Town Universal Propulsion Principle + // Send startup nudge for predecessor discovery via /resume + recipient := identityToBDActor(identity) + _ = session.StartupNudge(d.tmux, sessionName, session.StartupNudgeConfig{ + Recipient: recipient, + Sender: "deacon", + Topic: "lifecycle-restart", + }) // Non-fatal + + // Send propulsion nudge to trigger autonomous execution. + // Wait for beacon to be fully processed (needs to be separate prompt) + time.Sleep(2 * time.Second) + _ = d.tmux.NudgeSession(sessionName, session.PropulsionNudgeForRole(parsed.RoleType, workDir)) // Non-fatal return nil }