fix: Add GUPP propulsion nudge to daemon restartSession

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 <noreply@anthropic.com>
This commit is contained in:
slit
2026-01-05 17:14:49 -08:00
committed by Steve Yegge
parent a459cd9fd6
commit 8110aab257
+14 -2
View File
@@ -364,9 +364,21 @@ func (d *Daemon) restartSession(sessionName, identity string) error {
// Non-fatal - Claude might still start // Non-fatal - Claude might still start
} }
_ = d.tmux.AcceptBypassPermissionsWarning(sessionName) _ = d.tmux.AcceptBypassPermissionsWarning(sessionName)
time.Sleep(constants.ShutdownNotifyDelay)
// Note: gt prime is handled by Claude's SessionStart hook, not injected here. // GUPP: Gas Town Universal Propulsion Principle
// Injecting it via SendKeysDelayed causes rogue text to appear in the terminal. // 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 return nil
} }