Updated yesterday
Workflow adds atomic starts

Workflow adds atomic starts

Run admission and tool retries protect different identities.

Admission

Vercel’s November 4 [release](https://vercel.com/changelog/atomic‑start‑hooks‑in‑the‑workflow‑sdk) adds atomic run admission with a hook token in Workflow 5.4.0. A duplicate start is rejected before it becomes another run, closing the gap between a separate lookup and start. That does not permanently reserve an agent‑session key.

Ownership

The [contract](https://useworkflow.dev/docs/foundations/idempotency) releases a key at run end unless retention remains; a retention duration starts at admission. Explicit hook disposal, including an inner `using` scope ending, releases it earlier—even during execution—and defeats post‑run retention. Use `const` and keep the hook open through the work it must exclude.

Tool effects

Workflow’s [durable‑agent guide](https://useworkflow.dev/docs/ai) makes tools retryable. The [step contract](https://useworkflow.dev/docs/foundations/idempotency) keeps an invocation’s `stepId` stable across retries, but unique per step. For an early‑released chat key, a second run’s equivalent tool action is another invocation with another step key. Retry stability therefore does not deduplicate that business action across runs. Define which operation must be unique and check the receiving API’s matching‑key contract. This is design analysis, not an execution test. Atomic starts require compatible backend support; Postgres needs migration `0028_add_start_hook_admissions` and older workers stopped. Original graphic: OpenTools Team; lifecycle facts from the linked SDK documentation.

Share this article

PostShare

Related News