Workflow SDK now supports inflight cancellation
By Steven Van ·
The beta feature uses the standard AbortController API so workflow steps can cancel cooperatively across suspensions and replay.
The Workflow SDK 5 beta, part of Vercel's workflow tooling, now supports the standard AbortController and AbortSignal APIs across workflow and step boundaries, letting developers cancel long-running steps mid-flight.
A workflow can create an AbortController, pass its signal into one or more steps, and cancel in-flight operations using the same API fetch already uses. The signal stays durable across suspensions and deterministic replay, so a step sees the cancellation even when it's running in a separate function invocation. Cancellation is cooperative: a step has to check the signal, or pass it to an API that supports AbortSignal, or it runs to completion.
The cancellation documentation