{"record":{"id":"fb66eaa2c9ac71a3","repo":"paperclipai/paperclip","slug":"selected-run-template-is-no-longer-available-the","errorCode":null,"errorMessage":"Selected run template is no longer available. The selection was reset.","messagePattern":"Selected run template is no longer available\\. The selection was reset\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"ui/src/pages/SkillStudio.tsx","lineNumber":2469,"sourceCode":"  });\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);\n    },\n    onError: onError(\"Couldn't start run\"),\n  });\n\n  if (selectedRunId) {","sourceCodeStart":2451,"sourceCodeEnd":2487,"githubUrl":"https://github.com/paperclipai/paperclip/blob/120ae5428fa29bee300bcf806491cd4d965fbb7c/ui/src/pages/SkillStudio.tsx#L2451-L2487","documentation":"Error \"Selected run template is no longer available. The selection was reset.\" thrown in paperclipai/paperclip.","triggerScenarios":"Thrown at ui/src/pages/SkillStudio.tsx:2469 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pick a run template from the current list; the previous selection was reset because it no longer exists."],"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-14T00:17:10.932Z"}