mastra-ai/mastra · error · Error
Multiple suspended steps found: ${pathStrings.join(', ')}. P
Error message
Multiple suspended steps found: ${pathStrings.join(', ')}. Please specify which step to resume using the "step" parameter. What it means
When resuming an evented workflow without an explicit "step" parameter, Mastra looks up the snapshot's suspendedPaths. If exactly one step is suspended it auto-selects it; if more than one is suspended it cannot disambiguate, so it throws listing all suspended step paths and asks the caller to pass "step". This prevents resuming the wrong branch of the workflow.
Source
Thrown at packages/core/src/workflows/evented/workflow.ts:2394
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.',
);
}
}
// Validate that the step is actually suspended
const suspendedStepIds = Object.keys(snapshot?.suspendedPaths ?? {});
const isStepSuspended = suspendedStepIds.includes(steps?.[0] ?? '');
if (!isStepSuspended) {
throw new Error(
`This workflow step "${steps?.[0]}" was not suspended. Available suspended steps: [${suspendedStepIds.join(', ')}]`,
);
}
const resumePath = snapshot.suspendedPaths?.[steps[0]!] as any;
// Start with the snapshot's request context (old values)View on GitHub (pinned to 75dd419e61)
Solutions
- Pass the step to resume: workflow.resume({ runId, resumeData, step: [stepId] }) (nested steps use the full path array, e.g. step: ['parent', 'child']).
- Inspect snapshot.suspendedPaths (via getWorkflowRunState / the error message) to see which paths are suspended and pick the intended one.
- If you want auto-resume to work, ensure only one step is suspended per resume (resume sequentially, one branch at a time).
Example fix
// before
await workflow.resume({ runId, resumeData: { approved: true } });
// after
await workflow.resume({ runId, resumeData: { approved: true }, step: ['humanApproval'] }); Defensive patterns
Strategy: validation
Validate before calling
const snap = await workflow.getWorkflowRunState(runId);
const suspended = Object.keys(snap?.suspendedPaths ?? {});
if (suspended.length > 1) {
throw new Error(`Ambiguous resume: pick one of ${suspended.join(', ')}`);
}
await workflow.resume({ runId, resumeData, step: [suspended[0]!] }); Try / catch
try {
await workflow.resume({ runId, resumeData });
} catch (err) {
if (err instanceof Error && err.message.startsWith('Multiple suspended steps found')) {
const steps = err.message.match(/\[(.*?)\]/g)?.map(s => s.slice(1, -1));
await workflow.resume({ runId, resumeData, step: JSON.parse(`[${steps?.[0]}]`) });
} else throw err;
} Prevention
- Always pass an explicit step parameter when the workflow has any suspend() inside parallel/branch constructs.
- Log snapshot.suspendedPaths before resuming during development.
- Resume branches sequentially so only one step is suspended at a time when auto-resume is desired.
When it happens
Trigger: Calling workflow.resume({ runId, resumeData }) (or resume with no step) on a run whose snapshot.suspendedPaths contains two or more entries, e.g. after parallel/branch steps both suspended with .suspend().
Common situations: Workflows using parallel() or conditionally-exclusive branches where two or more steps call suspend(); developers added a second suspend point after initial testing with only one suspended step; fan-out patterns resuming without a step selector.
Related errors
- This workflow step "${steps?.[0]}" was not suspended. Availa
- AGENT_RESUME_NO_SNAPSHOT_FOUND
- AGENT_RESUME_TOOL_CALL_NOT_SUSPENDED
- Cannot resume workflow: workflows store is required
- Cannot resume workflow: no snapshot found for runId ${this.r
AI-assisted analysis of mastra-ai/mastra@75dd419e61 (2026-08-30).
Data as JSON: /api/errors/5857ebe0a19bfaf0.
Report an issue: GitHub.