workflow resume on workflow as step not working

Or I should say, it's not working using the client JS even though it does appear to work in the playground. But we're stuck not understanding what the difference is.

Here is our workflow:

const turnWorkflow = createWorkflow({
  id: "turn",
  stateSchema,
  inputSchema: emptySchema,
  outputSchema: advocateOutputSchema,
})
  .then(gatherStep)
  .then(advocateStep)
  .commit();

export const supportSessionWorkflow = createWorkflow({
  id: "support-session",
  description:
    "Multi-turn human-in-the-loop support session using suspend/resume.",
  stateSchema,
  inputSchema: intakeInputSchema,
  outputSchema: finalizeOutputSchema,
})
  .then(intakeStep)
  .dountil(
    turnWorkflow,
    async ({ state: { status } }) =>
      status === "resolved" || status === "not_possible"
  )
  .then(finalStep)
  .commit();


gatherStep is the suspended step and when using the client :

const stream = await runRef.current.resumeStreamVNext({
          step: stepId,
          resumeData,
        });


Even when resumeData is passed in correctly, it always ends up undefined in the step. This is working for steps which are NOT workflows like the above and we are not able to see why.
Was this page helpful?