Skip to Content

How do I have a second model review internal refactors in a monorepo before each commit?

Tares lets you mark a Claude Code session as a challenger session, so the Codex CLI critiques the plan and reviews every commit of your internal refactors in a monorepo. A blocking finding stops Claude and sends it back to amend the commit. If you disagree with a finding, you waive it with /tares:challenger-waive. Codex runs on your laptop and Tares records the exchange.

How it works

The review runs inside Claude Code hooks on your machine, so it works the same in any repo, including a monorepo checkout.

  • Plan critique. You approve a plan and Claude leaves plan mode. The plugin passes the plan to Codex in a read-only sandbox. Codex tags each finding [P1] (the plan fails as written), [P2] (will cause rework) or [P3] (advice). The critique reaches Claude as context, so its next message adjusts. A plan critique never blocks. Only [P1] counts as blocking on a plan, and Claude then revises or tells you why it disagrees.
  • Commit review. After every git commit, the plugin has Codex review that commit. With no findings, Claude carries on.
  • Blocking findings. [P1] or [P2] findings block Claude. It must fix them and fold the fix into the same commit with git commit --amend. If the reviewed commit is already on a remote, it makes a new commit instead. The amended commit is reviewed again as the next round.
  • Limits on the loop. The loop stops at 8 rounds per commit and 5 turn ends per session. After that, the findings come back as context.
  • Never blocking. [P3] findings, a Codex timeout, an error and an inconclusive review never block.
  • Local state. Review state, loop counters, review history and waivers live under the repository’s .git/. Tares only receives the results, so a slow or stopped Tares never holds up a review.

Set it up

  1. Run Tares with its MCP endpoint next to it, or use Tares Cloud, which serves the endpoint itself:

    tares up tares mcp --transport streamable-http
  2. In Claude Code, install the Tares plugin (version 0.2 or later) with /plugin marketplace add glassflow/tares and then /plugin install tares@tares. On a secured instance the install also asks for a read + ingest API key.

  3. Install the Codex CLI and log in with codex login. Codex runs on your laptop and is billed to your OpenAI account.

  4. Set an Anthropic API key for the summarizer under Settings > Model providers or as ANTHROPIC_API_KEY. Tares Cloud instances come with one.

  5. Open Claude Code in your monorepo and say “make this a challenger session”, or type /tares:challenger. The first marked session creates the Challenger workflow project on its own.

  6. Describe the refactor in plan mode and approve the plan. Codex takes 30 to 90 seconds on a plan, so the first reply is slower. Then let Claude implement and commit.

  7. When a finding blocks and you disagree, run /tares:challenger-waive. It lists the blocking findings and lets you waive one or all. The waiver holds for that finding on later rounds, and Tares records a challenge_waived event.

  8. To make commit reviews advisory as well, set the plugin option challenger_mode to advise. The default is strict.

If Codex needs to run your project’s commands while it reviews, set the plugin option codex_sandbox to workspace-write or danger-full-access. The default is read-only. Type /tares:challenger off to stop the challenger for the rest of the session.

What you get

  • A second model reads every commit of the refactor before you move on, and Claude fixes blocking issues in the same commit.
  • A plan critique that arrives right after you approve the plan, so gaps are raised before any code exists.
  • A way to overrule Codex. A waiver is remembered for that finding, so the same finding does not stall later rounds.
  • One timeline per session on Tares. The project’s Sessions list shows the plan outcome and a Findings (N) or Pass badge for each reviewed commit. Opening a session shows the Claude and Codex exchange as one thread.
  • A summary when you /exit. A Tares agent writes what was asked and built, what Codex caught in each commit, the cost, and up to five Memory proposals about the repo. Nothing is kept until you accept it. The next session in that repo starts with the accepted ones as context.
  • Predictable cost. A session with a plan and three commits is typically five to eight Codex runs, billed by OpenAI.

When something else fits

  • If you want a second model to check every commit in a background crew instead of your own session, use the optional Codex check in the software factory. See Get started.
  • If you only want a record and no gating, use advise mode. The full options are in the challenger workflow guide.
  • If you do not use Claude Code, this workflow does not apply, because the plugin hooks run inside Claude Code.

Still stuck? Get help

Last updated on