review_loop

A command that repeatedly reviews code, verifies the reported problems, fixes the real ones, and reviews the changes again. It uses a persistent conversation so findings can be tracked across review rounds.

In plain words
What is it for?
Use it to review selected files or directories, check each finding against the actual code, apply valid fixes, and repeat the review.
Why use it?
It helps distinguish genuine defects from incorrect review comments and continues until the review is clean or a safety limit is reached.

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/wallneradam/cc-plugin-counterpoint/review_loop
Clone the repo
git clone --depth 1 https://github.com/wallneradam/cc-plugin-counterpoint
Per session 24 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,348 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. 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.00024 $0.04348
Opus 5 $0.00012 $0.02174
Sonnet 5 $0.00005 $0.00870
Haiku 4.5 $0.00002 $0.00435

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

Security

Grade C, and why

review_loop scanned grade C with 1 finding 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

**Wipe old runs at start — but never with a variable-glob `rm`.** Before creating the new run directory, delete every existing entry directly under `counterpoint-review-loop/`, nothing outside it. Do NOT write `rm -rf "$
plugin/commands/review_loop.md · 253 lines

How it starts

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

Counterpoint Review Loop

Run an autonomous loop around the counterpoint review mode: review → verify each finding → fix the real ones → report back to Codex → re-review, until Codex approves or a safety cap is hit.

Parse --scope, --base, --path (repeatable), and --effort from $ARGUMENTS and pass them through to every review round. If the user names files or directories without flags, treat them as --path arguments.

What makes this loop different from re-running one-shot reviews: every iteration continues the same persistent Codex thread. Codex remembers its own findings by id, verifies claimed fixes in the actual code, and updates each finding's status (resolved / still-open / revised / withdrawn). A false positive rejected once stays withdrawn — it is never re-litigated. This makes convergence fast; most runs finish in 2–5 iterations.

Mindset: Codex is one reviewer, not the source of truth

Codex findings are hypotheses. Every finding must be verified against the actual code before any fix is applied — false positives are routine, and applying them blindly makes the code worse. Disagreeing with Codex is fine and often correct: if a finding contradicts project conventions (CLAUDE.md / AGENTS.md), if the flagged behavior is intentional, or if the claim simply does not hold, classify it as a false positive and push back in the next round so Codex withdraws it.

Architecture: orchestrator + per-iteration sub-agents

Do not run the whole loop inside one agent — a long loop accumulates context and degrades. The split is strict:

The orchestrator (you, the agent running this command):

  • Prepares the workspace (see below).
  • Spawns ONE per-iteration sub-agent at a time via the Agent tool, synchronously: pass run_in_background: false EXPLICITLY, subagent_type: "general-purpose". Newer harnesses run agents in the background BY DEFAULT — omitting the flag detaches the worker, the orchestrator's turn ends, and the completion notification may never arrive, silently stalling the loop. A synchronous Agent call blocks and returns the worker's final JSON inline; a sub-agent taking 5–10+ minutes is normal — wait for it.
  • Reads each sub-agent's JSON summary (returned as final message and written to iteration-NN.json).
  • Decides continue/stop per the convergence rules.
  • Prints EXACTLY the per-iteration progress output defined below — one stats line plus the worker's 1–3 sentence summary, nothing more — and, at the end, writes final-summary.md plus a 2–3 line closing summary.

Read the full file on GitHub · 253 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 · 253 lines · 24 tokens per session scan C 606e74ad12f9

Subscribe to this mod's changes

review_loop is a command published in the GitHub repository wallneradam/cc-plugin-counterpoint (2 stars, last pushed 1mo ago), licensed MIT. It adds 24 tokens to every session and 4,348 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.