Automated commit review gates coding agent output

A developer package called reviewer-agent introduces two functions that sit between a coding agent and the version control system. The reviewer agent performs automated plan and code reviews, blocking each git commit until identified issues are resolved. The stop-continue feature examines project plans, task lists, and background tasks to decide whether the agent may stop or what it should do next. The system works with Claude Code and Codex, and can use Codex, Pi, or Claude Code itself as the reviewing model.

The author has used large language models for coding since the technology became available and has tested every major model. A recurring observation is that a model focused only on review, not coding, can uncover problems the coding agent misses. Different models have distinct strengths, and using more than one model during review produces better plans and code with fewer bugs. The project sets up a commit gate that holds each commit until a separate reviewer agent completes a plan or code review. If the reviewer finds issues, the coding agent must resolve them before the commit proceeds.

Data collected over four months of daily use from late June to October 2026 shows the reviewer agent gated 3,877 commits made through Claude Code, running about 7,600 reviews total. Approximately half of those commits were rejected at least once. Each rejection listed an average of two required fixes, and most rejected commits were accepted after a second round, with 90 percent within five attempts. Rejection rates increased with commit size: only 23 percent of code commits under 50 lines were sent back, but 72 percent of commits over 1,000 lines were initially rejected. The coding agent almost never disagreed with the reviewer's judgements. In the last month, for example, it pushed back on just 3 of 693 rejections.

Reviewers find bugs coding agents miss

An interesting finding involves a small, inexpensive model used as reviewer. When run in xhigh and fast mode, gpt-6-luna finds numerous serious issues, omissions, and errors even when the coding agent is a frontier model on xhigh mode. The reviewer can be any model, and the author has found that even gpt-5.6-luna routinely flags real bugs against powerful coding agents.

It can take multiple commit attempts for the coding agent to remove all bugs the reviewer finds. When asked whether required fixes are valid, the coding agent overwhelmingly agrees they are real issues. The reviewer agent reviews each commit in a separate session from the coding agent, providing a second perspective that catches what the author missed.

The article includes two real commit gate rejections from a private data-pipeline project. In the first rejection, the Fable 5.1 developer agent wrote a wrapper script that runs R validation checks against a freshly loaded database. The reviewer identified that the script pipes each R check through tail without pipefail or explicit status handling, so a failed Rscript can still produce a zero exit status and be recorded as successful. The fix requires preserving and propagating each check's exit status.

In the second rejection, the developer agent wrote a checker that validates a database export before publication, and a README claiming cell-by-cell validation. The reviewer found three gaps: the README falsely claims every user table was unchanged, the checker validates only aggregate exported row count not exact per-type counts, and the checker reads manifest_validation from a nonexistent manifest key. The commit was approved only on the third attempt after the reviewer found no remaining gap.

Stop-continue supervision prevents agent stalls

Even the best coding agents will work for a while and then stop. Sometimes they say "this is a good stopping point," sometimes they ask the user a question already decided in an established plan, and sometimes they just stop without explanation. Various methods have been used to prevent this, including Ralph Loops and Claude Code's /goal, but the project introduces stop-continue as a separately controllable feature.

Stop-continue examines the project plan, task list, and whether background tasks are running that the agent is waiting for. When the coding agent tries to stop, pauses on an already-decided question, or asks permission already granted, a separate supervisor weighs the plan, the task list, and what the user said in the session. The supervisor either allows the stop or tells the agent what to do next, which may include answering a question or granting permission on the user's behalf.

An additional watchdog feature notices stalled or idle sessions and re-prompts the agent automatically, so stop-supervision and the run recover without waiting for human nudge. Settings persist across restarts and apply to linked worktrees.

Workflow integration and configuration

The package provides two gates the user controls independently. Commit review holds every git commit while a separate reviewer agent audits the staged diff. If problems are found, the commit is blocked with a numbered fix list the coding agent must resolve, and it re-reviews on each retry until the diff passes. Fail-closed design means a reviewer error, timeout, unparseable verdict, or empty response also blocks the commit.

Stop-continue supervision activates when the coding agent tries to stop, pauses on an already-decided question, or asks permission already granted. The stop supervisor weighs the plan, task list, and session context, then either allows the stop or tells the agent what to do next.

Stop-continue watchdog notices a stalled or idle session and re-prompts the agent automatically.

The user can pick any model as reviewer. On Claude Code host, the reviewer can be backed by Codex, Pi with any model, or the Claude Code CLI itself. On Codex GUI host, the reviewer uses its own Codex child. Either way the reviewer runs in a session separate from the coding agent.

Configuration options include setting model, reasoning effort, and timeouts per backend. A small, cheap reviewer routinely flags real bugs even against frontier coding agents. The project also provides agentic Codex review that reads the staged patch, opens touched files and dependencies, reads tests, and can run tests in a workspace-write sandbox with git read-only.

Delta re-review on retries tells the next audit exactly which staged paths changed since the last review, with diffs inlined from the index so unstaged edits cannot be passed off as reviewed. Skimmed paths let authors mark auto-generated data so the reviewer skims those diffs instead of judging individual records. A per-project reviewer brief, stored as reviewerAgent.md at the root, becomes the reviewer's standing instructions.

Persistent directives can add a standing fact or authorization to every reviewer prompt. Verdict history records approvals, rejections, and no-verdict outcomes outside the repo so the user can see what happened. Question rerouting turns AskUserQuestion into a prose question the stop supervisor answers from established context.

Installation and risk

The software runs an autonomous AI agent inside the development environment. It reads source code, sends it to a third-party AI provider of the user's choosing, and on the Codex backend executes commands in the repository. It can consume paid quota. Its output may be treated as instruction by another AI agent and may cause destructive, costly, irreversible or externally visible actions without human confirmation.

The software comes with extensive disclaimer: no warranty of any kind, sole user responsibility for everything the software and AI agents do, recommendation to keep independent backups, and not to point it at untrusted repositories or rely on it where failure would cause harm. Full terms are in DISCLAIMER.md and LICENSE (MPL-2.0, §6 and §7).

For teams wanting to gain the most benefit, the author suggests a process specified in CLAUDE.md or AGENTS.md: create a plan, commit the plan and address reviewer-found issues, create tests (TDD), commit tests and address reviewer-found issues, create code to pass tests, commit code and address reviewer-found issues, run code and fix bugs, commit code.

The author also recommends letting coding agents have four markdown files: PLAN.md for overall development plan, HANDOVER.md kept under 400 lines with status and context sufficient for the agent to continue, CODING_LOG.md for tracking coding decisions, and FINDINGS.md for test results or other information that should not clutter HANDOVER.md.