{"record":{"id":"0f7fc57aec634eba","repo":"mastra-ai/mastra","slug":"no-suspended-steps-found-in-this-workflow-run-0f7fc5","errorCode":null,"errorMessage":"No suspended steps found in this workflow run","messagePattern":"No suspended steps found in this workflow run","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/core/src/workflows/workflow.ts","lineNumber":4481,"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    if (!params.retryCount) {\n      const suspendedStepIds = Object.keys(snapshot?.suspendedPaths ?? {});\n\n      const isStepSuspended = suspendedStepIds.includes(steps?.[0] ?? '');","sourceCodeStart":4463,"sourceCodeEnd":4499,"githubUrl":"https://github.com/mastra-ai/mastra/blob/75dd419e613fe9c39f846ffc500716141b74fda6/packages/core/src/workflows/workflow.ts#L4463-L4499","documentation":"Thrown when resume() is called without a step and auto-detection of suspended steps (from snapshot.suspendedPaths) finds zero suspended steps, even though the run reports status 'suspended'.","triggerScenarios":"Calling resume({ resumeData }) with no step on a suspended run whose suspendedPaths is empty or whose context entries don't show step status 'suspended'; nested-workflow metadata (suspendPayload.__workflow_meta.path) missing so paths can't be assembled.","commonSituations":"Storage adapters dropping suspendedPaths metadata; manually edited/corrupted snapshots; resuming a nested workflow run using the parent run's handle instead of the child's; passing a label that maps to nothing combined with no step.","solutions":["Pass the suspended step explicitly: resume({ resumeData, step: 'stepId' }).","Inspect snapshot.suspendedPaths to see which steps the engine recorded as suspended.","If suspending inside a nested workflow, resume using the correct nested path ([parentStepId, ...nestedPath]) or the child run handle.","Check you're not resuming an old snapshot from a previous version of the workflow definition."],"exampleFix":"// before\nawait run.resume({ resumeData }); // auto-detect fails\n// after\nawait run.resume({ resumeData, step: 'humanApproval' });","handlingStrategy":"validation","validationCode":"const snapshot = await run.getWorkflowRunState();\nif (Object.keys(snapshot.suspendedPaths ?? {}).length === 0) {\n  throw new Error('Run has no recorded suspended steps');\n}","typeGuard":"function hasSuspendedPaths(s: { suspendedPaths?: Record<string, unknown> }): boolean {\n  return Object.keys(s.suspendedPaths ?? {}).length > 0;\n}","tryCatchPattern":"try {\n  await run.resume({ resumeData });\n} catch (e) {\n  if (e instanceof Error && e.message === 'No suspended steps found in this workflow run') {\n    // pass an explicit step or inspect the snapshot\n  } else throw e;\n}","preventionTips":["Always pass an explicit step when your workflow uses suspend().","Inspect suspendedPaths to learn valid step ids.","Be careful resuming nested workflows with parent handles; use the right path.","Avoid hand-editing persisted snapshots."],"tags":["workflow","resume","suspended-steps"],"backgroundTag":"workflow-no-suspended-steps","analyzedSha":"75dd419e613fe9c39f846ffc500716141b74fda6","analyzedAt":"2026-08-30T00:15:31.844Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}