The wait_created escalation anchored on the ULID timestamp inside the wait's correlation id, assuming it was the wait's scheduling instant. It is not: the workflow VM mints every correlation id as ulid(fixedTimestamp), the RUN's creation epoch, held constant for replay stability — so the anchor is a run-wide constant and any run older than the threshold would fail with CORRUPTED_EVENT_LOG on a single benign concurrent-suspension race (whenever the winner's row was not yet visible to the verification read). The wait_created site now warns only: the run epoch serves as a cheap pre-filter (young runs skip the verification read entirely) and the fresh log read still gates the warning, but escalation is left to backend-side wedge recovery, which classifies against entity state the SDK cannot see. The wait_completed site is unchanged — its resumeAt anchor is durable and genuinely per-wait, so warn-then-fail remains. Also restructures the conflict branch so the narrowing of the decoded timestamp is a direct if-condition rather than an aliased boolean. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: Pranay Prakash <pranay.gp@gmail.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.
There are many third-party Worlds (both self-hosted or managed), see the Worlds page for a list of maintainer-curated third party worlds. Submit your world by opening 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 believe you have found a security vulnerability in Workflow SDK, we encourage you to responsibly disclose this and not open 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.