cloudflare-workflows

Installation
Summary

Durable, long-running workflows with automatic retries, state persistence, and event handling on Cloudflare Workers.

  • Supports three core step types: step.do() for work execution with configurable retries, step.sleep() for delays, and step.waitForEvent() for external event handling with timeouts
  • Automatically persists serializable state across steps and hibernation; prevents 12 documented errors including waitForEvent timeout bugs, I/O context violations, and non-idempotent operation pitfalls
  • Includes Vitest testing with introspection API, mock step results, and event simulation; local dev limitations documented (instance lifecycle, getPlatformProxy incompatibility)
  • Scales to 10,000 concurrent instances with 100 steps/second creation rate; sleeping instances don't count toward concurrency; pricing at $0.30 per million step executions after 10M free monthly
SKILL.md

Cloudflare Workflows

Status: Production Ready ✅ (GA since April 2025) Last Updated: 2026-01-09 Dependencies: cloudflare-worker-base (for Worker setup) Latest Versions: wrangler@4.58.0, @cloudflare/workers-types@4.20260109.0

Recent Updates (2025):

  • April 2025: Workflows GA release - waitForEvent API, Vitest testing, CPU time metrics, 4,500 concurrent instances
  • October 2025: Instance creation rate 10x faster (100/sec), concurrency increased to 10,000
  • 2025 Limits: Max steps 1,024, state persistence 1MB/step (100MB-1GB per instance), event payloads 1MB, CPU time 5 min max
  • Testing: cloudflare:test module with introspectWorkflowInstance, disableSleeps, mockStepResult, mockEvent modifiers
  • Platform: Waiting instances don't count toward concurrency, retention 3-30 days, subrequests 50-1,000

Quick Start (5 Minutes)

Related skills
Installs
348
GitHub Stars
776
First Seen
Jan 20, 2026