Vercel Workflow SDK blocks duplicate starts atomically
On November 4, Vercel made Workflow SDK 5.4.0's start() admit a run and claim a hook token in one step. A duplicate start with the same token throws HookConflictError and never becomes a run.
On November 4, Vercel changed the Workflow SDK's start() so it admits a run and claims a hook token in one atomic step. Starting a workflow again with the same token fails safely with HookConflictError, and that start never becomes a run. It replaces the old getHookByToken()-then-start() pattern, whose gap between lookup and start left a duplicate-start race that Vercel says is documented.
Image: Vercel Changelog
The token comes from your own domain, such as an order ID, an invoice ID or a request ID, and it is the idempotency key. A duplicate request can read conflictingRunId from the HookConflictError to find the run that owns the token, then pass its payload on with resumeHook. Setting experimental_minRetention keeps the token unavailable after the run ends, counted from start(), so late duplicates are still refused. The option is named experimental_hook, so treat it as experimental, and upgrade to workflow 5.4.0 to use it.
