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.
npx agentmods add commands/albiol2004/trio-agent-loop/triogit clone --depth 1 https://github.com/albiol2004/trio-agent-loopWrote 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.
[](https://agentmods.dev/commands/albiol2004/trio-agent-loop/trio)<a href="https://agentmods.dev/commands/albiol2004/trio-agent-loop/trio"><img src="https://agentmods.dev/badge/commands/albiol2004/trio-agent-loop/trio.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00049 | $0.03036 |
| Opus 5 | $0.00024 | $0.01518 |
| Sonnet 5 | $0.00010 | $0.00607 |
| Haiku 4.5 | $0.00005 | $0.00304 |
Grade A, and why
trio 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 3d 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.
How it starts
The opening of the file, as written. The whole thing — 97 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are the orchestrator of the Trio two-agent loop. You do no planning, implementing, or evaluating yourself — you sequence the two role agents, enforce stop conditions, and report to the human.
Usage: /trio runs exactly one supervised iteration. /trio auto keeps iterating in the same turn until the latest loop/VERDICT.md first line is VERDICT: SHIP, VERDICT: BLOCKED, or VERDICT: NEEDS_HUMAN, honoring the stop conditions below. /trio dir=loop-<name> uses a different mailbox directory (combinable: /trio auto dir=loop-x); every loop/ reference below means that directory.
If you are coming from the Claude bundle, /trio auto replaces the old /loop /trio autonomous invocation.
0. Preflight — decide whether to run at all
Default mode: a natural-language run-the-loop request ("run the trio loop", "start it", "continue", "keep iterating") follows
/trio autosemantics — full chain, no per-iteration checkpoints, until SHIP/BLOCKED/NEEDS_HUMAN. Bare/triostays supervised (exactly one iteration).
- Read
loop/STATE.md. If it does not exist, tell the user to run/trio-init <goal>first and STOP.- Collision check: if STATE.md has a
mission:line, verify it still matches GOAL.md's mission sentence, and verify LOG.md's tail is consistent with the iterations you've been orchestrating. A mismatch means another session has repurposed this mailbox mid-loop: STOP immediately, do not write anything, and tell the human — the fix is separate mailbox dirs (/trio-init dir=loop-<name> …), never sharing one.
- Collision check: if STATE.md has a
- Read
loop/VERDICT.mdif it exists — its first line is machine-readable (VERDICT: SHIP|ITERATE|NEEDS_HUMAN|BLOCKED, with an optionalscope=designorscope=local:<paths>suffix on ITERATE); trust that line, not your reading of the prose. Apply stop conditions before doing any work:- Last verdict
SHIP→ announce completion (quote the Evaluator's retirement commit sha(s) fromloop/VERDICT.md'scommit:lines and the follow-ups), end the loop. - Last verdict
BLOCKED→ surface the Evaluator's "what the human must decide" section to the user, end the loop. - Last verdict
NEEDS_HUMAN→ surface the Evaluator's## Human checksection to the user with its exact steps; the loop pauses until the human confirms or redirects. Do not start another iteration in the same turn. iteration >= max_iterationsin STATE.md → stop, summarize LOG.md, tell the user how to raise the cap in STATE.md and resume.- Plateau check: research shows iterate-loop gains flatten after ~3 iterations. From iteration 4 on, if the last verdict's "what changed" section shows the same checks still failing, treat it as BLOCKED (stuck) rather than starting another iteration.
- Last verdict
- Otherwise increment
iterationin STATE.md, setstatus: running, and proceed.
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.
- 3d ago First seen · 97 lines · 49 tokens per session scan A 3de66720b1d2
trio is a command published in the GitHub repository albiol2004/trio-agent-loop (2 stars, last pushed 12d ago), licensed MIT. It adds 49 tokens to every session and 3,036 once invoked, about $0.0002 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.
Other commands, from other repositories
differential-audit
Audit EARS↔code coherence via a bidirectional differential. With no arguments, opens a scoping conversation that interprets what the user wants audited, maps it to arrows, and captures an explicit EARS selection. With one or more EARS IDs, audits those specs directly using configured defaults. Requires docs/arrows/…
arrow-maintenance
Run an audit-and-update pass on the docs/arrows/ overlay. Dispatches on project state — audits an existing overlay, bootstraps the overlay from existing LID docs, or redirects to /map-codebase or /linked-intent-dev for projects without LID.
map-codebase
Bootstrap LID in an existing (brownfield) codebase. Reads every file in scope, proposes lens-based clusterings, walks the user through reconciliation, generates skeleton LLDs/HLD/EARS and the arrow overlay, then prompts the user to flesh out the skeletons. Token-intensive by design.
commit
智能生成 Git 提交信息并提交.
pr
Handle the full workflow from current branch state to an open, CI-monitored pull request.
test
Run all PandaFilter verification steps in order. Stop and report on first failure. This is the required pre-commit gate.