How do I have a second model review bug fixes in a Node/TypeScript app before each commit?
Tares has a challenger session where the Codex CLI reviews every commit Claude Code makes in your Node/TypeScript app, and a blocking finding sends Claude back to amend. Codex also critiques the plan when Claude leaves plan mode. If you disagree with a finding, you waive it.
How it works
A challenger session pairs two models on your laptop. Claude Code plans and builds, and the OpenAI Codex CLI reviews. Tares records the exchange and never calls Codex. The full guide is Challenge Claude Code with a second model.
- Plan check. When you approve the plan for a bug fix and Claude leaves plan mode, the plugin hands 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, and Claude adjusts. A plan critique never blocks. Only[P1]counts as blocking, and Claude then revises or tells you why it disagrees. - Commit check. After each
git commit, the plugin has Codex review that commit.- No findings: Claude carries on.
[P1]or[P2]findings: Claude is blocked and told to fold the fix into the same commit withgit commit --amend. If the reviewed commit is already on a remote, it makes a new commit instead. The amended commit is reviewed again as round 2, and so on until Codex is satisfied.[P3]findings: context only.
- Safety valves. The loop stops at 8 rounds per commit and 5 turn ends per session, and after that the findings come back as context. A Codex timeout, error or inconclusive review never blocks.
The reviews run in the Claude Code hooks on your laptop, against your OpenAI account. A Tares that is down or slow never blocks a review.
Set it up
-
Run Tares and its MCP endpoint, or use a Tares Cloud instance, which serves the endpoint itself:
tares up tares mcp --transport streamable-http -
Install the Tares plugin for Claude Code, version 0.2 or later, from the plugin marketplace with
/plugin marketplace add glassflow/taresand then/plugin install tares@tares. The install asks for the Tares URL, the MCP endpoint and, on a secured instance, aread + ingestAPI key. -
Install the Codex CLI with
npm install -g @openai/codexand sign in withcodex login. Codex is billed to your OpenAI account. -
Set an Anthropic API key for the summarizer under Settings > Model providers or as
ANTHROPIC_API_KEY. Tares Cloud comes with one. -
Open Claude Code in your Node/TypeScript 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. -
Plan the bug fix in plan mode, approve the plan, and let Claude implement and commit. Each commit is reviewed as described above.
-
If a blocking finding is wrong, run
/tares:challenger-waive. It lists the blocking findings and waives one or all of them. Tares remembers the waiver for that finding on later rounds and records achallenge_waivedevent.
Two plugin options matter here. Set challenger_mode to advise to make commit findings advisory too, so nothing blocks. Set codex_sandbox to workspace-write or danger-full-access when Codex needs to run your project’s commands, because the default is read-only. Type /tares:challenger off to turn the challenger off for the rest of the session.
What you get
- Every bug-fix commit is checked by a second model before you build on it, and blocking issues are fixed inside the same commit by amending.
- The plan is critiqued before any code is written, with each finding ranked
[P1]to[P3]. - A waiver path for findings you reject, so a wrong finding does not stall the loop.
- One timeline per session on Tares. The Sessions list on the project page shows the plan outcome and a
Findings (N)orPassbadge per reviewed commit. Opening a session shows the Claude and Codex exchange as one thread. - A written summary when you
/exit. It covers what was asked and built, how Codex changed the plan, what Codex caught per commit, the cost, and up to five Memory proposals. Accept one and the next session in that repo starts with it as context. Nothing reaches memory without your accept. - Predictable cost. A session with a plan and three commits is typically five to eight Codex runs, billed by OpenAI. The summarizer is one metered Tares agent run.
When something else fits
- If you want a whole project built by a crew, use the software factory for Claude Code. Its first-run settings let you choose whether a second model checks every commit, and the optional Codex CLI covers that. See Get started.
- If you only want advice and no blocking, set
challenger_modetoadviseand keep the challenger. - If you do not have an OpenAI account for Codex, a challenger session is not available, because Codex does the reviewing.
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?
- How do I have a second model review bug fixes in a monorepo before each commit?
- How do I have a second model review bug fixes in a Python backend before each commit?
Still stuck? Get help