From b020b2634e04c993e5fd3bb4724db4f13eda5ebe Mon Sep 17 00:00:00 2001 From: gastown/polecats/furiosa Date: Tue, 30 Dec 2025 22:52:36 -0800 Subject: [PATCH] fix(crew): Use NudgeSession instead of SendKeys for gt prime MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit SendKeys has an Enter-concatenation bug that causes the nudge to fail. NudgeSession is the canonical way to message Claude and works reliably. Fixes cold starts of crew workers (gt crew start). (gt-7swyi) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- internal/cmd/crew_lifecycle.go | 4 ++-- internal/cmd/start.go | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/internal/cmd/crew_lifecycle.go b/internal/cmd/crew_lifecycle.go index 5df46ccd..ce1c9509 100644 --- a/internal/cmd/crew_lifecycle.go +++ b/internal/cmd/crew_lifecycle.go @@ -351,7 +351,7 @@ func runCrewRestart(cmd *cobra.Command, args []string) error { // Non-fatal: session works without beacon } - if err := t.SendKeys(sessionID, "gt prime"); err != nil { + if err := t.NudgeSession(sessionID, "gt prime"); err != nil { // Non-fatal: Claude started but priming failed style.PrintWarning("Could not send prime command to %s: %v", arg, err) } @@ -522,7 +522,7 @@ func restartCrewSession(rigName, crewName, clonePath string) error { beacon := session.SessionBeacon(address, "") _ = t.NudgeSession(sessionID, beacon) // Non-fatal - if err := t.SendKeys(sessionID, "gt prime"); err != nil { + if err := t.NudgeSession(sessionID, "gt prime"); err != nil { // Non-fatal } diff --git a/internal/cmd/start.go b/internal/cmd/start.go index 7d881cd3..880f5f5e 100644 --- a/internal/cmd/start.go +++ b/internal/cmd/start.go @@ -753,7 +753,7 @@ func runStartCrew(cmd *cobra.Command, args []string) error { style.PrintWarning("Timeout waiting for Claude to start: %v", err) } time.Sleep(constants.ShutdownNotifyDelay) - if err := t.SendKeys(sessionID, "gt prime"); err != nil { + if err := t.NudgeSession(sessionID, "gt prime"); err != nil { style.PrintWarning("Could not send prime command: %v", err) } } else { @@ -806,7 +806,7 @@ func runStartCrew(cmd *cobra.Command, args []string) error { } // Send gt prime to initialize context - if err := t.SendKeys(sessionID, "gt prime"); err != nil { + if err := t.NudgeSession(sessionID, "gt prime"); err != nil { style.PrintWarning("Could not send prime command: %v", err) } @@ -945,7 +945,7 @@ func startCrewMember(rigName, crewName, townRoot string) error { _ = t.NudgeSession(sessionID, beacon) // Non-fatal // Send gt prime to initialize context (non-fatal: session works without priming) - _ = t.SendKeys(sessionID, "gt prime") + _ = t.NudgeSession(sessionID, "gt prime") return nil }