From a05b445bbeb452c836d5843f62315df0b613549c Mon Sep 17 00:00:00 2001 From: Steve Yegge Date: Sun, 28 Dec 2025 16:21:02 -0800 Subject: [PATCH] fix: Add polecat handling to sessionToAgentID (gt-giyhp) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The sessionToAgentID function was missing handling for polecat sessions, causing gt sling to fail to update the agent bead's hook_bead field. Before: gt-gastown-nux -> gt-gastown-nux (unchanged, no match) After: gt-gastown-nux -> gastown/polecats/nux (correct format) This enables updateAgentHookBead to properly convert to the agent bead ID (gt-polecat-gastown-nux) and update the hook_bead field, which is required for agents to know they have work on their hook. Found via E2E test (gt-j0gx2) - nux wasn't picking up slung work because hook_bead was null despite the task being pinned. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- internal/cmd/sling.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/internal/cmd/sling.go b/internal/cmd/sling.go index fcb39f85..dfafed53 100644 --- a/internal/cmd/sling.go +++ b/internal/cmd/sling.go @@ -397,6 +397,14 @@ func sessionToAgentID(session string) string { rig := strings.TrimPrefix(session, "gt-") rig = strings.TrimSuffix(rig, "-refinery") return fmt.Sprintf("%s/refinery", rig) + case strings.HasPrefix(session, "gt-"): + // gt-gastown-nux -> gastown/polecats/nux (polecat) + parts := strings.Split(strings.TrimPrefix(session, "gt-"), "-") + if len(parts) >= 2 { + rig := parts[0] + name := strings.Join(parts[1:], "-") + return fmt.Sprintf("%s/polecats/%s", rig, name) + } } return session }