{"record":{"id":"a44f88d5e200ef05","repo":"multica-ai/multica","slug":"resolve-task-run-w","errorCode":null,"errorMessage":"resolve task run: %w","messagePattern":"resolve task run: %w","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/cmd/multica/cmd_issue.go","lineNumber":2198,"sourceCode":"\tclient, err := newAPIClient(cmd)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tctx, cancel := cli.APIContext(context.Background())\n\tdefer cancel()\n\n\tissueID := \"\"\n\tif issueInput, _ := cmd.Flags().GetString(\"issue\"); issueInput != \"\" {\n\t\tissueRef, err := resolveIssueRef(ctx, client, issueInput)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"resolve issue: %w\", err)\n\t\t}\n\t\tissueID = issueRef.ID\n\t}\n\ttaskRef, err := resolveTaskRunID(ctx, client, issueID, args[0])\n\tif err != nil {\n\t\treturn fmt.Errorf(\"resolve task run: %w\", err)\n\t}\n\n\tpath := \"/api/tasks/\" + url.PathEscape(taskRef.ID) + \"/messages\"\n\tif since, _ := cmd.Flags().GetInt(\"since\"); since > 0 {\n\t\tpath += fmt.Sprintf(\"?since=%d\", since)\n\t}\n\n\tvar messages []map[string]any\n\tif err := client.GetJSON(ctx, path, &messages); err != nil {\n\t\treturn fmt.Errorf(\"list run messages: %w\", err)\n\t}\n\n\toutput, _ := cmd.Flags().GetString(\"output\")\n\tif output == \"json\" {\n\t\treturn cli.PrintJSON(os.Stdout, messages)\n\t}\n\n\theaders := []string{\"SEQ\", \"TYPE\", \"TOOL\", \"CONTENT\"}","sourceCodeStart":2180,"sourceCodeEnd":2216,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/cmd/multica/cmd_issue.go#L2180-L2216","documentation":"`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.","triggerScenarios":"Passing a truncated run ID that matches runs across multiple issues without --issue; a deleted or mistyped run ID; API lookup failure.","commonSituations":"Short-hash style run references copied from table output; runs cleaned up by retention before the messages command runs.","solutions":["Add --issue <issue-ref> to disambiguate short run IDs.","Use the full run ID from `multica issue runs <issue>`.","Fix auth/connectivity if the lookup itself errors."],"exampleFix":"# before\nmultica issue run messages abc1\n# after\nmultica issue run messages abc1 --issue ISS-1","handlingStrategy":"validation","validationCode":"# bash: always scope short run IDs with a validated issue\nif [[ ${#RUN_REF} -lt 12 && -z \"$ISSUE_OPT\" ]]; then\n  echo \"short run ID needs --issue for disambiguation\" >&2; exit 2\nfi","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Pass full run IDs copied from `multica issue runs` output.","Pair short run IDs with --issue consistently in scripts."],"tags":["cli","api-client","task-runs","reference-resolution"],"backgroundTag":null,"analyzedSha":"2c0912b6ec764b373d44eeea1e80f0d9f11ab417","analyzedAt":"2026-08-15T13:25:18.241Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}