multica-ai/multica · error
expected a full UUID or at least %d hex characters, got %q
Error message
expected a full UUID or at least %d hex characters, got %q
What it means
Returned by normalizeUUIDPrefix when the input, after lowercasing and stripping dashes, is shorter than minShortIDPrefixLen (4 hex characters). Short prefixes cannot uniquely identify a resource, so the CLI rejects them before making any network calls.
Source
Thrown at server/cmd/multica/cmd_id_resolver.go:62
return id
}
func issueCandidate(issue map[string]any) idCandidate {
return idCandidate{
ID: strVal(issue, "id"),
Display: issueDisplayKey(issue),
Detail: strVal(issue, "title"),
}
}
func normalizeUUIDPrefix(input string) (string, error) {
trimmed := strings.TrimSpace(input)
if trimmed == "" {
return "", fmt.Errorf("id is required")
}
prefix := strings.ToLower(strings.ReplaceAll(trimmed, "-", ""))
if len(prefix) < minShortIDPrefixLen {
return "", fmt.Errorf("expected a full UUID or at least %d hex characters, got %q", minShortIDPrefixLen, input)
}
for _, r := range prefix {
if !((r >= '0' && r <= '9') || (r >= 'a' && r <= 'f')) {
return "", fmt.Errorf("expected a UUID prefix containing only hex characters, got %q", input)
}
}
return prefix, nil
}
func compactUUID(id string) string {
return strings.ToLower(strings.ReplaceAll(strings.TrimSpace(id), "-", ""))
}
func resolveIDByPrefix(ctx context.Context, client *cli.APIClient, kind, input string, fetch func(context.Context, *cli.APIClient) ([]idCandidate, error)) (resolvedID, error) {
trimmed := strings.TrimSpace(input)
if trimmed == "" {
return resolvedID{}, fmt.Errorf("%s id is required", kind)
}View on GitHub (pinned to 2c0912b6ec)
Solutions
- Pass at least 4 hex characters of the UUID, or the full UUID
- Copy the full UUID via a list command with --full-id and use that
- If generating prefixes in a script, validate length >= 4 before calling the CLI
Example fix
# before multica label rm "ab" # after multica label rm "ab12cd" # or the full UUID from `multica label list --full-id`
Defensive patterns
Strategy: validation
Validate before calling
// validUUIDPrefix reports whether input can serve as a CLI UUID prefix.
func validUUIDPrefix(input string) bool {
compact := strings.ToLower(strings.ReplaceAll(strings.TrimSpace(input), "-", ""))
if len(compact) < 4 {
return false
}
for _, r := range compact {
if !((r >= '0' && r <= '9') || (r >= 'a' && r <= 'f')) {
return false
}
}
return true
} Prevention
- Copy full UUIDs from list commands using --full-id instead of truncating
- Validate prefix length (>=4) and hex-only characters before calling the CLI
When it happens
Trigger: Passing a 1–3 character id fragment such as "ab", "1a2", or a dashed fragment whose compact form is under 4 chars. Produced by resolveIDByPrefix for any prefix-resolvable resource (autopilot, project, label, task run) and indirectly by resolveIssueRef's tailored-hint detection.
Common situations: Truncated copy-paste from terminal output; shell history editing that cut the id short; scripts slicing substrings of a UUID with too-small an offset or length.
Related errors
- expected a UUID prefix containing only hex characters, got %
- id is required
- %s id is required
- resolve %s: %w
- no %s found matching id prefix %q; run the list command with
AI-assisted analysis of multica-ai/multica@2c0912b6ec (2026-08-15).
Data as JSON: /api/errors/5a6030c224a703b2.
Report an issue: GitHub.