(Suspend/Resume support for runtime workflows) No snapshot found for this workflow run: runtime-***

I have a registered workflow-runner that has a first step execute-child-workflow that generates and runs a dynamic runtime workflow like @rase- mentioned here: https://discord.com/channels/1309558646228779139/1375392490521231431/1377257555956465714 Like this,
const executeChildWorkflow = createStep({
...
// Generate the child workflow (uncommitted)
const childWorkflow = generateMastraWorkflow(workflowId, workflowSpec, mastra);

// Commit the workflow to register all steps
childWorkflow.commit();

const childRun = await childWorkflow.createRunAsync({ runId: childRunId });

// Execute or resume the child workflow
let result;
if (resumeData) {
// Resuming: Call resume on the run (snapshot will be loaded automatically)
console.log(`[Workflow Runner] Resuming child workflow with data:`, resumeData);
result = await childRun.resume({
step: [childRun.workflowId, resumeData.stepId],
resumeData: resumeData,
});
} else {
// Starting fresh: Start the workflow
console.log(`[Workflow Runner] Starting child workflow`);
result = await childRun.start({
inputData: triggerData as Record<string, unknown>,
initialState: {
organizationId,
workflowId,
workflowRunId,
executionContext: initialContext,
},
});
}

// Sync child workflow state to parent WorkflowRun record
// The final step in the child workflow already updates the WorkflowRun,
// but we need to handle suspended state specially
if (result.status === 'suspended') {
console.log(`[Workflow Runner] Child workflow suspended, suspending parent workflow`);
// Suspend the parent workflow to propagate the suspension upward
// This is the key - we must call suspend() to make the parent workflow actually suspend
return await suspend({
reason: 'Child workflow suspended',
childWorkflowStatus: result.status,
suspendedSteps: result.suspended,
});
}

// For success/failure, the child workflow's final step already updated the WorkflowRun
return result;
...
})
const executeChildWorkflow = createStep({
...
// Generate the child workflow (uncommitted)
const childWorkflow = generateMastraWorkflow(workflowId, workflowSpec, mastra);

// Commit the workflow to register all steps
childWorkflow.commit();

const childRun = await childWorkflow.createRunAsync({ runId: childRunId });

// Execute or resume the child workflow
let result;
if (resumeData) {
// Resuming: Call resume on the run (snapshot will be loaded automatically)
console.log(`[Workflow Runner] Resuming child workflow with data:`, resumeData);
result = await childRun.resume({
step: [childRun.workflowId, resumeData.stepId],
resumeData: resumeData,
});
} else {
// Starting fresh: Start the workflow
console.log(`[Workflow Runner] Starting child workflow`);
result = await childRun.start({
inputData: triggerData as Record<string, unknown>,
initialState: {
organizationId,
workflowId,
workflowRunId,
executionContext: initialContext,
},
});
}

// Sync child workflow state to parent WorkflowRun record
// The final step in the child workflow already updates the WorkflowRun,
// but we need to handle suspended state specially
if (result.status === 'suspended') {
console.log(`[Workflow Runner] Child workflow suspended, suspending parent workflow`);
// Suspend the parent workflow to propagate the suspension upward
// This is the key - we must call suspend() to make the parent workflow actually suspend
return await suspend({
reason: 'Child workflow suspended',
childWorkflowStatus: result.status,
suspendedSteps: result.suspended,
});
}

// For success/failure, the child workflow's final step already updated the WorkflowRun
return result;
...
})
When the child workflow suspends, parent workflow also suspends. I got that to work. However, when resuming the parent worflow, and have it drilldown to the child workflow to resume that child's exact step, I run into this error...
Error: No snapshot found for this workflow run: runtime-g8R39Jh0y5GlYEM4NCZpw cmh1soi3o0001jr041gjhomxa
Link


2025-10-22T09:34:17.338Z
at Run._resume (file:///app/.mastra/output/mastra.mjs:58618:2935)
Link


2025-10-22T09:34:17.338Z
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)`
Error: No snapshot found for this workflow run: runtime-g8R39Jh0y5GlYEM4NCZpw cmh1soi3o0001jr041gjhomxa
Link


2025-10-22T09:34:17.338Z
at Run._resume (file:///app/.mastra/output/mastra.mjs:58618:2935)
Link


2025-10-22T09:34:17.338Z
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)`
So apparently, the @mastra/pg snapshot storage only works for suspend/resume on registered workflows but not the inner child workflow runs? Please help, this is crucial to our product 🙏 Thank you!!
1 Reply
Mastra Triager
Mastra Triager20h ago
GitHub
[DISCORD:1430496885226864791] (Suspend/Resume support for runtime w...
This issue was created from Discord post: https://discord.com/channels/1309558646228779139/1430496885226864791 I have a registered workflow-runner that has a first step execute-child-workflow that ...

Did you find this page helpful?