{"record":{"id":"f5b4baf656a15d49","repo":"mastra-ai/mastra","slug":"multiple-suspended-steps-found-pathstrings-join-f5b4ba","errorCode":null,"errorMessage":"Multiple suspended steps found: ${pathStrings.join(', ')}. Please specify which step to resume using the \"step\" parameter.","messagePattern":"Multiple suspended steps found: (.+?)\\. Please specify which step to resume using the \"step\" parameter\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/core/src/workflows/workflow.ts","lineNumber":4489,"sourceCode":"              suspendedStepPaths.push([stepId, ...nestedPath]);\n            } else {\n              // For single-level suspension, just use the step ID\n              suspendedStepPaths.push([stepId]);\n            }\n          }\n        }\n      });\n\n      if (suspendedStepPaths.length === 0) {\n        throw new Error('No suspended steps found in this workflow run');\n      }\n\n      if (suspendedStepPaths.length === 1) {\n        // For single suspended step, use the full path\n        steps = suspendedStepPaths[0]!;\n      } else {\n        const pathStrings = suspendedStepPaths.map(path => `[${path.join(', ')}]`);\n        throw new Error(\n          `Multiple suspended steps found: ${pathStrings.join(', ')}. ` +\n            'Please specify which step to resume using the \"step\" parameter.',\n        );\n      }\n    }\n\n    if (!params.retryCount) {\n      const suspendedStepIds = Object.keys(snapshot?.suspendedPaths ?? {});\n\n      const isStepSuspended = suspendedStepIds.includes(steps?.[0] ?? '');\n\n      if (!isStepSuspended) {\n        throw new Error(\n          `This workflow step \"${steps?.[0]}\" was not suspended. Available suspended steps: [${suspendedStepIds.join(', ')}]`,\n        );\n      }\n    }\n","sourceCodeStart":4471,"sourceCodeEnd":4507,"githubUrl":"https://github.com/mastra-ai/mastra/blob/75dd419e613fe9c39f846ffc500716141b74fda6/packages/core/src/workflows/workflow.ts#L4471-L4507","documentation":"Thrown when resume() is called without a step and the snapshot contains more than one suspended step path. The engine refuses to guess which one to continue and lists the paths (including nested paths) in the message.","triggerScenarios":"Calling resume({ resumeData }) with no step when the workflow suspended at two or more parallel/concurrent steps, or multiple steps suspended in a foreach; nested workflows suspended in several branches.","commonSituations":"Parallel branches each with a suspend() call; resuming a human-in-the-loop workflow with several approvals pending; developer added a second suspended step to an existing workflow whose clients still call resume() without step.","solutions":["Pass the step parameter naming which suspended step to resume: resume({ resumeData, step: 'stepId' }).","For nested steps, pass the full dotted path or array path, e.g. step: ['parentStep', 'childStep'].","Read the error message — it lists the available suspended paths — or inspect snapshot.suspendedPaths.","Resume each suspended branch with separate resume() calls, one per step."],"exampleFix":"// before\nawait run.resume({ resumeData });\n// after\nawait run.resume({ resumeData, step: 'approvalBranchA' });\nawait run.resume({ resumeData, step: 'approvalBranchB' });","handlingStrategy":"validation","validationCode":"const snapshot = await run.getWorkflowRunState();\nconst suspended = Object.keys(snapshot.suspendedPaths ?? {});\nif (suspended.length > 1) {\n  throw new Error(`Must specify step; suspended: ${suspended.join(', ')}`);\n}","typeGuard":"function hasSingleSuspension(s: { suspendedPaths?: Record<string, unknown> }): boolean {\n  return Object.keys(s.suspendedPaths ?? {}).length === 1;\n}","tryCatchPattern":"try {\n  await run.resume({ resumeData });\n} catch (e) {\n  if (e instanceof Error && e.message.startsWith('Multiple suspended steps found')) {\n    // parse listed paths or read suspendedPaths, then resume per-step\n  } else throw e;\n}","preventionTips":["Design workflows so resume callers always know which step to continue.","Pass step explicitly whenever the workflow has parallel suspend points.","Resume each parallel branch individually.","Keep step ids stable across deployments."],"tags":["workflow","resume","ambiguous-step","parallel"],"backgroundTag":"workflow-ambiguous-resume-step","analyzedSha":"75dd419e613fe9c39f846ffc500716141b74fda6","analyzedAt":"2026-08-30T00:15:31.844Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}