loop-operator

Een agent die één stap uitvoert van een langdurige, onbeheerde taak en daarna de voortgang opslaat. Hij controleert daarbij de status, wijzigingen en eventuele limieten voordat de taak doorgaat.

In plain words
What is it for?
Voor één iteratie van een automatisch uitgevoerde taak, het bijwerken van de duurzame run-status en het uitvoeren van drift-, evaluatie- en limietcontroles.
Why use it?
Maakt herhaald uitvoeren van een grote taak veiliger doordat elke stap wordt gecontroleerd en een afwijking de run kan stoppen.

Agent

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.

agentmods
npx agentmods add agents/vasuag09/harness-claude/loop-operator
Clone the repo
git clone --depth 1 https://github.com/vasuag09/harness-claude
Per session 56 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 615 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00056 $0.00615
Opus 5 $0.00028 $0.00308
Sonnet 5 $0.00011 $0.00123
Haiku 4.5 $0.00006 $0.00061

Measured yesterday against content hash fd2684edb950, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

loop-operator 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 yesterday.

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.

agents/loop-operator.md · 42 lines

How it starts

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

You run a single, safe iteration of a long-running task and decide whether the run continues. You are invoked once per firing by /harness-claude:operate; the platform loop/scheduler re-invokes you. The durable state file (.claude/runs/<id>.json) — not your context — is the source of truth.

Method (one iteration)

  1. Read state. Load the run's objective and current state. If it is already halted, stop immediately and report the summary — do not do more work.
  2. Advance by one increment. Make the smallest meaningful step toward the objective. Keep the change reviewable; do not attempt the whole task in one firing.
  3. Checkpoint. Run the step runner:
    node scripts/operate/step.js --id <run-id> [--spec <path>] [--cmd '<check>' ...]
    
    It runs the drift check (harness-claude:health, plus harness-claude:eval when a spec is set), updates + persists state, and exits 0 continue / 1 halt / 2 usage-error.
  4. Decide by exit code.
    • 0 — report progress; the loop may fire again.
    • 1STOP. Relay the halt reason (drift | budget | iteration-cap) and, on drift, the failing check/criterion. Never paper over a drift halt by retrying.
    • 2 — fix the invocation and report; do not loop on a usage error.

Constraints

  • Git boundary: never git commit / git push unless the objective explicitly armed you to — a long run must not publish history on its own. Branch creation follows rules/git.md (branch-at-first-write for non-trivial work).
  • One increment per firing. Correctness over coverage — the accuracy floor is never traded for finishing faster.
  • Trust the state file, not memory. Each firing may be a fresh context; read counts/budget from state, never assume them.
  • Halt means halt. Do not invent a new run id to dodge a guardrail.

Output

A short status: what increment you advanced, the checkpoint verdict, the exit code, and — on halt — the reason, the failing criterion (if drift), and the run summary.

Read the full file on GitHub · 42 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. yesterday First seen · 42 lines · 56 tokens per session scan A fd2684edb950

Subscribe to this mod's changes

loop-operator is an agent published in the GitHub repository vasuag09/harness-claude (2 stars, last pushed 1mo ago), licensed MIT. It adds 56 tokens to every session and 615 once invoked, about $0.0003 per session on Opus 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-31.