fix(sling): prevent agent self-interruption during tests
The formula sling path was calling NudgePane directly without checking GT_TEST_NO_NUDGE. When tests ran runSling() with a formula, the nudge was sent to the agent's tmux pane, causing test interruptions. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
committed by
Steve Yegge
parent
dcf7b81011
commit
b8eb936219
@@ -258,6 +258,11 @@ func runSlingFormula(args []string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Skip nudge during tests to prevent agent self-interruption
|
||||
if os.Getenv("GT_TEST_NO_NUDGE") != "" {
|
||||
return nil
|
||||
}
|
||||
|
||||
var prompt string
|
||||
if slingArgs != "" {
|
||||
prompt = fmt.Sprintf("Formula %s slung. Args: %s. Run `gt hook` to see your hook, then execute using these args.", formulaName, slingArgs)
|
||||
|
||||
Reference in New Issue
Block a user