Files
vercel__workflow/.changeset/pre/lazy-hook-resumption.md
2026-09-09 14:44:37 -07:00

922 B

workflow, @workflow/core, @workflow/world, @workflow/world-vercel, @workflow/world-local, @workflow/web-shared, @workflow/world-postgres
workflow @workflow/core @workflow/world @workflow/world-vercel @workflow/world-local @workflow/web-shared @workflow/world-postgres
minor minor minor minor minor patch patch

Lazy hook resumption: on a fast path, resumeHook() writes the hook_received event and dispatches the workflow queue message concurrently instead of sequentially, cutting a round trip off resume latency. A (runId, resumeId) dedup constraint keeps the two writers converging on exactly one event; the runtime falls back to the sequential path when dedup support is unavailable or when WORKFLOW_DISABLE_LAZY_HOOK_RESUME=1. resumeHook() resolves to a ResumedHook (a Hook plus an optional resilientResume: true flag, set only when the direct write failed transiently and the resume was recovered via the queue consumer's re-ensure) — preserving the contract introduced alongside the resilient-resume work.