single-cli

A command that runs the autonomy loop as named builder and reviewer subagents inside one terminal. It only enables this setup when the configuration and independent verification requirements allow it.

In plain words
What is it for?
Use it to coordinate sequential building and review, loop back when critique finds problems, and allow promotion only after the required parsed safety checks pass.
Why use it?
It lets a project use one terminal while keeping promotion tied to the reviewer's recorded deterministic gate, rather than to an agent's informal opinion.

Command

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 commands/inferencegod/autonomy-loop/single-cli
Clone the repo
git clone --depth 1 https://github.com/inferencegod/autonomy-loop
Per session 68 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,459 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.00068 $0.03459
Opus 5 $0.00034 $0.01729
Sonnet 5 $0.00014 $0.00692
Haiku 4.5 $0.00007 $0.00346

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

Security

Grade A, and why

single-cli 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.

autonomy-loop/commands/single-cli.md · 232 lines

How it starts

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

ROLE: orchestrator. You run the autonomy loop as NAMED subagents inside ONE Claude Code session, the single-CLI shape. This is additive and DEFAULT OFF: unless the operator has explicitly set coordination.mode to single-cli AND satisfied every gate below, you must REFUSE and fall back to guidance. The multi-process (four-terminal) path is unchanged; this command never touches it. You are a restricted orchestrator: you may only spawn the two named subagents (autonomy-builder, autonomy-reviewer), Read files, and run Bash. You provably cannot synthesize a pass. No em dashes.

THE ONE NON-NEGOTIABLE: promotion is keyed ONLY on the reviewer subagent's verbatim deterministic-gate output. The advisory critique can request changes (loop back to the builder); it can NEVER turn a gate fail into a pass, and you cannot promote without a parsed gate object AND a passing safety floor.

ALL KNOBS: autonomy.config.json. Read it once at the top of every run.

STEP 0: DECIDE THE COORDINATION SHAPE (the headline safety property)

Read autonomy.config.json. Call the pure core with the WHOLE config object (not a slice):

node -e '
  const fs = require("node:fs");
  const cfgPath = process.env.CLAUDE_PROJECT_DIR + "/autonomy.config.json";
  let cfg = null;
  try { cfg = JSON.parse(fs.readFileSync(cfgPath, "utf8")); } catch (e) { cfg = null; }
  import("file://" + process.env.CLAUDE_PLUGIN_ROOT + "/hooks/coordination-mode.mjs")
    .then(({ decideCoordination }) => {
      const d = decideCoordination(cfg);
      process.stdout.write(JSON.stringify(d));
      process.exit(0);
    })
    .catch(() => { process.stdout.write(JSON.stringify({ refuse: true, reason: "core-load-failed" })); process.exit(0); });
'

Parse the printed JSON as the decision. Then branch, fail-closed:

  • If you could not load the config, could not load the core, or could not parse a decision object, treat it as { refuse: true, reason: "uncomputable" }. NEVER assume single-cli is allowed.
  • If decision.refuse === true (gate off, gate does not bind the verdict, no reduced-trust opt-in, or the reviewer subagent is not isolated): PRINT THE REFUSAL GUIDANCE BELOW AND STOP. Do NOT spawn any subagent. Do NOT run the loop. This is the property the whole mode rests on: when nothing independent remains, single-cli is not defensible, so the orchestrator refuses rather than rubber-stamp.
  • If decision.refuse === false AND decision.mode === "single-cli": continue to STEP 1.
  • If decision.mode === "multi-process" (the default): single-cli was not requested. STOP and tell the operator to run the normal four-terminal loop (/builder, /reviewer, /planner, /researcher). Do not run subagents here.

REFUSAL GUIDANCE (print verbatim, substituting decision.reason, then STOP):

[autonomy-loop] single-cli REFUSED: <decision.reason>
  Single-CLI subagent mode is only defensible when an INDEPENDENT, deterministic check survives the
  loss of process independence. The reviewer subagent shares this session's model and parent, so its
  LLM judgment is NOT independent. The license for the mode is the deterministic gate: re-run in the
  reviewer's own worktree, it returns the same verdict no matter who invokes it. If that gate is off,
  does not bind the verdict, you have not opted into reduced trust, or the reviewer is not isolated,
  then nothing independent remains and this command will not run the loop.
  To proceed, set ALL of these in autonomy.config.json and re-run, OR use the four-terminal loop:
    "coordination": { "mode": "single-cli" }
    "gate":        { "deterministicEnabled": true, "bindsVerdict": true }
    "safety":      { "reducedTrustOptIn": true }
    "subagent":    { "reviewerIsolated": true }
  For money-path or irreversible work, prefer multi-process or a human, not single-cli.

Read the full file on GitHub · 232 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 · 232 lines · 68 tokens per session scan A cc6c19d747fb

Subscribe to this mod's changes

single-cli is a command published in the GitHub repository inferencegod/autonomy-loop (1 stars, last pushed 2mo ago), licensed MIT. It adds 68 tokens to every session and 3,459 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.