{"record":{"id":"1f165400c8bd2bf8","repo":"mastra-ai/mastra","slug":"cannot-resume-workflow-workflows-store-is-require","errorCode":null,"errorMessage":"Cannot resume workflow: workflows store is required","messagePattern":"Cannot resume workflow: workflows store is required","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/core/src/workflows/evented/workflow.ts","lineNumber":2327,"sourceCode":"        user: params.requestContext?.get('user' as any),\n        resource: { type: 'workflow', id: getWorkflowFGAResourceId(this.workflowId) },\n        permission: MastraFGAPermissions.WORKFLOWS_EXECUTE,\n        requestContext: params.requestContext,\n        actor: params.actor,\n        context: {\n          resourceId: this.resourceId,\n        },\n        metadata: {\n          workflowId: this.workflowId,\n          runId: this.runId,\n          resourceId: this.resourceId,\n        },\n      });\n    }\n\n    const workflowsStore = await this.mastra?.getStorage()?.getStore('workflows');\n    if (!workflowsStore) {\n      throw new Error('Cannot resume workflow: workflows store is required');\n    }\n    const snapshot = await waitForSuspendedSnapshot(workflowsStore, this.workflowId, this.runId);\n    if (!snapshot) {\n      throw new Error(`Cannot resume workflow: no snapshot found for runId ${this.runId}`);\n    }\n\n    // Check if workflow is suspended before proceeding\n    if (snapshot.status !== 'suspended') {\n      throw new Error('This workflow run was not suspended');\n    }\n\n    // Resolve label to step path if provided\n    const snapshotResumeLabel = params.label ? snapshot?.resumeLabels?.[params.label] : undefined;\n\n    // Validate label exists if provided\n    if (params.label && !snapshotResumeLabel) {\n      const availableLabels = Object.keys(snapshot?.resumeLabels ?? {});\n      throw new Error(","sourceCodeStart":2309,"sourceCodeEnd":2345,"githubUrl":"https://github.com/mastra-ai/mastra/blob/75dd419e613fe9c39f846ffc500716141b74fda6/packages/core/src/workflows/evented/workflow.ts#L2309-L2345","documentation":"Resuming an evented workflow run requires reading the persisted snapshot from the workflows storage domain. this.mastra is unset or its storage has no 'workflows' store, so the resume cannot locate suspension state and the library throws before attempting resume.","triggerScenarios":"Calling resume() on an evented workflow run where mastra.getStorage() returns undefined, or getStore('workflows') returns undefined (storage configured without workflow persistence, e.g. libsql/upstash not set up).","commonSituations":"Running without any storage configured; using a storage adapter that doesn't implement the workflows domain; forgetting to pass mastra to the Workflow constructor so getStorage() short-circuits via optional chaining.","solutions":["Configure storage on the Mastra instance, e.g. new Mastra({ storage: new LibSQLStore({ url: process.env.DB_URL }) })","Verify the storage adapter supports the workflows store (getStore('workflows') !== undefined)","Ensure the workflow has a mastra reference (register it via mastra.addWorkflow or pass mastra to the Workflow constructor)"],"exampleFix":"// before\nconst mastra = new Mastra({ workflows: { w } }); // no storage\n// after\nconst mastra = new Mastra({\n  workflows: { w },\n  storage: new LibSQLStore({ url: process.env.DB_URL }),\n});","handlingStrategy":"validation","validationCode":"const store = await mastra?.getStorage()?.getStore('workflows');\nif (!store) throw new Error('Configure a storage backend with workflow persistence before resuming');","typeGuard":"function hasWorkflowsStore(mastra) {\n  return Boolean(mastra?.getStorage);\n} // then verify store at runtime\n","tryCatchPattern":"try {\n  await run.resume({ runId, step, resumeData });\n} catch (e) {\n  if (e.message.includes('workflows store is required')) {\n    throw new Error('Storage not configured — add a storage plugin supporting workflows', { cause: e });\n  }\n  throw e;\n}","preventionTips":["Always configure storage (e.g. LibSQLStore) in the Mastra instance","Confirm the storage adapter implements the workflows domain","Register the workflow with mastra so getStorage() is reachable"],"tags":["workflow","storage","resume","configuration"],"backgroundTag":"missing-storage-configuration","analyzedSha":"75dd419e613fe9c39f846ffc500716141b74fda6","analyzedAt":"2026-08-30T00:15:31.844Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}