resonate-durable-sleep-scheduled-work-typescript

resonate-durable-sleep-scheduled-work-typescript is a skill for Claude Code, Codex from resonatehq/resonate-skills. It costs 52 tokens per session (3,437 once invoked), scanned A, original, Apache-2.0.

A TypeScript pattern for pausing long-running workflows until a future time while preserving their progress.

In plain words
What is it for?
It helps build countdowns, reminders, delayed actions, notifications, and other work that may wait for seconds, hours, days, or weeks.
Why use it?
Unlike an ordinary program timer, the workflow can survive crashes, restarts, and redeployments without losing its place or keeping a process running during the wait.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit It helps build countdowns, reminders, delayed actions, notifications, and other work that may wait for seconds, hours, days, or weeks.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/resonatehq/resonate-skills/resonate-durable-sleep-scheduled-work-typescript
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add resonatehq/resonate-skills --skill resonate-durable-sleep-scheduled-work-typescript
Clone the repo
git clone --depth 1 https://github.com/resonatehq/resonate-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for resonate-durable-sleep-scheduled-work-typescript

README.md
[![agentmods](https://agentmods.dev/badge/skills/resonatehq/resonate-skills/resonate-durable-sleep-scheduled-work-typescript/github.svg)](https://agentmods.dev/skills/resonatehq/resonate-skills/resonate-durable-sleep-scheduled-work-typescript)
Your own site
<a href="https://agentmods.dev/skills/resonatehq/resonate-skills/resonate-durable-sleep-scheduled-work-typescript"><img src="https://agentmods.dev/badge/skills/resonatehq/resonate-skills/resonate-durable-sleep-scheduled-work-typescript/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for resonate-durable-sleep-scheduled-work-typescript

Your own site · 80×15
<a href="https://agentmods.dev/skills/resonatehq/resonate-skills/resonate-durable-sleep-scheduled-work-typescript"><img src="https://agentmods.dev/badge/skills/resonatehq/resonate-skills/resonate-durable-sleep-scheduled-work-typescript.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,437 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00052 $0.03437
Opus 5 $0.00026 $0.01718
Sonnet 5 $0.00010 $0.00687
Haiku 4.5 $0.00005 $0.00344

Measured 12d ago against content hash 9bb0be8780ca, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

resonate-durable-sleep-scheduled-work-typescript scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

await fetch(url, {
resonate-durable-sleep-scheduled-work-typescript/SKILL.md · 510 lines

How it starts

The opening of the file, as written. The whole thing — 510 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Resonate Durable Sleep & Scheduled Work (TypeScript)

Overview

Resonate's ctx.sleep() creates suspension points where workflows pause without consuming resources. Unlike regular setTimeout() or sleep(), durable sleep survives crashes, restarts, and redeployments. The workflow suspends its state, and Resonate resumes it exactly where it left off after the delay expires.

Core principle: yield* ctx.sleep(milliseconds) suspends execution durably. Workflows can sleep for seconds, hours, days, or weeks without holding threads, connections, or memory.

Mental Model

Regular Sleep (Ephemeral):
  Process → sleep(10h) → [BLOCKS THREAD] → Resume
  Crash during sleep? → LOST, never resumes

Durable Sleep (Resonate):
  Workflow → yield* ctx.sleep(10h) → [SUSPENDS STATE] → Resume
  Crash during sleep? → Automatically resumes after delay
  Restart process? → Resumes from checkpoint after delay

No resources held during sleep - workflow exists only as durable state.

Basic Pattern: Simple Countdown

import { Context } from "@resonatehq/sdk";

function* countdown(
  ctx: Context,
  count: number,
  delayMinutes: number,
  notificationUrl: string
) {
  for (let i = count; i > 0; i--) {
    // Send notification
    yield* ctx.run(sendNotification, notificationUrl, `Countdown: ${i}`);

    // Durable sleep - workflow suspends here
    yield* ctx.sleep(delayMinutes * 60 * 1000);
  }

  // Send final notification
  yield* ctx.run(sendNotification, notificationUrl, "Done!");
}

async function sendNotification(
  _ctx: Context,
  url: string,
  message: string
) {
  await fetch(url, {
    method: "POST",
    body: message,
    headers: { "Content-Type": "text/plain" }
  });
}

Usage:

// Count down from 5, waiting 1 minute between each count
await resonate.run(
  "countdown-1",
  countdown,
  5,              // count
  1,              // delay in minutes
  "https://ntfy.sh/mychannel"
);

What happens:

  1. Sends "Countdown: 5"
  2. Sleeps 1 minute (workflow suspends, no resources held)
  3. Resumes, sends "Countdown: 4"
  4. Sleeps 1 minute
  5. Repeats until "Done!"

Read the full file on GitHub · 510 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 510 lines · 52 tokens per session scan A 9bb0be8780ca

Subscribe to this mod's changes

resonate-durable-sleep-scheduled-work-typescript is a skill published in the GitHub repository resonatehq/resonate-skills (6 stars, last pushed 21d ago), licensed Apache-2.0. It adds 52 tokens to every session and 3,437 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

workflow

Creates durable, resumable workflows using Vercel's Workflow SDK. Use when building workflows that need to survive restarts, pause for external events, retry on failure, or coordinate multi-step operations over time. Triggers on mentions of "workflow", "durable functions", "resumable", "workflow sdk", "queue"…

vercel/workflow · 84 tokens

migrating-workflow-v4-to-v5

Upgrades an app from Workflow SDK 4.x to 5.0. Use when bumping the workflow / @workflow/ dependencies to v5, or when hitting removed v4 APIs — runStep, stepEntrypoint, workflow/internal/private, @workflow/core/private, writeToStream / closeStream / readFromStream on a World, world.steps.get without a runId…

vercel/workflow · 178 tokens

migrating-to-workflow-sdk

Migrates Temporal, Inngest, Trigger.dev, and AWS Step Functions workflows to the Workflow SDK. Use when porting Activities, Workers, Signals, step.run(), step.waitForEvent(), Trigger.dev tasks / wait.forToken / triggerAndWait, ASL JSON state machines, Task/Choice/Wait/Parallel states, task tokens, or child workflows.

vercel/workflow · 81 tokens

deepep-to-cam-converter

A code migration skill for replacing DeepEP communication operations with CAM operations when moving mixture-of-experts code from CUDA/NCCL to Ascend NPUs.

XiaoLuoLYG/GOD · 63 tokens

e2a-doctor

Use when an existing e2a MCP connection, inbox, custom domain, protection policy, webhook, or message delivery is failing or unclear. Diagnoses read-only through MCP first, ranks evidence-backed causes, and offers individually confirmed repairs; uses the CLI doctor only when CLI or self-hosted diagnostics are…

tokencanopy/e2a · 69 tokens

e2a-integrate

Use when adding e2a email capabilities to an application or codebase: outbound sending, inbound signed webhooks, REST polling, or SDK integration. Inspects the existing language and framework, uses official TypeScript/Python SDKs or idiomatic REST/OpenAPI, adds tests, and keeps credentials server-side.

tokencanopy/e2a · 68 tokens