From dba5f688b98ab4faff32f59b2140ae011aef7b3b Mon Sep 17 00:00:00 2001 From: gastown/crew/joe Date: Tue, 30 Dec 2025 22:30:30 -0800 Subject: [PATCH] Track spawned dogs in DogDispatchInfo (gt-fzkjj) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Set Spawned=true when DispatchToDog creates a new dog, allowing callers to distinguish between reusing an existing dog vs spawning. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- internal/cmd/sling.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/internal/cmd/sling.go b/internal/cmd/sling.go index 9854f0ec..c40a0d4f 100644 --- a/internal/cmd/sling.go +++ b/internal/cmd/sling.go @@ -940,6 +940,7 @@ func DispatchToDog(dogName string, create bool) (*DogDispatchInfo, error) { mgr := dog.NewManager(townRoot, rigsConfig) var targetDog *dog.Dog + var spawned bool if dogName != "" { // Specific dog requested @@ -952,6 +953,7 @@ func DispatchToDog(dogName string, create bool) (*DogDispatchInfo, error) { return nil, fmt.Errorf("creating dog %s: %w", dogName, err) } fmt.Printf("✓ Created dog %s\n", dogName) + spawned = true } else { return nil, fmt.Errorf("dog %s not found (use --create to add)", dogName) } @@ -972,6 +974,7 @@ func DispatchToDog(dogName string, create bool) (*DogDispatchInfo, error) { return nil, fmt.Errorf("creating dog %s: %w", newName, err) } fmt.Printf("✓ Created dog %s (pool was empty)\n", newName) + spawned = true } else { return nil, fmt.Errorf("no idle dogs available (use --create to add)") } @@ -999,7 +1002,7 @@ func DispatchToDog(dogName string, create bool) (*DogDispatchInfo, error) { DogName: targetDog.Name, AgentID: agentID, Pane: pane, - Spawned: false, // TODO: track if we spawned a new session + Spawned: spawned, }, nil }