{"record":{"id":"bc97b3271a4f100d","repo":"paperclipai/paperclip","slug":"run-templates-are-not-ready","errorCode":null,"errorMessage":"Run templates are not ready.","messagePattern":"Run templates are not ready\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"ui/src/pages/SkillStudio.tsx","lineNumber":2464,"sourceCode":"        title: \"Template deleted\",\n        body: `${template.name} was removed from Skills Studio runs.`,\n      });\n    },\n    onError: onError(\"Couldn't delete template\"),\n  });\n\n  const selectedTemplate = selectedTemplateId === null\n    ? null\n    : templates.find((template) => template.id === selectedTemplateId) ?? null;\n  const selectedTemplateName = selectedTemplateId === null\n    ? \"No template\"\n    : selectedTemplate?.name ?? \"Default test template\";\n  const runDisabledReason = gate.reason ?? templateGateReason;\n\n  const createRunMutation = useMutation({\n    mutationFn: () => {\n      if (!templatesQuery.isSuccess) {\n        throw new Error(templateGateReason ?? \"Run templates are not ready.\");\n      }\n      const resolution = resolveRunTemplateSelection(selectedTemplateId, templates);\n      if (resolution.recovered) {\n        updateTemplateSelection(resolution.selection);\n        throw new Error(\"Selected run template is no longer available. The selection was reset.\");\n      }\n      return companySkillsApi.createTestRun(companyId, skillId, buildCreateRunRequest({\n        agentId: selectedAgentId!,\n        inputId: adHocMode ? null : selectedInput?.id ?? null,\n        content: adHocMode ? adHocContent : selectedInput ? null : adHocContent,\n        templateId: resolution.selection,\n      }));\n    },\n    onSuccess: (run) => {\n      queryClient.invalidateQueries({\n        queryKey: queryKeys.companySkills.testRuns(companyId, skillId, filterInputId),\n      });\n      onSelectRun(run.id);","sourceCodeStart":2446,"sourceCodeEnd":2482,"githubUrl":"https://github.com/paperclipai/paperclip/blob/120ae5428fa29bee300bcf806491cd4d965fbb7c/ui/src/pages/SkillStudio.tsx#L2446-L2482","documentation":"Error \"Run templates are not ready.\" thrown in paperclipai/paperclip.","triggerScenarios":"Thrown at ui/src/pages/SkillStudio.tsx:2464 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Wait for run templates to finish loading, then retry."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"120ae5428fa29bee300bcf806491cd4d965fbb7c","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}