Skip to Content

How do I have a second model review framework migrations in a Node/TypeScript app before each commit?

Tares lets Codex critique the plan and review every commit Claude Code makes, so a blocking finding on your migrations sends the builder back to amend. You mark a Claude Code session as a challenger session and Codex runs on your laptop after each commit in your Node/TypeScript repo. If you disagree with a finding, you waive it and the work moves on.

How it works

A challenger session pairs two models. Claude Code plans and builds, and the OpenAI Codex CLI on the same laptop checks the work. Tares records the exchange and never calls Codex.

  • Plan critique. When you approve a plan 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). A plan critique never blocks. For a [P1], Claude revises the plan or tells you why it disagrees.
  • Commit review. After every git commit, including the one that adds your migration files, the plugin has Codex review that commit by its sha.
  • Blocking findings. A [P1] or [P2] finding blocks Claude. Claude must fix it and fold the fix into the same commit with git 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. The loop stops at 8 rounds per commit and 5 turn ends per session, and then the findings come back as context.
  • Advice only. [P3] findings are context and never block. A Codex timeout, an error or an inconclusive review never blocks either.

Each review lands on the session timeline in Tares as a challenge_plan or challenge_commit event. The event carries the verdict, the round and the blocking count.

Set it up

  1. Start Tares locally and, in a second terminal, start the MCP endpoint that the plugin uses. On Tares Cloud the endpoint is already served for you.

    tares up tares mcp --transport streamable-http
  2. Install the Tares plugin for Claude Code, version 0.2 or later, from the glassflow/tares marketplace. The install asks for the Tares URL, the MCP endpoint and, on a secured instance, a read and ingest API key.

  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. The summarizer uses it, and Tares Cloud instances come with one.

  5. 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 its own.

  6. Ask for your migration work in plan mode. Approve the plan, read Codex’s critique in Claude’s first reply, then let Claude implement and commit. Every commit is reviewed.

  7. If you disagree with a blocking finding, run /tares:challenger-waive. It lists the blocking findings and waives one or all of them. Tares records the waiver as a challenge_waived event, and later rounds remember it for that finding.

  8. Optional: if Codex needs to run your project’s commands, set the plugin option codex_sandbox to workspace-write or danger-full-access. To make commit findings advisory, set challenger_mode to advise.

If you run the whole crew instead of a single session, tares factory crew up asks whether a second model checks every commit. The Get started page covers that setup. For a TypeScript repo, tares factory doctor also checks that Claude Code has a language server for it.

What you get

  • Every commit that touches your migrations gets a second opinion before Claude moves on. A blocking finding stops Claude until the fix is amended into that commit, so the commit history keeps one reviewed commit instead of a trail of repair commits.
  • A critique of the plan before any code is written, so gaps and missing verification show up while they are cheap to fix.
  • A clear way out. You can waive a finding you disagree with, and the waiver is recorded on the timeline.
  • One timeline per session. The project page lists each session with its plan outcome and a Findings (N) or Pass badge per reviewed commit. You can open a session to read the Claude and Codex exchange as one thread.
  • A summary when you run /exit: what was built, what Codex caught in each commit, and up to five memory proposals. You accept or reject each one, and accepted ones reach the next session in that repo as context.
  • Review state, fix-loop counters and waivers stay on your laptop under the repository’s .git/ directory, and a slow or unavailable Tares never blocks a review.

The challenger workflow guide walks through a full session.

When something else fits

  • If you do not want Codex in the loop, a plain Claude Code session or the crew without the second-model check is simpler. Codex runs are billed by OpenAI, and a session with a plan and three commits typically needs five to eight of them.
  • If you want findings to inform Claude without ever stopping it, set challenger_mode to advise instead of waiving findings one by one.

Still stuck? Get help

Last updated on