multica-ai/multica · error
no agent found matching %q
Error message
no agent found matching %q
What it means
After fetching the workspace's agents, resolveAgent matched the given name (case-insensitive substring) against zero agent names. The agent either does not exist in that workspace or its name shares no substring with the query.
Source
Thrown at server/cmd/multica/cmd_autopilot.go:803
var agents []map[string]any
agentPath := "/api/agents?" + url.Values{"workspace_id": {client.WorkspaceID}}.Encode()
if err := client.GetJSON(ctx, agentPath, &agents); err != nil {
return "", fmt.Errorf("fetch agents: %w", err)
}
nameLower := strings.ToLower(nameOrID)
type match struct{ ID, Name string }
var matches []match
for _, a := range agents {
aName := strVal(a, "name")
if strings.Contains(strings.ToLower(aName), nameLower) {
matches = append(matches, match{ID: strVal(a, "id"), Name: aName})
}
}
switch len(matches) {
case 0:
return "", fmt.Errorf("no agent found matching %q", nameOrID)
case 1:
return matches[0].ID, nil
default:
var parts []string
for _, m := range matches {
parts = append(parts, fmt.Sprintf(" %q (%s)", m.Name, truncateID(m.ID)))
}
return "", fmt.Errorf("ambiguous agent %q; matches:\n%s", nameOrID, strings.Join(parts, "\n"))
}
}
View on GitHub (pinned to 2c0912b6ec)
Solutions
- List the workspace's agents to see exact names: GET /api/agents?workspace_id=<id> (or the corresponding list command).
- Check you are targeting the right workspace_id.
- Or use the agent's UUID directly, which skips name matching.
Example fix
# before multica autopilot trigger create --name t1 --agent triagebot # after (after checking the real name via agent list) multica autopilot trigger create --name t1 --agent triage-bot
Defensive patterns
Strategy: validation
Validate before calling
# fail fast if the name matches no agent in the target workspace
multica api get "/api/agents?workspace_id=$WS" | jq -e --arg n "$AGENT" '.[] | select((.name | ascii_downcase | contains($n | ascii_downcase)))' >/dev/null \
|| { echo "no agent matches '$AGENT' in $WS" >&2; exit 2; } Prevention
- Store agent UUIDs (not names) in automation config; rename-proof and bypasses matching.
- After renaming/deleting agents, grep your scripts for the old name.
When it happens
Trigger: `--agent staging-bot` when no agent in the target workspace has 'staging-bot' in its name; agent belongs to a different workspace than workspace_id; agent was deleted or renamed.
Common situations: Renamed agents; environments (dev/staging/prod workspaces) each having differently named agents; typos in automation scripts.
Related errors
- ambiguous agent %q; matches: %s
- list agents: %w
- get agent: %w
- --name is required
- --runtime-id is required
AI-assisted analysis of multica-ai/multica@2c0912b6ec (2026-08-15).
Data as JSON: /api/errors/5ae6dd0e396eec3c.
Report an issue: GitHub.