On a fan-out that runs some steps inline, the orchestrator invocation publishes the queued siblings' step-execution messages, runs its inline steps, falls back into the replay loop, reloads the log, and its pending-step dispatch pass publishes every one of those messages again (measured 19-28 re-sends per pass on a 32-branch fan-out, ~400 ms after the originals). The queue dedupes them by idempotency key, but the sends still cost round-trips on the shared connection pool and hold the invocation open past its useful work. Track, per delivery, the correlation ids this invocation has already published a step message for (the suspension handler's resilient publishes plus the dispatch pass's own immediate enqueues) and skip the immediate re-enqueue for those on later passes, unless a step_retrying has been observed since (a new schedule). The set is invocation-scoped and never derived from the log: a step_created does not prove the message was ever sent, so a different delivery still re-enqueues unconditionally. Reported as a debug log and the `workflow.dispatch.republish_skipped` span attribute. The QuickJS engine already keeps the equivalent invocation-scoped `queuedStepIds` set, so it is unchanged. Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Workflow SDK makes TypeScript and JavaScript functions durable. It persists workflow progress, retries failed steps, and provides built-in observability. Workflows can suspend without using compute while they wait.
Quick start
Install the SDK in an existing project:
npm install workflow
Configure the integration for your framework. For example, with Next.js:
// next.config.ts
import { withWorkflow } from 'workflow/next';
export default withWorkflow({});
Then start a workflow from an API route, Server Action, or other server-side code:
import { start } from 'workflow/api';
import { onboardUser } from './workflows/onboard-user';
await start(onboardUser, ['hello@example.com']);
Run your app, then open the local observability UI in another terminal:
npm run dev
npx workflow web
Choose your framework in the getting-started guides.
Note
The
workflowpackage includes its full documentation, so coding agents can read version-matched guides locally fromnode_modules/workflow/docs.
Run anywhere
Local development uses the bundled backend with no configuration. Deploy to Vercel for managed storage, queuing, scaling, and observability. To self-host, use the Postgres backend or implement a custom World.
The Worlds page lists maintainer-curated third-party Worlds, including self-hosted and managed options. Submit your World by updating the Worlds Manifest.
Community
The Workflow SDK community lives on GitHub Discussions, where you can ask questions, share ideas, and show what you have built.
Contributing
Contributions are welcome. Use issues and discussions to collaborate with the team and wider community. By participating, you agree to our Code of Conduct.
Security
If you find a security vulnerability in Workflow SDK, disclose it responsibly instead of opening a public issue.
To participate in our Open Source Software Bug Bounty program, please email responsible.disclosure@vercel.com. We will add you to the program and provide further instructions for submitting your report.