multica-ai/multica · error

short task run prefixes require --issue <issue-id>; pass a f

Error message

short task run prefixes require --issue <issue-id>; pass a full task UUID or run `multica issue runs <issue-id> --full-id`

What it means

Returned by resolveTaskRunID when the input is not a full UUID (uuidRegexp fails) and no --issue id was supplied. Task runs are nested under issues, so prefix resolution requires fetching the run list of a specific issue; there is no global task-run listing to match against.

Source

Thrown at server/cmd/multica/cmd_id_resolver.go:282

			continue
		}
		if resp.Total > 0 {
			if offset >= resp.Total {
				break
			}
			continue
		}
	}
	return candidates, nil
}

func resolveTaskRunID(ctx context.Context, client *cli.APIClient, issueID, input string) (resolvedID, error) {
	trimmed := strings.TrimSpace(input)
	if uuidRegexp.MatchString(trimmed) {
		return resolvedID{ID: trimmed, Display: trimmed}, nil
	}
	if strings.TrimSpace(issueID) == "" {
		return resolvedID{}, fmt.Errorf("short task run prefixes require --issue <issue-id>; pass a full task UUID or run `multica issue runs <issue-id> --full-id`")
	}
	fetch := func(ctx context.Context, client *cli.APIClient) ([]idCandidate, error) {
		return fetchTaskRunCandidatesForIssue(ctx, client, issueID)
	}
	return resolveIDByPrefix(ctx, client, "task run", input, fetch)
}

func fetchTaskRunCandidatesForIssue(ctx context.Context, client *cli.APIClient, issueID string) ([]idCandidate, error) {
	var runs []map[string]any
	if err := client.GetJSON(ctx, "/api/issues/"+url.PathEscape(issueID)+"/task-runs", &runs); err != nil {
		return nil, err
	}
	candidates := make([]idCandidate, 0, len(runs))
	for _, r := range runs {
		id := strVal(r, "id")
		if id == "" {
			continue
		}

View on GitHub (pinned to 2c0912b6ec)

Solutions

  1. Add --issue <issue-id> (issue key or full UUID) alongside the short task-run prefix
  2. Or pass the full task-run UUID, which needs no issue context
  3. Or run multica issue runs <issue-id> --full-id to copy the full run UUID

Example fix

# before
multica task-run logs "ab12cd"
# error: short task run prefixes require --issue <issue-id>; ...

# after
multica task-run logs --issue MUL-1852 "ab12cd"
# or
multica issue runs MUL-1852 --full-id  # then use the full UUID
Defensive patterns

Strategy: validation

Validate before calling

if !isFullUUID(runID) && strings.TrimSpace(issueID) == "" {
    return errors.New("short task-run prefix needs --issue; pass the full UUID otherwise")
}

Prevention

When it happens

Trigger: Passing a short task-run prefix to a command without also passing --issue <issue-id>. The full-UUID path returns immediately; only short prefixes need the issue context to fetch fetchTaskRunCandidatesForIssue.

Common situations: Scripts written around prefix convenience that omit the parent issue; interactive use where the user copies a truncated run id from logs and forgets the issue; command invocations migrated from older versions with different requirements.

Related errors


AI-assisted analysis of multica-ai/multica@2c0912b6ec (2026-08-15). Data as JSON: /api/errors/1fdd5a17ec60d33c. Report an issue: GitHub.