resonate-durable-sleep-scheduled-work-typescript

Orchestrate crash-safe durable delays in Resonate workflows using ctx.sleep().

6|Updated Jan 8, 2026
One-click install
npx skills add https://github.com/resonatehq/resonate-skills --skill resonate-durable-sleep-scheduled-work-typescript
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: resonate-durable-sleep-scheduled-work-typescript
Source: https://github.com/resonatehq/resonate-skills/tree/main/resonate-durable-sleep-scheduled-work-typescript
Command: npx skills add https://github.com/resonatehq/resonate-skills --skill resonate-durable-sleep-scheduled-work-typescript

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Durable, crash-safe delays enable long-running workflows to pause and resume without consuming resources, providing reliable scheduling across restarts.

Core Features & Use Cases

  • Durable sleep with ctx.sleep() that survives crashes and restarts.
  • Countdown, scheduled reminders, recurring notifications, and backoff patterns.
  • Multi-stage delayed workflows and time-based scheduling across minutes to weeks.

Quick Start

Define a generator workflow that uses yield* ctx.sleep(...) to implement a durable delay between steps.

Frequently Asked Questions about resonate-durable-sleep-scheduled-work-typescript

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement durable sleep for crash-safe scheduling in TypeScript workflows?

Durable sleep in TypeScript workflows is implemented using generator functions with yield* ctx.sleep(...) to pause execution safely. This approach ensures delays survive restarts and crashes without holding resources, enabling reliable long-running scheduling.

What is durable sleep and when do I need it for delayed workflows?

Durable sleep is a crash-safe delay mechanism that pauses and resumes workflows without resource consumption. You need it for countdowns, scheduled reminders, recurring notifications, and multi-stage flows spanning minutes to weeks across restarts.

Can I use ctx.sleep for backoff patterns and recurring notifications in TypeScript?

Yes, ctx.sleep supports backoff patterns and recurring notifications within TypeScript SDK workflows. It provides idempotent sleep semantics that survive restarts, making it suitable for time-based scheduling across delayed multi-stage flows.

Does Resonate durable sleep work with generator-based workflows and Context?

Yes, Resonate durable sleep is designed for generator-based workflows using Context in the TypeScript SDK. It applies idempotent sleep semantics that ensure delays survive crashes and restarts across minutes to weeks.

What's the best way to handle long-running delays that survive application restarts?

The best way to handle long-running delays is using durable sleep with ctx.sleep() in Resonate workflows. This approach provides crash-safe scheduling that spans minutes to weeks, allowing workflows to pause and resume without losing progress.

Why do my scheduled workflow delays fail after a server crash or restart?

Scheduled workflow delays fail after crashes when they lack durable sleep semantics. Using ctx.sleep() in Resonate TypeScript workflows provides crash-safe, idempotent delays that survive restarts and resume execution reliably without resource consumption.