# Run.resume() The `.resume()` method resumes a suspended workflow run with new data, allowing you to continue execution from a specific step. ## Usage example ```typescript const run = await workflow.createRun(); const result = await run.start({ inputData: { value: "initial data" } }); if (result.status === "suspended") { const resumedResults = await run.resume({ resumeData: { value: "resume data" }, }); } ``` ## Parameters **resumeData?:** (`z.infer`): Data for resuming the suspended step **step?:** (`Step | [...Step[], Step] | string | string[]`): The step(s) to resume execution from. Can be a Step instance, array of Steps, step ID string, or array of step ID strings **requestContext?:** (`RequestContext`): Request Context data to use when resuming **retryCount?:** (`number`): Optional retry count for nested workflow execution **tracingContext?:** (`TracingContext`): currentSpan?:SpanCurrent span for creating child spans and adding metadata. Use this to create custom child spans or update span attributes during execution. **tracingOptions?:** (`TracingOptions`): metadata?:Record\Metadata to add to the root trace span. Useful for adding custom attributes like user IDs, session IDs, or feature flags.requestContextKeys?:string\[]Additional RequestContext keys to extract as metadata for this trace. Supports dot notation for nested values (e.g., 'user.id').traceId?:stringTrace ID to use for this execution (1-32 hexadecimal characters). If provided, this trace will be part of the specified trace.parentSpanId?:stringParent span ID to use for this execution (1-16 hexadecimal characters). If provided, the root span will be created as a child of this span.tags?:string\[]Tags to apply to this trace. String labels for categorizing and filtering traces. **outputOptions?:** (`OutputOptions`): includeState?:booleanWhether to include the workflow run state in the result. ## Returns **result:** (`Promise>`): A promise that resolves to the workflow execution result containing step outputs and status **traceId?:** (`string`): The trace ID associated with this execution when Tracing is enabled. Use this to correlate logs and debug execution flow. ## Extended usage example ```typescript if (result.status === "suspended") { const resumedResults = await run.resume({ step: result.suspended[0], resumeData: { value: "resume data" }, }); } ``` > **Note**: When exactly one step is suspended, you can omit the `step` parameter and the workflow will automatically resume that step. For workflows with multiple suspended steps, you must explicitly specify which step to resume. ## Related - [Workflows overview](https://mastra.ai/docs/workflows/overview) - [Workflow.createRun()](https://mastra.ai/reference/workflows/workflow-methods/create-run) - [Suspend and resume](https://mastra.ai/docs/workflows/suspend-and-resume) - [Human in the loop](https://mastra.ai/docs/workflows/human-in-the-loop)