{"record":{"id":"b17da4430ee3713f","repo":"mastra-ai/mastra","slug":"no-suspended-steps-found-in-this-workflow-run","errorCode":null,"errorMessage":"No suspended steps found in this workflow run","messagePattern":"No suspended steps found in this workflow run","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/core/src/workflows/evented/workflow.ts","lineNumber":2386,"sourceCode":"        // Check if this step has nested workflow suspension data\n        const stepResult = snapshot?.context?.[stepId];\n        if (stepResult && typeof stepResult === 'object' && 'status' in stepResult) {\n          const stepRes = stepResult as any;\n          if (stepRes.status === 'suspended') {\n            const nestedPath = stepRes.suspendPayload?.__workflow_meta?.path;\n            if (nestedPath && Array.isArray(nestedPath)) {\n              // For nested workflows, combine the parent step ID with the nested path\n              suspendedStepPaths.push([stepId, ...nestedPath]);\n            } else {\n              // For single-level suspension, just use the step ID\n              suspendedStepPaths.push([stepId]);\n            }\n          }\n        }\n      });\n\n      if (suspendedStepPaths.length === 0) {\n        throw new Error('No suspended steps found in this workflow run');\n      }\n\n      if (suspendedStepPaths.length === 1) {\n        // For single suspended step, use the full path\n        steps = suspendedStepPaths[0]!;\n      } else {\n        const pathStrings = suspendedStepPaths.map(path => `[${path.join(', ')}]`);\n        throw new Error(\n          `Multiple suspended steps found: ${pathStrings.join(', ')}. ` +\n            'Please specify which step to resume using the \"step\" parameter.',\n        );\n      }\n    }\n\n    // Validate that the step is actually suspended\n    const suspendedStepIds = Object.keys(snapshot?.suspendedPaths ?? {});\n    const isStepSuspended = suspendedStepIds.includes(steps?.[0] ?? '');\n","sourceCodeStart":2368,"sourceCodeEnd":2404,"githubUrl":"https://github.com/mastra-ai/mastra/blob/75dd419e613fe9c39f846ffc500716141b74fda6/packages/core/src/workflows/evented/workflow.ts#L2368-L2404","documentation":"When resume() is called without a step or label, the library inspects the snapshot to enumerate suspended step paths and pick which step(s) to resume. If none of the steps in the snapshot's context are suspended (even though snapshot.status said 'suspended'), there is nothing to target and it throws.","triggerScenarios":"Calling resume() with neither step nor label on a snapshot whose status is 'suspended' but whose suspended step bookkeeping is empty — e.g. a nested/parallel flow where suspension state was recorded at the top level but per-step paths weren't persisted, or a corrupted/hand-edited snapshot.","commonSituations":"Migrated snapshots from older versions lacking the suspended-step structure; resuming runs created by nested workflows where the inner step holds the suspension; custom storage writes that dropped context.status data.","solutions":["Pass an explicit step (and nested path if needed) to resume: run.resume({ runId, step: myStep, resumeData })","Use a suspend label so resume doesn't need to infer the step","Re-run the workflow if the snapshot is corrupt; verify storage contents for context.status === 'suspended' entries"],"exampleFix":"// before\nawait run.resume({ runId, resumeData }); // no step, none inferred\n// after\nawait run.resume({ runId, step: approvalStep, resumeData });","handlingStrategy":"fallback","validationCode":"const snapshot = await storage.loadWorkflowSnapshot({ workflowId, runId });\nconst hasSuspendedSteps = Object.values(snapshot?.context?.steps ?? {}).some(\n  (s) => s?.status === 'suspended',\n);\nif (!hasSuspendedSteps) throw new Error('No suspended steps to resume; pass an explicit step or restart the run');","typeGuard":"null","tryCatchPattern":"try {\n  await run.resume({ runId, resumeData });\n} catch (e) {\n  if (e.message.includes('No suspended steps found')) {\n    // fall back to explicit step resume or start a new run\n    await run.resume({ runId, step: approvalStep, resumeData });\n  } else throw e;\n}","preventionTips":["Always pass an explicit step or label to resume() instead of relying on inference","Avoid hand-editing or manually migrating workflow snapshots","For nested workflows, resume the inner workflow's run at its suspended step"],"tags":["workflow","resume","suspended-step"],"backgroundTag":"workflow-not-suspended","analyzedSha":"75dd419e613fe9c39f846ffc500716141b74fda6","analyzedAt":"2026-08-30T00:15:31.844Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}