Workflow SDK 5.3.1 introduces atomic idempotent starts to eliminate duplicate-run race conditions

·2026.11.04 09:00

Key point

The new atomic start() function admits a run and claims a hook in one step, using a domain-specific token as the idempotency key to ensure exactly one run owns the token.

Details

  • Workflow SDK 5.3.1 replaces the previous getHookByToken() -then- start() pattern with an atomic start() function that admits a run and claims a hook in a single step, eliminating the documented duplicate-start race.
  • The token serves as the idempotency key, derived from user domain data such as order, invoice, import, or request IDs; a duplicate start() throws HookConflictError carrying the owner's conflictingRunId and never creates a new run.
  • The claimed Hook exists from the moment the run is admitted, allowing resumeHook to work before execution begins and buffering early payloads for in-order delivery.
  • Setting experimental_minRetention keeps the token unavailable after the run ends, counted from start(), ensuring late duplicates are still refused.

This summary was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.

Our guide explains how the AI works. Report summary errors, attribution issues, or removal requests via Contact.