How do I have a second model review bug fixes in a monorepo before each commit?
With Tares, you mark a Claude Code session as a challenger session, and the Codex CLI on your laptop critiques the plan and reviews every commit Claude makes. A blocking finding sends Claude back to amend the commit. If you disagree with a finding, you waive it.
How it works
Claude Code plans and builds as usual. Codex runs locally, so the review never waits on Tares and Tares never calls Codex.
- Plan critique. When you approve a plan and Claude leaves plan mode, Codex reads it in a read-only sandbox. It looks for gaps, wrong architecture, scope problems, unhandled risks and missing verification. Each finding is tagged
[P1](the plan fails as written),[P2](will cause rework) or[P3](advice). A plan critique never blocks. Claude mentions the findings in its first reply and adjusts, or tells you why it disagrees. - Commit review. After each
git commit, the plugin has Codex review that commit. - No findings. Claude carries on.
[P1]or[P2]. Claude is blocked and told to fix the problem and fold it into the same commit withgit commit --amend. If the reviewed commit is already on a remote, Claude makes a new commit instead. The amended commit is reviewed again as round 2, and so on until Codex is satisfied.[P3]. Context only, never blocking.- Timeouts and errors. A Codex timeout, error or inconclusive review never blocks.
The fix loop stops at 8 rounds per commit and 5 turn ends per session. After that, the findings come back as context.
For a bug fix, this means the change is checked by a second model before you move on, one commit at a time.
Set it up
-
Run Tares and its MCP endpoint next to it, or use a Tares Cloud instance, which serves the endpoint itself. The get started guide shows the install.
uv tool install tares # or: brew install glassflow/tap/tares tares up # console on http://127.0.0.1:8787 tares mcp --transport streamable-http # http://127.0.0.1:8788/mcp -
Install the Tares plugin for Claude Code, version 0.2 or later, with
/plugin marketplace add glassflow/taresand then/plugin install tares@tares. On a secured instance, give it aread + ingestAPI key. -
Install the Codex CLI and log in. Codex runs on your laptop and is billed to your OpenAI account.
npm install -g @openai/codex codex login -
Set an Anthropic API key for the summarizer, under Settings > Model providers or as
ANTHROPIC_API_KEY. Tares Cloud instances come with one. -
Open Claude Code in the repo that holds the bug. Say “make this a challenger session” or type
/tares:challenger. The first marked session creates the Challenger workflow project on Tares for you. -
Describe the bug in plan mode, approve the plan, then let Claude implement and commit. Each commit is reviewed as above.
-
When a blocking finding is wrong for your code, type
/tares:challenger-waive. It lists the blocking findings and waives one or all of them. The waiver is remembered for that finding on later rounds and shipped to Tares as achallenge_waivedevent. -
To make commit findings advisory instead of blocking, set the plugin option
challenger_modetoadvise. The default isstrict. -
Type
/exitto end the session. A Tares agent then writes a summary of the plan, each commit and what Codex caught. It also proposes up to five sentences worth remembering for the next session in that repo.
The full walkthrough is in Challenge Claude Code with a second model.
What you get
- A second opinion on the plan and on every commit, before the fix moves on.
- A fix loop that sends Claude back to amend the same commit until Codex has no blocking findings.
- A waiver path, so you stay in charge when you disagree with a finding.
- One timeline per session on Tares. The Claude and Codex exchange reads as one thread. The Sessions list shows the plan outcome and one badge per reviewed commit,
Findings (N)orPass. - Events you can filter on:
challenge_plan,challenge_commit,challenge_waivedandsession_end. Theverdictlabel is Codex’s own word, such asPASSorFAIL. - A written summary under What the agents found, with memory proposals you accept or reject. Only accepted ones are handed to Claude at the start of the next session in that repo.
- A review that keeps running when Tares is slow or down. The plugin retries shipping on the next hook.
Run costs are plain. A session with a plan and three commits is typically five to eight Codex runs, billed by OpenAI. The summary is one Tares agent run per session. Review state, waivers and the review history live under the repository’s .git/.
When something else fits
- You want the commit check to never stop you. Use
challenger_modeset toadvise, so findings arrive as context only. - Codex needs to run your project’s commands to judge a fix. Set the plugin option
codex_sandboxtoworkspace-writeordanger-full-access. The default is read-only. - You want a whole project built, not one fix reviewed. Use the Tares crew of Claude Code sessions, an orchestrator, a reviewer and builders. The get started guide covers it. It can also have a second model check every commit, and it needs Claude Code.
- You do not use the Codex CLI or an OpenAI account. The challenger review depends on Codex, so a plain Claude Code session with Tares recording it is the simpler fit.
Related
- Build a software factory with Claude Code
- How do I have a second model review internal refactors in a Python backend before each commit?
- Should the crew merge pull requests for bug fixes on its own or wait for my yes?
- How do I write a spec a Claude Code crew can build bug fixes from in a monorepo?
Still stuck? Get help