fix: Add polecat handling to sessionToAgentID (gt-giyhp)
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 <noreply@anthropic.com>
This commit is contained in:
@@ -397,6 +397,14 @@ func sessionToAgentID(session string) string {
|
|||||||
rig := strings.TrimPrefix(session, "gt-")
|
rig := strings.TrimPrefix(session, "gt-")
|
||||||
rig = strings.TrimSuffix(rig, "-refinery")
|
rig = strings.TrimSuffix(rig, "-refinery")
|
||||||
return fmt.Sprintf("%s/refinery", rig)
|
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
|
return session
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user