multica-ai/multica · error

resolve task run: %w

Error message

resolve task run: %w

What it means

`multica issue run messages` resolves the positional run reference (optionally scoped by --issue) to a full task-run ID via resolveTaskRunID. This error wraps that resolution failing: unknown run, ambiguous short ID without --issue scope, auth, or transport errors.

Source

Thrown at server/cmd/multica/cmd_issue.go:2198

	client, err := newAPIClient(cmd)
	if err != nil {
		return err
	}

	ctx, cancel := cli.APIContext(context.Background())
	defer cancel()

	issueID := ""
	if issueInput, _ := cmd.Flags().GetString("issue"); issueInput != "" {
		issueRef, err := resolveIssueRef(ctx, client, issueInput)
		if err != nil {
			return fmt.Errorf("resolve issue: %w", err)
		}
		issueID = issueRef.ID
	}
	taskRef, err := resolveTaskRunID(ctx, client, issueID, args[0])
	if err != nil {
		return fmt.Errorf("resolve task run: %w", err)
	}

	path := "/api/tasks/" + url.PathEscape(taskRef.ID) + "/messages"
	if since, _ := cmd.Flags().GetInt("since"); since > 0 {
		path += fmt.Sprintf("?since=%d", since)
	}

	var messages []map[string]any
	if err := client.GetJSON(ctx, path, &messages); err != nil {
		return fmt.Errorf("list run messages: %w", err)
	}

	output, _ := cmd.Flags().GetString("output")
	if output == "json" {
		return cli.PrintJSON(os.Stdout, messages)
	}

	headers := []string{"SEQ", "TYPE", "TOOL", "CONTENT"}

View on GitHub (pinned to 2c0912b6ec)

Solutions

  1. Add --issue <issue-ref> to disambiguate short run IDs.
  2. Use the full run ID from `multica issue runs <issue>`.
  3. Fix auth/connectivity if the lookup itself errors.

Example fix

# before
multica issue run messages abc1
# after
multica issue run messages abc1 --issue ISS-1
Defensive patterns

Strategy: validation

Validate before calling

# bash: always scope short run IDs with a validated issue
if [[ ${#RUN_REF} -lt 12 && -z "$ISSUE_OPT" ]]; then
  echo "short run ID needs --issue for disambiguation" >&2; exit 2
fi

Prevention

When it happens

Trigger: Passing a truncated run ID that matches runs across multiple issues without --issue; a deleted or mistyped run ID; API lookup failure.

Common situations: Short-hash style run references copied from table output; runs cleaned up by retention before the messages command runs.

Related errors


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