multica-ai/multica · error

resolve autopilot

Error message

resolve autopilot: %w

What it means

CLI error in runAutopilotGet: resolving the positional autopilot argument (name or ID) to a concrete autopilot ID failed — unknown name, ambiguous reference, or lookup API error. Wrapped with 'resolve autopilot: %w'; verify the identifier with `autopilot list`.

Solutions

  1. Verify the autopilot id or name and workspace context.
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at server/cmd/multica/cmd_autopilot.go:236 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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

Appendix: source

Thrown at server/cmd/multica/cmd_autopilot.go:236

			strVal(a, "last_run_at"),
		})
	}
	cli.PrintTable(os.Stdout, headers, rows)
	return nil
}

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

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

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

	var resp map[string]any
	if err := client.GetJSON(ctx, "/api/autopilots/"+autopilotRef.ID, &resp); err != nil {
		return fmt.Errorf("get autopilot: %w", err)
	}

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

	ap, _ := resp["autopilot"].(map[string]any)
	actors := loadActorDisplayLookup(ctx, client)
	headers := []string{"ID", "TITLE", "STATUS", "MODE", "ASSIGNEE", "LAST_RUN"}
	rows := [][]string{{
		strVal(ap, "id"),
		strVal(ap, "title"),

View on GitHub (pinned to 2c0912b6ec)