resuming workflow as step not possible

Hello! I have a simple workflow that includes a step that is a workflow. It seems that it is not possible to suspend from within a step of this sub-workflow and then resume. In fact, attempting to do so causes the mastra server to crash (requiring a restart) with the attached error.

Here is my simple full workflow:

const loopStep = createWorkflow({
  id: "loopStep",
  inputSchema: loopInputSchema,
  outputSchema: loopInputSchema,
})
  .then(evaluateStep)
  .then(advocateStep)
  .commit();

export const supportWorkflow = createWorkflow({
  id: "supportWorkflow",
  inputSchema: intakeInputSchema,
  outputSchema: z.object({}),
})
  .then(intakeStep)
  .dountil(
    loopStep,
    async ({ inputData: { problemId, iterationCount } }) =>
      !problemId || iterationCount > 10
  )
  .commit();


Using the JS client TWO suspend events are streamed:

{
    "type": "step-suspended",
    "payload": {
        "id": "loopStep.evaluateStep",
        "stepCallId": "00e7634e-58d1-44a1-be31-b1028e629b9c",
        "status": "suspended",
        "suspendPayload": {
            "responseToUser": "",
            "responseToRepresentative": "xxx",
            "awaiting": "representative"
        },
        "suspendedAt": 1761234434191
    }
}


As well as:

{
    "type": "step-suspended",
    "payload": {
        "id": "loopStep",
        "stepCallId": "01aaad99-df3d-4dc2-bd0b-2074de3145ba",
        "status": "suspended",
        "suspendPayload": {
            "responseToUser": "",
            "responseToRepresentative": "xxx",
            "awaiting": "representative",
            "__workflow_meta": {
                "runId": "207c1619-ff79-429b-a1ad-0eccb198d4d6",
                "path": [
                    "evaluateStep"
                ]
            }
        },
        "suspendedAt": 1761234434335
    }
}


I have triped resuming using BOTH id's. Neither works.
Was this page helpful?