multica-ai/multica · error

list runs: %w

Error message

list runs: %w

What it means

After resolving the issue, `multica issue runs` GETs /api/issues/{id}/task-runs. This error wraps that fetch failing: auth/permission issues, 404 on a removed issue, 5xx, or network problems.

Source

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

// ---------------------------------------------------------------------------

func runIssueRuns(cmd *cobra.Command, args []string) error {
	client, err := newAPIClient(cmd)
	if err != nil {
		return err
	}

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

	issueRef, err := resolveIssueRef(ctx, client, args[0])
	if err != nil {
		return fmt.Errorf("resolve issue: %w", err)
	}

	var runs []map[string]any
	if err := client.GetJSON(ctx, "/api/issues/"+issueRef.ID+"/task-runs", &runs); err != nil {
		return fmt.Errorf("list runs: %w", err)
	}

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

	actors := loadActorDisplayLookup(ctx, client)
	fullID, _ := cmd.Flags().GetBool("full-id")
	headers := []string{"ID", "AGENT", "STATUS", "STARTED", "COMPLETED", "ERROR"}
	rows := make([][]string, 0, len(runs))
	for _, r := range runs {
		started := strVal(r, "started_at")
		if len(started) >= 16 {
			started = started[:16]
		}
		completed := strVal(r, "completed_at")
		if len(completed) >= 16 {

View on GitHub (pinned to 2c0912b6ec)

Solutions

  1. Re-run the command — transient races and 5xx usually clear.
  2. Confirm the issue still exists and the token can read task runs.
  3. Check server logs if failures are deterministic.
Defensive patterns

Strategy: retry

Validate before calling

# bash: pre-flight the issue before fetching runs
multica issue get "$ISSUE" >/dev/null 2>&1 || { echo "issue unavailable" >&2; exit 2; }

Try / catch

# bash: single retry on transient causes
multica issue runs "$ISSUE" 2>/tmp/err || {
  grep -qE 'timeout|connection|50[0-3]' /tmp/err && exec multica issue runs "$ISSUE"
  cat /tmp/err >&2; exit 1;
}

Prevention

When it happens

Trigger: Issue deleted between resolution and the runs fetch; token lacks read scope for task runs; server error; network drop.

Common situations: Race with concurrent deletion; scope-limited service accounts; server restarts mid-command.

Related errors


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