resonate-human-in-the-loop-pattern-rust

resonate-human-in-the-loop-pattern-rust is a skill for Claude Code, Codex from resonatehq/resonate-skills. It costs 0 tokens per session (2,377 once invoked), scanned A, original, Apache-2.0.

A Rust workflow pattern for pausing a durable process until a person, webhook, user interface, or command-line operator settles a decision or supplies data.

In plain words
What is it for?
Use it for expense, deployment, or moderation approvals, third-party callbacks such as Stripe, DocuSign, or Twilio, and operator-controlled incident steps.
Why use it?
It avoids polling and lets the workflow remain parked without using worker time while waiting. The process resumes when the external promise is resolved or rejected.

Skill for Claude CodeCodex

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

Good fit Use it for expense, deployment, or moderation approvals, third-party callbacks such as Stripe, DocuSign, or Twilio, and operator-controlled incident steps.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/resonatehq/resonate-skills/resonate-human-in-the-loop-pattern-rust
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-human-in-the-loop-pattern-rust
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-human-in-the-loop-pattern-rust

README.md
[![agentmods](https://agentmods.dev/badge/skills/resonatehq/resonate-skills/resonate-human-in-the-loop-pattern-rust/github.svg)](https://agentmods.dev/skills/resonatehq/resonate-skills/resonate-human-in-the-loop-pattern-rust)
Your own site
<a href="https://agentmods.dev/skills/resonatehq/resonate-skills/resonate-human-in-the-loop-pattern-rust"><img src="https://agentmods.dev/badge/skills/resonatehq/resonate-skills/resonate-human-in-the-loop-pattern-rust/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-human-in-the-loop-pattern-rust

Your own site · 80×15
<a href="https://agentmods.dev/skills/resonatehq/resonate-skills/resonate-human-in-the-loop-pattern-rust"><img src="https://agentmods.dev/badge/skills/resonatehq/resonate-skills/resonate-human-in-the-loop-pattern-rust.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,377 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00000 $0.02377
Opus 5 $0.00000 $0.01189
Sonnet 5 $0.00000 $0.00475
Haiku 4.5 $0.00000 $0.00238

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

Security

Grade A, and why

resonate-human-in-the-loop-pattern-rust scanned grade A with 0 findings 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

resonate-human-in-the-loop-pattern-rust/SKILL.md · 225 lines

How it starts

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

Resonate Human-in-the-Loop Pattern — Rust

SDK note (0.6.0). ctx.promise::<T>() is a real pub fn in the Rust SDK source (resonate-sdk-rs:resonate/src/context.rs) with a full PromiseTask<T> builder, but it is not yet covered in docs/develop/rust.mdx. The API is safe to use; cite source paths when reviewers ask. APIs may shift between 0.x releases.

Overview

A human-in-the-loop workflow blocks a durable function on a promise that an external actor settles — a reviewer clicking "approve," a webhook firing from a third-party system, an operator running a CLI command. The worker doesn't poll; it awaits the PromiseTask future and Resonate parks the execution until the promise settles.

For the language-agnostic mental model, see resonate-human-in-the-loop-pattern-typescript. The Rust shape differs in (a) type-parameterized promises ctx.promise::<T>(), (b) lazy builder with .timeout / .data / .id / .create / .await, (c) SDK-generated IDs you fetch via .id().await?.

When to use

  • Approval gates (expense, deploy, content moderation)
  • Third-party callbacks (Stripe, DocuSign, Twilio)
  • Operator unblock steps (break-glass in runbooks)
  • Any step where the data or decision comes from outside the Resonate worker set

Basic shape

use resonate::prelude::*;
use serde::{Serialize, Deserialize};
use std::time::Duration;

#[derive(Serialize, Deserialize)]
struct Decision {
    approved: bool,
    reviewer: String,
}

#[resonate::function]
async fn expense_approval(ctx: &Context, expense_id: String) -> Result<String> {
    // build a promise with a 24-hour SLA and the expense ID attached as data
    let task = ctx
        .promise::<Decision>()
        .timeout(Duration::from_secs(24 * 60 * 60))
        .data(&serde_json::json!({ "expense_id": expense_id }))?;

    // fetch the SDK-generated promise ID so an external actor can target it
    let promise_id = task.id().await?;

    // stash the ID where the reviewer UI / webhook will see it
    ctx.run(save_approval_id, (expense_id.clone(), promise_id.clone())).await?;

    // block until someone resolves/rejects/cancels the promise
    let decision: Decision = task.await?;

    if decision.approved {
        ctx.run(process_reimbursement, expense_id.clone()).await?;
        Ok(format!("approved by {}", decision.reviewer))
    } else {
        Ok(format!("rejected"))
    }
}

async fn save_approval_id((expense_id, promise_id): (String, String)) -> Result<()> {
    // write (expense_id, promise_id) to a DB or queue a notification
    Ok(())
}

async fn process_reimbursement(expense_id: String) -> Result<()> {
    Ok(())
}

Read the full file on GitHub · 225 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 · 225 lines · 0 tokens per session scan A 55ac20cfe468

Subscribe to this mod's changes

resonate-human-in-the-loop-pattern-rust is a skill published in the GitHub repository resonatehq/resonate-skills (6 stars, last pushed 20d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 2,377 tokens. A static security scan graded it A with 0 findings. 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

golem-make-http-request-rust

Making outgoing HTTP requests from a Rust Golem agent. Use when the user asks to call an external API, make HTTP requests, use an HTTP client, or send HTTP requests from agent code.

golemcloud/golem · 48 tokens

golem-add-llm-rust

Adding LLM and AI capabilities to a Rust Golem agent. Use when the user wants to add LLM chat, embeddings, web search, vector DB, graph DB, document search, video generation, speech-to-text, text-to-speech, or any AI provider integration.

golemcloud/golem · 65 tokens

golem-parallel-workers-rust

Fan out work to multiple parallel agents and collect results in a Rust Golem project. Use when the user asks about parallel execution, fan-out/fan-in, spawning child agents for parallel work, forking, or aggregating results from multiple agents.

golemcloud/golem · 58 tokens

golem-retry-policies-rust

Configuring semantic retry policies for a Rust Golem agent. Use when the user asks about retry policies, retry strategies, exponential backoff, error handling retries, transient error recovery, retry predicates, withRetryPolicy, withnamedpolicy, NamedPolicy, Policy composition, jitter, countBox, timeBox, andThen, or…

golemcloud/golem · 81 tokens

golem-add-http-endpoint-rust

Exposing a Rust Golem agent over HTTP. Use when the user asks to add HTTP endpoints, mount an agent to a URL path, or expose agent methods as a REST API.

golemcloud/golem · 46 tokens

golem-atomic-block-rust

Using atomic blocks, idempotency, and oplog management in a Rust Golem project. Use when the user asks about atomically, idempotence mode, oplog commit, or idempotency keys.

golemcloud/golem · 51 tokens