multica-ai/multica · error
cascade delete runtime
Error message
cascade delete runtime: %w
What it means
Wraps the failure of the cascade-delete POST /api/runtimes/{id}/delete (with expected_active_agent_ids from the detected conflict) that runs after the user passed --cascade. The plain (non-cascade) delete already failed with an agent-binding conflict; this error means even the forced unbind-and-delete round-trip failed.
Solutions
- Check the server response for details and retry the cascade delete.
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at server/cmd/multica/cmd_runtime.go:251 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/f04b0dd42f633e5e.
Report an issue: GitHub.
Appendix: source
Thrown at server/cmd/multica/cmd_runtime.go:251
conflict, ok := runtimeDeleteConflict(err)
if !ok {
return fmt.Errorf("delete runtime: %w", err)
}
cascade, _ := cmd.Flags().GetBool("cascade")
if !cascade {
return fmt.Errorf(
"delete runtime: runtime has active agents bound to it (%s); rebind them to another runtime first, or rerun with --cascade to unbind them and delete the runtime (the agents and their history are kept)",
strings.Join(conflict.AgentDisplays(), ", "),
)
}
body := map[string]any{
"expected_active_agent_ids": conflict.AgentIDs(),
}
var result map[string]any
if err := client.PostJSON(ctx, "/api/runtimes/"+runtimeID+"/unbind-agents-and-delete", body, &result); err != nil {
return fmt.Errorf("cascade delete runtime: %w", err)
}
result["id"] = runtimeID
result["deleted"] = true
return printRuntimeDeleteResult(cmd, result)
}
func runRuntimeRename(cmd *cobra.Command, args []string) error {
client, err := newAPIClient(cmd)
if err != nil {
return err
}
machine, _ := cmd.Flags().GetBool("machine")
body := map[string]any{"custom_name": args[1]}
if machine {
body["apply_to_machine"] = true
}
View on GitHub (pinned to 2c0912b6ec)