mastra-ai/mastra · error · Error
Cannot resume workflow: workflows store is required
Error message
Cannot resume workflow: workflows store is required
What it means
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.
Source
Thrown at packages/core/src/workflows/evented/workflow.ts:2327
user: params.requestContext?.get('user' as any),
resource: { type: 'workflow', id: getWorkflowFGAResourceId(this.workflowId) },
permission: MastraFGAPermissions.WORKFLOWS_EXECUTE,
requestContext: params.requestContext,
actor: params.actor,
context: {
resourceId: this.resourceId,
},
metadata: {
workflowId: this.workflowId,
runId: this.runId,
resourceId: this.resourceId,
},
});
}
const workflowsStore = await this.mastra?.getStorage()?.getStore('workflows');
if (!workflowsStore) {
throw new Error('Cannot resume workflow: workflows store is required');
}
const snapshot = await waitForSuspendedSnapshot(workflowsStore, this.workflowId, this.runId);
if (!snapshot) {
throw new Error(`Cannot resume workflow: no snapshot found for runId ${this.runId}`);
}
// Check if workflow is suspended before proceeding
if (snapshot.status !== 'suspended') {
throw new Error('This workflow run was not suspended');
}
// Resolve label to step path if provided
const snapshotResumeLabel = params.label ? snapshot?.resumeLabels?.[params.label] : undefined;
// Validate label exists if provided
if (params.label && !snapshotResumeLabel) {
const availableLabels = Object.keys(snapshot?.resumeLabels ?? {});
throw new Error(View on GitHub (pinned to 75dd419e61)
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)
Example fix
// before
const mastra = new Mastra({ workflows: { w } }); // no storage
// after
const mastra = new Mastra({
workflows: { w },
storage: new LibSQLStore({ url: process.env.DB_URL }),
}); Defensive patterns
Strategy: validation
Validate before calling
const store = await mastra?.getStorage()?.getStore('workflows');
if (!store) throw new Error('Configure a storage backend with workflow persistence before resuming'); Type guard
function hasWorkflowsStore(mastra) {
return Boolean(mastra?.getStorage);
} // then verify store at runtime
Try / catch
try {
await run.resume({ runId, step, resumeData });
} catch (e) {
if (e.message.includes('workflows store is required')) {
throw new Error('Storage not configured — add a storage plugin supporting workflows', { cause: e });
}
throw e;
} Prevention
- 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
When it happens
Trigger: 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).
Common situations: 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.
Related errors
- ATOMIC_STORAGE_OPERATIONS_NOT_SUPPORTED
- Cannot resume workflow: no snapshot found for runId ${this.r
- Resume label "${params.label}" not found. Available labels:
- No snapshot found for this workflow run: ${this.workflowId}
- AcpAgent does not support resuming suspended generate calls
AI-assisted analysis of mastra-ai/mastra@75dd419e61 (2026-08-30).
Data as JSON: /api/errors/1f165400c8bd2bf8.
Report an issue: GitHub.