{"record":{"id":"6f9c572a3a0c82b3","repo":"paperclipai/paperclip","slug":"choose-an-existing-workspace-before-saving-this-st","errorCode":null,"errorMessage":"Choose an existing workspace before saving this stage.","messagePattern":"Choose an existing workspace before saving this stage\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"ui/src/pages/PipelineSettings.tsx","lineNumber":1778,"sourceCode":"  }, [pipeline]);\n\n  const refreshPipeline = async () => {\n    if (!pipelineId) return;\n    await queryClient.invalidateQueries({ queryKey: queryKeys.pipelines.detail(pipelineId) });\n    await queryClient.invalidateQueries({ queryKey: queryKeys.pipelines.intakeForm(pipelineId) });\n    await queryClient.invalidateQueries({ queryKey: queryKeys.pipelines.health(pipelineId) });\n  };\n\n  const saveStage = useMutation({\n    mutationFn: async () => {\n      if (!pipelineId || !selectedStage || !pipeline) return null;\n      if (\n        stageProjectId &&\n        selectedProjectSupportsExecutionWorkspace &&\n        stageExecutionWorkspacePreference === \"reuse_existing\" &&\n        !stageExecutionWorkspaceId\n      ) {\n        throw new Error(\"Choose an existing workspace before saving this stage.\");\n      }\n      const parsedApproval = parseApprovalValue(selectedApproval);\n      const nextRequiresApproval = stageKind === \"review\";\n      const config: StageConfig = {\n        ...stageConfig(selectedStage),\n        variables: stripVariablesByName(instructionsVariables, resolvedAutomationVariableKeys),\n        disabled: newEntriesDisabled,\n        disabledReason: newEntriesDisabled ? disableReason.trim() || null : null,\n        automation: buildStageAutomationForSave({\n          assigneeAgentId: stageAssigneeAgentId,\n          titleTemplate: issueTitleTemplate,\n          instructionsBody,\n          projectId: stageProjectId,\n          projectWorkspaceId: stageProjectWorkspaceId,\n          executionWorkspaceId: stageExecutionWorkspaceId,\n          executionWorkspacePreference: stageExecutionWorkspacePreference,\n          executionWorkspaceSettings: currentAutomationExecutionWorkspaceSettings,\n        }),","sourceCodeStart":1760,"sourceCodeEnd":1796,"githubUrl":"https://github.com/paperclipai/paperclip/blob/120ae5428fa29bee300bcf806491cd4d965fbb7c/ui/src/pages/PipelineSettings.tsx#L1760-L1796","documentation":"Error \"Choose an existing workspace before saving this stage.\" thrown in paperclipai/paperclip.","triggerScenarios":"Thrown at ui/src/pages/PipelineSettings.tsx:1778 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Choose an existing workspace for the stage before saving."],"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"}