multica-ai/multica · error
workspace_id is required to resolve autopilot id prefixes
Error message
workspace_id is required to resolve autopilot id prefixes
What it means
Returned by fetchAutopilotCandidates when the CLI client has no WorkspaceID set. Autopilot listing is workspace-scoped (the API requires a workspace_id query parameter), so prefix resolution cannot even query candidates without it. Full UUIDs are unaffected because they short-circuit before the fetch.
Source
Thrown at server/cmd/multica/cmd_id_resolver.go:218
_, ok := parsePositiveInt(input[dash+1:])
return ok
}
func parsePositiveInt(input string) (int, bool) {
n, err := strconv.Atoi(strings.TrimSpace(input))
if err != nil || n <= 0 {
return 0, false
}
return n, true
}
func resolveAutopilotID(ctx context.Context, client *cli.APIClient, input string) (resolvedID, error) {
return resolveIDByPrefix(ctx, client, "autopilot", input, fetchAutopilotCandidates)
}
func fetchAutopilotCandidates(ctx context.Context, client *cli.APIClient) ([]idCandidate, error) {
if client.WorkspaceID == "" {
return nil, fmt.Errorf("workspace_id is required to resolve autopilot id prefixes")
}
const limit = resolverListPageLimit
candidates := []idCandidate{}
seen := map[string]struct{}{}
for offset := 0; ; {
params := url.Values{}
params.Set("workspace_id", client.WorkspaceID)
params.Set("limit", strconv.Itoa(limit))
if offset > 0 {
params.Set("offset", strconv.Itoa(offset))
}
var resp struct {
Autopilots []map[string]any `json:"autopilots"`
Total int `json:"total"`
HasMore bool `json:"has_more"`
}
if err := client.GetJSON(ctx, "/api/autopilots?"+params.Encode(), &resp); err != nil {
return nil, errView on GitHub (pinned to 2c0912b6ec)
Solutions
- Configure or select a workspace for the CLI session (config file, flag, or environment, per the CLI's workspace selection mechanism)
- Or pass the full autopilot UUID, which skips candidate fetching entirely
- Verify with a workspace-listing command that the target workspace exists and is accessible
Example fix
# before multica autopilot info "ab12" # error: workspace_id is required to resolve autopilot id prefixes # after multica --workspace <workspace-id-or-name> autopilot info "ab12" # or: multica autopilot info <full-uuid-from-list>
Defensive patterns
Strategy: validation
Validate before calling
if client.WorkspaceID == "" {
return errors.New("select a workspace before resolving autopilot prefixes")
}
// or use the full UUID, which needs no workspace for resolution Prevention
- Make workspace selection part of CLI bootstrap in scripts (flag, env, or config)
- Use full UUIDs in automation to avoid the workspace-scoped candidate fetch entirely
When it happens
Trigger: Running an autopilot command with a short UUID prefix while the API client was constructed without a workspace id — e.g. no workspace selected/configured in the CLI profile, or a command context that does not inject WorkspaceID.
Common situations: Fresh CLI installs with no default workspace configured; running inside automation where the workspace flag was omitted; profile misconfiguration after workspace deletion.
Related errors
- workspace ID is required to resolve agents; use --workspace-
- workspace_id is required to resolve project id prefixes
- workspace_id is required to resolve label id prefixes
- repo is not configured for this workspace
- server URL not set: use --server-url flag, MULTICA_SERVER_UR
AI-assisted analysis of multica-ai/multica@2c0912b6ec (2026-08-15).
Data as JSON: /api/errors/97ebf46c1ad9fc6e.
Report an issue: GitHub.