mastra-ai/mastra · error
No suspended steps found in this workflow run
Error message
No suspended steps found in this workflow run
What it means
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'.
Source
Thrown at packages/core/src/workflows/workflow.ts:4481
// Check if this step has nested workflow suspension data
const stepResult = snapshot?.context?.[stepId];
if (stepResult && typeof stepResult === 'object' && 'status' in stepResult) {
const stepRes = stepResult as any;
if (stepRes.status === 'suspended') {
const nestedPath = stepRes.suspendPayload?.__workflow_meta?.path;
if (nestedPath && Array.isArray(nestedPath)) {
// For nested workflows, combine the parent step ID with the nested path
suspendedStepPaths.push([stepId, ...nestedPath]);
} else {
// For single-level suspension, just use the step ID
suspendedStepPaths.push([stepId]);
}
}
}
});
if (suspendedStepPaths.length === 0) {
throw new Error('No suspended steps found in this workflow run');
}
if (suspendedStepPaths.length === 1) {
// For single suspended step, use the full path
steps = suspendedStepPaths[0]!;
} else {
const pathStrings = suspendedStepPaths.map(path => `[${path.join(', ')}]`);
throw new Error(
`Multiple suspended steps found: ${pathStrings.join(', ')}. ` +
'Please specify which step to resume using the "step" parameter.',
);
}
}
if (!params.retryCount) {
const suspendedStepIds = Object.keys(snapshot?.suspendedPaths ?? {});
const isStepSuspended = suspendedStepIds.includes(steps?.[0] ?? '');View on GitHub (pinned to 75dd419e61)
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.
Example fix
// before
await run.resume({ resumeData }); // auto-detect fails
// after
await run.resume({ resumeData, step: 'humanApproval' }); Defensive patterns
Strategy: validation
Validate before calling
const snapshot = await run.getWorkflowRunState();
if (Object.keys(snapshot.suspendedPaths ?? {}).length === 0) {
throw new Error('Run has no recorded suspended steps');
} Type guard
function hasSuspendedPaths(s: { suspendedPaths?: Record<string, unknown> }): boolean {
return Object.keys(s.suspendedPaths ?? {}).length > 0;
} Try / catch
try {
await run.resume({ resumeData });
} catch (e) {
if (e instanceof Error && e.message === 'No suspended steps found in this workflow run') {
// pass an explicit step or inspect the snapshot
} else throw e;
} Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- Cannot resume workflow: workflows store is required
- Cannot resume workflow: no snapshot found for runId ${this.r
- This workflow run was not suspended
- Resume label "${params.label}" not found. Available labels:
- No suspended steps found in this workflow run
AI-assisted analysis of mastra-ai/mastra@75dd419e61 (2026-08-30).
Data as JSON: /api/errors/0f7fc57aec634eba.
Report an issue: GitHub.