Workflow SDK claims a deduplication token when a run starts
Workflow SDK 5.4.0 can claim a hook token atomically when starting a run. This closes the race where two callers both check for an existing run and then create duplicates. A conflicting start receives a HookConflictError identifying the existing run, while incoming hook payloads can wait for that run to begin executing.
Vercel · Nov 4, 2026
Why it matters
Atomic admission is useful when repeated webhooks or concurrent requests should reach one workflow.
More context
Try the experimental_hook option in a sandbox with two simultaneous starts using the same business identifier. The experimental_minRetention option can reserve that identifier beyond completion, with retention measured from the run’s start. These options ship in the released SDK but remain explicitly experimental.
Keep in mind
The token protects workflow admission within its retention window; it does not make external payments, messages or other side effects exactly-once.
Original read