From d55858b554b9d94fd6d5ef1afa428354cd56de2c Mon Sep 17 00:00:00 2001 From: gastown/crew/joe Date: Tue, 30 Dec 2025 19:25:50 -0800 Subject: [PATCH] Fix GUPP: inject "gt prime" as initial prompt in handoff MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Agents weren't auto-executing after gt handoff because the SessionStart hook only outputs text - it doesn't inject a prompt. Claude needs actual user input to trigger a response. The fix: pass "gt prime" as an argument to claude, just like gt crew at already does. This treats the argument as the first user prompt, which triggers GUPP execution immediately. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- internal/cmd/handoff.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/internal/cmd/handoff.go b/internal/cmd/handoff.go index d760aa63..239c1c99 100644 --- a/internal/cmd/handoff.go +++ b/internal/cmd/handoff.go @@ -322,13 +322,15 @@ func buildRestartCommand(sessionName string) (string, error) { // For respawn-pane, we: // 1. cd to the right directory (role's canonical home) // 2. export GT_ROLE and BD_ACTOR so role detection works correctly - // 3. run claude - // The SessionStart hook will run gt prime. + // 3. run claude with "gt prime" as initial prompt (triggers GUPP) // Use exec to ensure clean process replacement. + // IMPORTANT: Passing "gt prime" as argument injects it as the first prompt, + // which triggers the agent to execute immediately. Without this, agents + // wait for user input despite all GUPP prompting in hooks. if gtRole != "" { - return fmt.Sprintf("cd %s && export GT_ROLE=%s BD_ACTOR=%s GIT_AUTHOR_NAME=%s && exec claude --dangerously-skip-permissions", workDir, gtRole, gtRole, gtRole), nil + return fmt.Sprintf("cd %s && export GT_ROLE=%s BD_ACTOR=%s GIT_AUTHOR_NAME=%s && exec claude --dangerously-skip-permissions \"gt prime\"", workDir, gtRole, gtRole, gtRole), nil } - return fmt.Sprintf("cd %s && exec claude --dangerously-skip-permissions", workDir), nil + return fmt.Sprintf("cd %s && exec claude --dangerously-skip-permissions \"gt prime\"", workDir), nil } // sessionWorkDir returns the correct working directory for a session.