diff --git a/internal/cmd/sling.go b/internal/cmd/sling.go index a450904b..fcb39f85 100644 --- a/internal/cmd/sling.go +++ b/internal/cmd/sling.go @@ -6,6 +6,7 @@ import ( "os" "os/exec" "strings" + "time" "github.com/spf13/cobra" "github.com/steveyegge/gastown/internal/beads" @@ -13,6 +14,10 @@ import ( "github.com/steveyegge/gastown/internal/tmux" ) +// claudeStartupDelay is how long to wait for Claude to start before nudging. +// This fixes gt-1dbcp: polecat auto-start doesn't process initial nudge. +const claudeStartupDelay = 2 * time.Second + var slingCmd = &cobra.Command{ Use: "sling [target]", GroupID: GroupWork, @@ -176,6 +181,12 @@ func runSling(cmd *cobra.Command, args []string) error { } targetAgent = spawnInfo.AgentID() targetPane = spawnInfo.Pane + + // Wait for Claude to start up before nudging (fixes gt-1dbcp) + if targetPane != "" { + fmt.Printf("Waiting for Claude to initialize...\n") + time.Sleep(claudeStartupDelay) + } } } else { // Slinging to an existing agent @@ -531,6 +542,12 @@ func runSlingFormula(args []string) error { } targetAgent = spawnInfo.AgentID() targetPane = spawnInfo.Pane + + // Wait for Claude to start up before nudging (fixes gt-1dbcp) + if targetPane != "" { + fmt.Printf("Waiting for Claude to initialize...\n") + time.Sleep(claudeStartupDelay) + } } } else { // Slinging to an existing agent