{"record":{"id":"2d0a6a23abbe3b3f","repo":"mastra-ai/mastra","slug":"atomic-storage-operations-not-supported","errorCode":"ATOMIC_STORAGE_OPERATIONS_NOT_SUPPORTED","errorMessage":"Workflow \"${this.id}\" runs on the evented execution engine, which requires a storage adapter that supports concurrent updates. Your current workflow storage adapter does not. Switch to an adapter that does (for example @mastra/libsql), or, if you do not need scheduled execution, remove the `schedule` field from this workflow's definition to use the default execution engine.","messagePattern":"Workflow \"(.+?)\" runs on the evented execution engine, which requires a storage adapter that supports concurrent updates\\. Your current workflow storage adapter does not\\. Switch to an adapter that does \\(for example @mastra/libsql\\), or, if you do not need scheduled execution, remove the `schedule` field from this workflow's definition to use the default execution engine\\.","errorType":"error_code","errorClass":"MastraError","httpStatus":null,"severity":"error","filePath":"packages/core/src/workflows/evented/workflow.ts","lineNumber":1737,"sourceCode":"    resourceId?: string;\n    disableScorers?: boolean;\n  }): Promise<Run<TEngineType, TSteps, TState, TInput, TOutput>> {\n    if (this.stepFlow.length === 0) {\n      throw new Error(\n        'Execution flow of workflow is not defined. Add steps to the workflow via .then(), .branch(), etc.',\n      );\n    }\n    if (!this.executionGraph.steps) {\n      throw new Error('Uncommitted step flow changes detected. Call .commit() to register the steps.');\n    }\n\n    const runIdToUse = options?.runId || randomUUID();\n\n    const workflowsStore = await this.mastra?.getStorage()?.getStore('workflows');\n\n    const supportsConcurrentUpdates = workflowsStore?.supportsConcurrentUpdates?.() ?? false;\n    if (workflowsStore && !supportsConcurrentUpdates) {\n      throw new MastraError({\n        id: 'ATOMIC_STORAGE_OPERATIONS_NOT_SUPPORTED',\n        domain: ErrorDomain.MASTRA,\n        category: ErrorCategory.USER,\n        text:\n          `Workflow \"${this.id}\" runs on the evented execution engine, which requires a storage adapter that supports concurrent updates. ` +\n          `Your current workflow storage adapter does not. Switch to an adapter that does (for example @mastra/libsql), or, if you do not need scheduled execution, ` +\n          `remove the \\`schedule\\` field from this workflow's definition to use the default execution engine.`,\n        details: { workflowId: this.id },\n      });\n    }\n\n    // Return a new Run instance with object parameters\n    const run: Run<TEngineType, TSteps, TState, TInput, TOutput> =\n      this.runs.get(runIdToUse) ??\n      new EventedRun({\n        workflowId: this.id,\n        runId: runIdToUse,\n        resourceId: options?.resourceId,","sourceCodeStart":1719,"sourceCodeEnd":1755,"githubUrl":"https://github.com/mastra-ai/mastra/blob/75dd419e613fe9c39f846ffc500716141b74fda6/packages/core/src/workflows/evented/workflow.ts#L1719-L1755","documentation":"The evented execution engine requires the workflow storage adapter to support concurrent (atomic) updates — checked via `workflowsStore.supportsConcurrentUpdates()` — because scheduled execution coordinates runs through storage. `createRun()` throws this MastraError (id ATOMIC_STORAGE_OPERATIONS_NOT_SUPPORTED) when a store is configured but reports no concurrent-update support. The user must switch to a capable adapter (e.g. @mastra/libsql) or remove the `schedule` field to fall back to the default engine.","triggerScenarios":"Calling `createRun()` on a scheduled workflow running on the evented engine where `this.mastra.getStorage().getStore('workflows')` returns a store whose `supportsConcurrentUpdates()` returns false/undefined (workflow.ts:1733-1747).","commonSituations":"Using an in-memory or legacy storage adapter (or one without `supportsConcurrentUpdates`) with scheduled workflows; deploying to an environment where the configured storage lacks atomic operations; following older setup guides that predate the concurrent-updates requirement.","solutions":["Install and configure a storage adapter that supports concurrent updates, e.g. `@mastra/libsql`, via `Mastra({ storage: new LibSQLStore(...) })`.","If scheduled execution is not needed, remove the `schedule` field from the workflow definition so it uses the default execution engine.","Upgrade your existing storage adapter to the latest version — concurrent-update support was added over time.","Feature-check before startup: call `supportsConcurrentUpdates()` on your store during boot and fail fast with a clear message."],"exampleFix":"// before\nnew Mastra({ storage: new InMemoryStore() }); // workflow has schedule: {...}\n\n// after\nimport { LibSQLStore } from '@mastra/libsql';\nnew Mastra({ storage: new LibSQLStore({ url: 'file:./mastra.db' }) });\n// or: remove `schedule` from the workflow params","handlingStrategy":"validation","validationCode":"async function assertStorageSupportsEvented(mastra: Mastra, workflow: Workflow): Promise<void> {\n  const store = await mastra.getStorage()?.getStore('workflows');\n  const ok = store?.supportsConcurrentUpdates?.() ?? false;\n  if (!ok && (workflow as any).params?.schedule) {\n    throw new Error('Scheduled evented workflows need a storage adapter with concurrent updates (e.g. @mastra/libsql)');\n  }\n}\nawait assertStorageSupportsEvented(mastra, workflow);","typeGuard":"function supportsConcurrentUpdates(store: unknown): store is { supportsConcurrentUpdates: () => boolean } {\n  return !!store && typeof (store as any).supportsConcurrentUpdates === 'function' && (store as any).supportsConcurrentUpdates() === true;\n}","tryCatchPattern":"try {\n  const run = await workflow.createRun();\n} catch (e) {\n  if (e instanceof MastraError && e.id === 'ATOMIC_STORAGE_OPERATIONS_NOT_SUPPORTED') {\n    // swap storage adapter or remove workflow schedule\n  } else throw e;\n}","preventionTips":["Use @mastra/libsql (or another adapter with concurrent updates) whenever workflows have schedules.","Feature-check `supportsConcurrentUpdates()` during app startup and fail fast.","Keep storage adapters upgraded; verify support after any storage migration."],"tags":["storage","workflow","scheduling","configuration","evented-engine"],"backgroundTag":"unsupported-storage-adapter","analyzedSha":"75dd419e613fe9c39f846ffc500716141b74fda6","analyzedAt":"2026-08-30T00:15:31.844Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}