loop-orchestration

loop-orchestration is a skill for Claude Code, Codex from runxhq/runx. It costs 32 tokens per session (681 once invoked), scanned A, original, Apache-2.0.

An example application that runs several controlled agent turns in sequence; each turn is one bounded piece of work with its own record and limits.

In plain words
What is it for?
Use it to build or study an outer workflow that continues, stops, or pauses based on receipts, budgets, allowed tools, and stop rules.
Why use it?
It demonstrates how long-running work can continue safely without giving the agent unlimited authority or context.

Skill for Claude CodeCodex

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

Good fit Use it to build or study an outer workflow that continues, stops, or pauses based on receipts, budgets, allowed tools, and stop rules.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/runxhq/runx/loop-orchestration
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 runxhq/runx --skill loop-orchestration
Clone the repo
git clone --depth 1 https://github.com/runxhq/runx

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 loop-orchestration

README.md
[![agentmods](https://agentmods.dev/badge/skills/runxhq/runx/loop-orchestration/github.svg)](https://agentmods.dev/skills/runxhq/runx/loop-orchestration)
Your own site
<a href="https://agentmods.dev/skills/runxhq/runx/loop-orchestration"><img src="https://agentmods.dev/badge/skills/runxhq/runx/loop-orchestration/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 loop-orchestration

Your own site · 80×15
<a href="https://agentmods.dev/skills/runxhq/runx/loop-orchestration"><img src="https://agentmods.dev/badge/skills/runxhq/runx/loop-orchestration.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 32 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 681 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00032 $0.00681
Opus 5.5 $0.00013 $0.00272
Sonnet 5.5 $0.00006 $0.00136
Haiku 4.5 $0.00003 $0.00068

Measured 5d ago against content hash f485d84cf4d9, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

loop-orchestration 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 5d ago.

The scan reads SKILL.md. This mod also ships 3 executable files (loop/loop-host.mjs, loop/turn.mjs, run.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

examples/loop-orchestration/SKILL.md · 90 lines

How it starts

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

Loop Orchestration

This example shows the runx pattern for long-running agent work:

  1. An outer loop host decides whether work should continue.
  2. Each iteration submits one normal governed runx run.
  3. Each turn seals a receipt before the loop can advance.
  4. The next turn consumes only explicit inputs, projection state, and receipt summaries.

Nothing in this example adds a loop engine to runx-core. The loop host is just an application script. In production it could be a hosted service, Temporal workflow, LangGraph app, n8n workflow, or another orchestrator.

Run It

sh examples/loop-orchestration/run.sh

The script runs three demonstrations:

  • success: two governed turns complete a tiny build-review loop;
  • refusal: a requested tool is outside the loop policy, so the loop stops before another turn is submitted;
  • context gate: an agent turn pauses with digest-bound skill context and explicit allowed_tools, showing what a host or managed provider would receive without requiring a model key.

The output prints each run id, receipt id, decision, and next-turn reason.

Check The Harness

For the repeatable inline harness, use a fresh receipt store, so its receipts are not mixed with earlier runs'.

tmpdir="$(mktemp -d)"
"${RUNX_BIN:-crates/target/debug/runx}" harness examples/loop-orchestration \
  --receipt-dir "$tmpdir" \
  --json

What This Proves

The important boundary is not the Node script. It is the contract:

  • A loop owns scheduling, durable loop state, projection, and stop policy.
  • A turn is one runx skill/graph run with explicit authority and one sealed receipt.
  • A handoff is an artifact/result the loop host can inspect; it is not hidden prompt continuation.
  • A projection is derived from receipts and admitted signals, not from ambient memory.

Security Rules

  • The loop has a max-turn budget.
  • The turn runner receives only declared inputs.
  • Tool choices are checked against loop policy before another turn is allowed.
  • Context skills are advisory, digest-bound, and untrusted.
  • A pause or refusal is a healthy result; the loop does not keep prompting until it gets the answer it wants.

Read the full file on GitHub · 90 lines

Files

What ships with it

5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 5d ago Changed · -4 lines f485d84cf4d9
  2. 7d ago Changed cff6bc522848
  3. 1mo ago First seen · 94 lines · 32 tokens per session scan A 12e858b1a9b1

Subscribe to this mod's changes

loop-orchestration is a skill published in the GitHub repository runxhq/runx (103 stars, last pushed yesterday), licensed Apache-2.0. It adds 32 tokens to every session and 681 once invoked, about $0.0001 per session on Opus 5.5. 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-30.