multica-ai/multica · error
--runtime-id is required
Error message
--runtime-id is required
What it means
runAgentCreate's second required-flag check: the agent must reference a runtime, so --runtime-id must be non-empty before the create body is built. Without a runtime the server could not determine how to execute the agent.
Source
Thrown at server/cmd/multica/cmd_agent.go:643
targets = append(targets, map[string]any{"target_type": "member", "target_id": m})
}
}
body["invocation_targets"] = targets
}
func runAgentCreate(cmd *cobra.Command, _ []string) error {
client, err := newAPIClient(cmd)
if err != nil {
return err
}
name, _ := cmd.Flags().GetString("name")
if name == "" {
return fmt.Errorf("--name is required")
}
runtimeID, _ := cmd.Flags().GetString("runtime-id")
if runtimeID == "" {
return fmt.Errorf("--runtime-id is required")
}
body := map[string]any{
"name": name,
"runtime_id": runtimeID,
}
if v, _ := cmd.Flags().GetString("description"); v != "" {
body["description"] = v
}
if v, _ := cmd.Flags().GetString("instructions"); v != "" {
body["instructions"] = v
}
if cmd.Flags().Changed("runtime-config") {
v, _ := cmd.Flags().GetString("runtime-config")
var rc any
if err := json.Unmarshal([]byte(v), &rc); err != nil {
return fmt.Errorf("--runtime-config must be valid JSON: %w", err)
}View on GitHub (pinned to 2c0912b6ec)
Solutions
- List available runtimes and copy the exact ID into --runtime-id.
- In scripts, fail fast when the runtime variable is empty rather than calling the CLI.
- Verify the runtime ID still exists if the command was drafted earlier.
Example fix
# before multica agent create --name "code-reviewer" # after multica agent create --name "code-reviewer" --runtime-id rt_cli
Defensive patterns
Strategy: validation
Validate before calling
runtimeID := strings.TrimSpace(runtimeIDFlag)
if runtimeID == "" {
return fmt.Errorf("--runtime-id is required")
}
// Optionally verify it exists before create:
if !runtimeExists(ctx, client, runtimeID) {
return fmt.Errorf("runtime %q not found", runtimeID)
} Prevention
- Fetch the runtime list once and reference IDs from it, not memory.
- Make create scripts fail fast when the runtime variable is empty.
- Keep runtime IDs in a config file with a linter check rather than inline in many commands.
When it happens
Trigger: Running agent create with --name supplied but --runtime-id omitted or empty; referencing a runtime ID variable that was never populated.
Common situations: Not knowing which runtimes exist; copy-pasting a create command template and replacing only the name; runtime ID from a list command that was archived since.
Related errors
- --name is required
- --runtime-config must be valid JSON: %w
- invalid direction %q (want \"up\" or \"down\")
- list agents: %w
- get agent: %w
AI-assisted analysis of multica-ai/multica@2c0912b6ec (2026-08-15).
Data as JSON: /api/errors/ed5b48b9bc25eab2.
Report an issue: GitHub.