iteration

An automation agent that repeatedly reviews experiment results and decides what should happen next. It uses outcomes such as pass, fail, inconclusive, or no eligible variants to route work back to the right earlier step.

In plain words
What is it for?
Use it to run review iterations after verification, send claims back for targeted fixes, track iteration state, and stop when the review rules say the work is complete.
Why use it?
It prevents a failed or unclear experiment from simply stopping the research process. It identifies whether the next change belongs in the tested variant, the baseline, or another part of the workflow.

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/zjunlp/mechanist/iteration
Clone the repo
git clone --depth 1 https://github.com/zjunlp/Mechanist
Per session 143 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,824 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.00143 $0.02824
Opus 5 $0.00072 $0.01412
Sonnet 5 $0.00029 $0.00565
Haiku 4.5 $0.00014 $0.00282

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

Security

Grade A, and why

iteration 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 2d 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.

agents/iteration.md · 100 lines

How it starts

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

Iteration Agent — Auto Review Loop

You are the isolated execution context for the autonomous review loop. Your only job is to invoke /auto-iteration-loop, relay its back-edge handoff to the orchestrator when needed, ensure its artifacts landed, and report the final assessment.

Single source of truth. The loop's budget model (MAX_ITERATIONS, MAX_CLAIM_REENTRIES), the back-edge action types (①/②/③/⓪), the three-dimensional STOP rule, the per-bucket reviewer routing, the awaiting_upstream handoff protocol, and the REVIEW_STATE.json schema all live in skills/auto-iteration-loop/SKILL.md. Do not re-derive or paraphrase them here, and do not introduce concepts the skill does not have (there is no max_rounds / round-based budget — the only persistent counter is iterations_consumed). This file is a thin forwarding wrapper.

Invocation contract

You receive these args from the orchestrator and forward each to /auto-iteration-loop as its identically-named uppercase constant (lowercase field → uppercase env-style). If the orchestrator omits a field, leave the skill's default in place.

Arg received Forward as Default Notes
direction $ARGUMENTS empty Reviewer context only — never a starting point. This stage reads existing idea-stage / refine-logs / verify artifacts.
max_iterations MAX_ITERATIONS 6 Hard cap on total back-edge actions (①/②/③). narrative-only and PASS/deferred handling do not consume budget. (Legacy alias max_rounds is normalized to this by the orchestrator before it reaches you.)
max_claim_reentries MAX_CLAIM_REENTRIES 2 Sub-budget within MAX_ITERATIONS for action type ③ (claim-stage re-entry).
target_score TARGET_SCORE 6 Stop when score ≥ this AND verdict ∈ {ready, almost} AND no claim is still FAIL / INCONCLUSIVE / ZERO_ELIGIBLE_VARIANTS.
auto_proceed AUTO_PROCEED true true → proceed at checkpoints with the best option.
gpu_id GPU_ID auto Anything other than auto is passed as CUDA_VISIBLE_DEVICES=<value> (first positional arg) to every Phase-C /run-experiment dispatch. Assert, don't assume: each runs/iteration_round_<N>/<run-id>/cost.json records the effective gpu_ids; if any falls outside <value> (or is empty), report it in Notes as a pin-propagation failure (orchestrator halts — see auto/SKILL.md "GPU pin propagation").
resume RESUME false Read REVIEW_STATE.json and pick up from iterations_consumed + 1; budgets are inherited, never reset.

Read the full file on GitHub · 100 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. 2d ago First seen · 100 lines · 143 tokens per session scan A db09d361515c

Subscribe to this mod's changes

iteration is an agent published in the GitHub repository zjunlp/Mechanist (51 stars, last pushed 7d ago), licensed MIT. It adds 143 tokens to every session and 2,824 once invoked, about $0.0007 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-30.