Fix GUPP: inject "gt prime" as initial prompt in handoff
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 <noreply@anthropic.com>
This commit is contained in:
committed by
Steve Yegge
parent
38bf896296
commit
d55858b554
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user