{"record":{"id":"b35d80480b3f0b06","repo":"multica-ai/multica","slug":"cannot-delete-runtime-profile-s-s","errorCode":null,"errorMessage":"cannot delete runtime profile %s: %s","messagePattern":"cannot delete runtime profile (.+?): (.+?)","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/cmd/multica/cmd_runtime_profile.go","lineNumber":281,"sourceCode":"\tif err != nil {\n\t\treturn err\n\t}\n\n\tctx, cancel := cli.APIContext(context.Background())\n\tdefer cancel()\n\n\tpath := runtimeProfilesPath(workspaceID) + \"/\" + profileID\n\tif err := client.DeleteJSON(ctx, path); err != nil {\n\t\t// 409 means the server refused because active agents are still bound\n\t\t// to this profile. Surface the server's explanation verbatim rather\n\t\t// than the generic HTTP wrapper so the user sees what to unbind.\n\t\tvar httpErr *cli.HTTPError\n\t\tif errors.As(err, &httpErr) && httpErr.StatusCode == http.StatusConflict {\n\t\t\tmsg := strings.TrimSpace(httpErr.Body)\n\t\t\tif msg == \"\" {\n\t\t\t\tmsg = \"profile still has active agents bound to it\"\n\t\t\t}\n\t\t\treturn fmt.Errorf(\"cannot delete runtime profile %s: %s\", profileID, msg)\n\t\t}\n\t\treturn fmt.Errorf(\"delete runtime profile: %w\", err)\n\t}\n\tfmt.Printf(\"Deleted runtime profile %s\\n\", profileID)\n\treturn nil\n}\n\nfunc runRuntimeProfileSetPath(cmd *cobra.Command, args []string) error {\n\tif err := requireHumanLocalCommand(\"runtime profile set-path\"); err != nil {\n\t\treturn err\n\t}\n\tprofileID := args[0]\n\tpath, _ := cmd.Flags().GetString(\"path\")\n\tpath = strings.TrimSpace(path)\n\tif path == \"\" {\n\t\treturn fmt.Errorf(\"--path is required\")\n\t}\n\tif !filepath.IsAbs(path) {","sourceCodeStart":263,"sourceCodeEnd":299,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/cmd/multica/cmd_runtime_profile.go#L263-L299","documentation":"Error \"cannot delete runtime profile %s: %s\" thrown in multica-ai/multica.","triggerScenarios":"Thrown at server/cmd/multica/cmd_runtime_profile.go:281 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Resolve the reason given in the message (e.g. agents bound to the profile) before deleting."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2c0912b6ec764b373d44eeea1e80f0d9f11ab417","analyzedAt":"2026-08-15T13:25:18.241Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}