multica-ai/multica · error
id is required
Error message
id is required
What it means
Returned by normalizeUUIDPrefix when the input, after trimming whitespace, is the empty string. The CLI requires some non-empty id value before it can attempt UUID-prefix normalization; an empty argument is treated as a missing required value rather than a formatting problem.
Source
Thrown at server/cmd/multica/cmd_id_resolver.go:58
id := strVal(issue, "id")
if id != "" {
slog.Warn("issue response missing identifier", "issue_id", id)
}
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) {View on GitHub (pinned to 2c0912b6ec)
Solutions
- Supply a non-empty id: a full UUID or a UUID prefix of at least 4 hex characters
- If the id comes from a variable, check that it is set before invoking the CLI (e.g. "${VAR:?id is required}")
- If the id was supposed to come from a previous command's output, verify that command succeeded and produced output
Example fix
# before
ISSUE_ID=""
multica issue show "$ISSUE_ID"
# after
ISSUE_ID="$(multica issue list --full-id | head -1 | awk '{print $1}')"
multica issue show "$ISSUE_ID" Defensive patterns
Strategy: validation
Validate before calling
#!/usr/bin/env bash
# fail fast on empty ids before invoking the CLI
: "${ISSUE_ID:?id is required}"
multica issue show "$ISSUE_ID" Prevention
- Use ${VAR:?message} expansion in scripts to abort on empty variables
- Never forward optional flags unconditionally; gate them on non-empty values
When it happens
Trigger: Calling any resolver that uses normalizeUUIDPrefix (autopilot, project, label, task run, etc.) with an id argument of "", " ", or a value that trims to empty. Typically the result of an unset shell variable or an empty flag value passed through a script.
Common situations: Shell scripts passing "$MY_VAR" when MY_VAR is unset; CI pipelines forwarding an empty parameter; copy-paste commands where the id placeholder was never replaced.
Related errors
- %s id is required
- expected a full UUID or at least %d hex characters, got %q
- expected a UUID prefix containing only hex characters, got %
- resolve %s: %w
- issue id is required
AI-assisted analysis of multica-ai/multica@2c0912b6ec (2026-08-15).
Data as JSON: /api/errors/0fe74fbffa99d707.
Report an issue: GitHub.