Skip to Content
Tares

How do I have a second model review bug fixes in a Python backend before each commit?

Tares lets you run a challenger session, where the Codex CLI critiques Claude Code’s plan and reviews every commit it makes in your Python backend. A blocking finding sends Claude back to fix the bug fix and amend the commit before it moves on. If you disagree with a finding, you waive it with /tares:challenger-waive.

How it works

In a challenger session Claude Code plans and builds as usual, and the Codex CLI on your laptop acts as the second model. Tares records the exchange and never calls Codex.

  • Plan critique. When you approve a plan and Claude leaves plan mode, Codex critiques it in a read-only sandbox. It tags each finding [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 with a [P1].
  • Commit review. After each git commit, the plugin runs Codex on that commit. With no findings, Claude carries on. With [P1] or [P2] findings, Claude is blocked and told to 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.
  • Rounds. The amended commit is reviewed again as round 2, and so on until Codex is satisfied. The loop is capped 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.

The reviews run in the Claude Code hooks on your laptop, against your OpenAI account. A Tares that is down or slow never holds up a review.

Set it up

  1. Run Tares with its MCP endpoint next to it, or use a Tares Cloud instance. Locally that means tares up, and tares mcp started with --transport streamable-http.

  2. Install the Tares plugin for Claude Code, version 0.2 or later, with /plugin marketplace add glassflow/tares and then /plugin install tares@tares. The install asks for the Tares URL and the MCP endpoint.

  3. 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
  4. Open Claude Code in your Python backend repo and say “make this a challenger session”, or type /tares:challenger. The first marked session creates the Challenger workflow project on Tares by itself.

  5. Ask for the bug fix in plan mode, approve the plan, and let Claude implement and commit. Each commit is reviewed before Claude moves on.

  6. If you disagree with a blocking finding, run /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.

  7. Optional: set the plugin option challenger_mode to advise so commit findings never block. Set codex_sandbox to workspace-write or danger-full-access when Codex needs to run the project’s commands. The default is read-only.

/tares:challenger off turns the challenger off for the rest of the session. A session you did not mark is streamed like any other and nothing runs.

The full walkthrough is in Challenge Claude Code with a second model.

What you get

  • Every plan and every commit gets a second opinion from Codex before Claude moves on.
  • Blocking findings on a commit turn into a fix-and-amend loop, so the bug fix you keep is the one Codex accepted, or the one you waived.
  • Each session has one timeline on the Challenger workflow project. A challenge_plan event records the plan review with its verdict, finding count and blocking count. A challenge_commit event records each reviewed commit with its verdict, sha, round, finding count and blocking count.
  • A challenge_waived event records every waiver you make.
  • The Sessions list shows a Findings (N) or Pass badge per reviewed commit.
  • When you end the session with /exit, a Tares agent writes a summary. It covers what Codex caught in each commit and proposes up to five sentences worth remembering about the repo. You accept or reject each one, and accepted ones reach the next Claude Code session in that repo.
  • Review state, fix-loop counters, review history and waivers stay under the repository’s .git/ on your laptop.
  • 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 across a whole project built by a crew of sessions, the software factory for Claude Code offers that as a crew setting. See Get started.
  • If you only want advice and no blocking, use challenger_mode set to advise and keep the same reviews.

Still stuck? Get help

Last updated on