Skip to content

Commit 7f14e81

Browse files
Gastown Testclaude
andcommitted
fix: gc sling resolves bare agent names to rig-scoped agents from CWD
resolveRigPaths was not called before resolveAgentIdentity, so currentRigContext couldn't match CWD against relative rig paths. Bare agent names like "claude" failed to resolve to rig-scoped implicit agents like "hello-world/claude" when running from inside the rig directory. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
1 parent d093030 commit 7f14e81

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

cmd/gc/cmd_sling.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,12 @@ func cmdSling(args []string, isFormula, doNudge, force bool, title string, vars
247247
target = rig.DefaultSlingTarget
248248
}
249249

250+
// Ensure rig paths are absolute before agent/rig context resolution.
251+
// Without this, currentRigContext can't match CWD against relative
252+
// rig paths, so bare agent names (e.g., "claude") don't resolve to
253+
// rig-scoped implicit agents (e.g., "hello-world/claude").
254+
resolveRigPaths(cityPath, cfg.Rigs)
255+
250256
a, ok := resolveAgentIdentity(cfg, target, currentRigContext(cfg))
251257
if !ok {
252258
fmt.Fprintln(stderr, agentNotFoundMsg("gc sling", target, cfg)) //nolint:errcheck // best-effort stderr

0 commit comments

Comments
 (0)