Skip to Content
Tares

How do I have a second model review dependency upgrades in a Python backend before each commit?

Tares lets Codex review your plan and every commit of a dependency upgrade in a Python backend, and sends Claude Code back to fix serious findings. Mark the session as a challenger session and the Codex CLI on your laptop critiques the plan and reviews each commit Claude makes. A blocking finding makes Claude fix it and amend the commit, and you can waive a finding you disagree with.

How it works

In a challenger session, Claude Code plans and builds as usual while the OpenAI Codex CLI on the same laptop acts as the second model. The check runs locally in the Claude Code hooks and never waits on Tares. Tares records the exchange.

  • Plan critique. When you approve the plan and Claude leaves plan mode, Codex reads it in a read-only sandbox. It looks for gaps, wrong architecture, scope, 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 revises, or tells you why it disagrees with a [P1].
  • Commit review. After each git commit, the plugin has Codex review that commit. With no findings, Claude carries on.
  • Blocking findings. [P1] and [P2] findings block Claude. It is told to fix them and fold the fix into the same commit with git commit --amend, or into a new commit when the reviewed one is already on a remote. The amended commit is reviewed again as round 2, and so on until Codex is satisfied.
  • Limits on the loop. The loop is capped at 8 rounds per commit and 5 turn ends per session. After that the findings come back as context instead.
  • Never blocking. [P3] findings are context only. A Codex timeout, error or inconclusive review never blocks.

The same flow applies to any change Claude commits, so a commit that bumps your Python dependencies goes through the same review as every other commit.

Set it up

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

    tares up tares mcp --transport streamable-http
  2. Install the Tares plugin for Claude Code, version 0.2 or later, with /plugin marketplace add glassflow/tares and /plugin install tares@tares. The install asks for the Tares URL and the MCP endpoint. Locally the default endpoint is http://127.0.0.1:8788/mcp.

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

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

  5. Start 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.

  6. Ask for the dependency upgrade in plan mode and approve the plan. Codex takes 30 to 90 seconds on a plan, so Claude’s first reply is slower. Then let Claude implement and commit. Each commit is reviewed and any blocking finding sends Claude back to amend.

  7. 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.

  8. If Codex needs to run the project’s commands, set the plugin option codex_sandbox to workspace-write or danger-full-access. The default is read-only. To make commits advisory instead of blocking, set challenger_mode to advise.

The full walkthrough is in Challenge Claude Code with a second model. If you run a crew with the software factory for Claude Code, tares factory crew up also asks whether a second model checks every commit. See Get started.

What you get

  • A second model critiques your upgrade plan before Claude builds it, and a challenge_plan event records the findings on the session.
  • Every commit gets a review. A challenge_commit event records the verdict, the commit sha and the round, with a Pass or Findings (N) badge per commit on the project’s Sessions list.
  • Serious problems are fixed in the same commit through the amend loop, so the history stays clean.
  • A waiver is shipped to Tares as a challenge_waived event, so the record shows which findings you overrode.
  • The Claude and Codex exchange reads as one thread per session. When you /exit, the challenger_summarizer agent writes a summary covering the plan, each commit and what Codex caught, cost, and up to five Memory proposals about the repo.
  • Accept a proposal and the next Claude Code session in that repo starts with it as context. Nothing reaches memory without your accept.
  • Your code is reviewed on your laptop. Tares only receives the results, and a slow or down Tares never blocks a review.

When something else fits

  • If you want commits reviewed but never blocked, set challenger_mode to advise, or turn the check off for the session with /tares:challenger off.
  • If you want a whole project built by a crew rather than one session, use the software factory for Claude Code and turn on the second-model check in its crew settings, as described in Get started.
  • Codex runs are billed by OpenAI. A session with a plan and three commits is typically five to eight Codex runs, so weigh that against how often you upgrade.

Still stuck? Get help

Last updated on