multica-ai/multica · error

list agent skills: %w

Error message

list agent skills: %w

What it means

Wrapped error returned when `multica agent skills <id>` (list) fails to GET `/api/agents/{id}/skills`. The wrapped cause is typically 404 for an unknown agent id, 401/403 for auth/permission issues, or a connection failure to the multica server.

Source

Thrown at server/cmd/multica/cmd_agent.go:999

	return nil
}

// ---------------------------------------------------------------------------
// Agent skills subcommands
// ---------------------------------------------------------------------------

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

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

	var skills []map[string]any
	if err := client.GetJSON(ctx, "/api/agents/"+args[0]+"/skills", &skills); err != nil {
		return fmt.Errorf("list agent skills: %w", err)
	}

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

	headers := []string{"ID", "NAME", "DESCRIPTION"}
	rows := make([][]string, 0, len(skills))
	for _, s := range skills {
		rows = append(rows, []string{
			strVal(s, "id"),
			strVal(s, "name"),
			strVal(s, "description"),
		})
	}
	cli.PrintTable(os.Stdout, headers, rows)
	return nil

View on GitHub (pinned to 2c0912b6ec)

Solutions

  1. Confirm the agent id with `multica agent list` and retry
  2. Verify the server is running and API URL/token env vars are correct
  3. Treat 403 as a workspace-permission issue — check membership/role
  4. In automation, catch 404 and skip/prune the dead agent id

Example fix

# before
multica agent skills agt_x
# Error: list agent skills: 404: agent not found

# after
multica agent list
multica agent skills agt_1
Defensive patterns

Strategy: try-catch

Validate before calling

multica agent get "$AGENT_ID" >/dev/null 2>&1 || { echo 'agent not found'; exit 0; }
multica agent skills "$AGENT_ID"

Try / catch

skills, err := fetchAgentSkills(id)
if err != nil {
	if isNotFound(err) { return nil }
	return fmt.Errorf("list agent skills: %w", err)
}

Prevention

When it happens

Trigger: Listing skills of a mistyped/deleted agent id, or when the server is unreachable or the token is invalid/expired.

Common situations: Auditing agent configurations in scripts where agent ids have churned; stale shell history; CLI pointed at a different workspace than expected.

Related errors


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