PARAS MADAN
All writing

Latest in AI

Vercel Workflow SDK 5.8: How to Upgrade Without Duplicating Side Effects

Audit retryable steps, test the new engine with a staging canary, and separate actual step time from orchestration overhead.

A workflow that reads a product catalog twice may waste a little compute. A workflow that sends the same approval email twice can confuse a customer. That distinction matters more than the speed headline when you upgrade to Vercel Workflow SDK 5.8.

Vercel says the new engine uses speculative execution for retryable steps. New runs use it by default on supported Worlds; runs started on the older engine keep running there. Treat the upgrade as a change to how new work executes, not a restart of work already in flight.

Sort steps by what they change

Start with one boring workflow, such as normalizing a CSV, updating records, and sending a completion email. List its steps alongside every outside effect. File parsing with no writes is different from updating storage, sending a webhook, or telling a customer that an import finished.

An update can be retryable when the destination enforces a stable key for the same operation. Use an upsert with a suitable unique key or the receiving service's idempotency contract. Do not assume that a timestamp, a log line, or a check followed by an unconditional write is enough to prevent concurrent duplicates.

Use the right key for the right duplicate

Vercel documents that the workflow step ID remains stable across retries and speculative reruns of that step. That can serve as an idempotency key when the downstream service supports it.

A second separately started workflow is a different problem. If two starts for the same import must collapse into one, use a business key such as the import ID and operation type where you accept the request or persist the result. A key scoped to one execution won't make separately started workflows equivalent.

For effects that cannot be made safely repeatable, Vercel documents setting maxRetries = 0 on the step. Review what happens if it fails: a no-retry step also loses convenient automatic recovery. If the receiving service applied a write but never returned confirmation, check its state before a manual rerun.

Canary the workflow rather than the package

First record how the current version behaves on a fixed synthetic file. Upgrade the dependency in staging and start a new run with the same input. Instrument distinct stages: orchestration gaps, time spent doing step work, destination writes, and any final notification. Point outside calls at a test service or sandbox.

Try two mundane failures: a write acknowledged late, and a worker failure after the outside action but before the workflow records completion. Record which effects were attempted and how many landed. A finished run with clean output does not answer whether the customer's inbox got two messages.

Don't forecast savings from a step benchmark

Vercel reports p75 inter-step overhead of 7 ms instead of 85 ms in its comparison with 5.2.0. The tested overhead is not the same as an application's end-to-end delay. A workflow that spends minutes waiting for an upstream model call has less orchestration time to win back than one making many short local decisions. Measure fan-out and resumed runs separately too.

Keep an explicit rollout fallback

Vercel documents WORKFLOW_SPEC_VERSION=8 to keep new runs on the previous engine after installing the newer package. Third-party Worlds need World spec version 9 support; Vercel-maintained Worlds already support it. Check that before spending time explaining an unchanged benchmark. If you're coming from 4.x, follow the major-version upgrade path first.

I would enable the new engine for a workflow when its external effects have passed the failure tests, not when a staging stopwatch looks good.

I help technical teams explain how their AI products work. Book a 30-minute call.