Skip to main content
Ask several reviewers at once and decide how many have to say yes. Use it when one opinion isn’t enough: a change that touches money, a migration, a public API. When one reviewer will do, use a writer and a reviewer. Each reviewer is an LLM-as-judge over the change, and the panel with its threshold is what some people call an eval loop: the judges decide whether the writer runs again.

Shape

The team

One implementer and a panel of two reviewers from two other model families. agree is how many must accept:
examples/teams/threshold-panel.ts (excerpt)
The reviewers run at the same time, one job each, once the test passes. agree is a whole number from one to the number of reviewers, and the default is all of them. Set it to the number of reviewers when one dissent must be enough to fail the step; below that, the change can pass despite a dissent, and the dissent is still on the record. A panel below the threshold carries its findings to implement, which runs again with them, as many times as that stage’s retry allows. workflow() refuses the team before any model runs if a reviewer shares a model family with the seat it reviews, or two reviewers share one: two reviewers from one family would be one opinion counted twice. The third seat runs through the OpenCode command line tool, whose adapter needs an absolute command path; resolveCommandExecutable('opencode') finds it on your PATH when the file runs.

What the run did

Run the file from the directory the work belongs in, with the Claude Code, Codex and OpenCode command line tools signed in. One real run printed:
Output
The Codex reviewer accepted. The OpenCode seat returned no decision: a reviewer’s decision is its reply, the panel reads the first JSON object in it, and a reply with none is asked for once more, then counted as an engine error, not a rejection. Nothing went to the implementer on its account. With agree: 1 the change passed on the one acceptance. Set agree to two and the same run would have paused at the panel instead, because an error isn’t an acceptance. The implementer wrote src/double.mjs:
src/double.mjs
and test/double.test.mjs:
test/double.test.mjs
examples/teams/threshold-panel.ts

Next steps

  • Feature delivery: a panel as one stage of a nine-stage team.
  • Review loop: the same idea as a graph form, with a quorum and requireDiversity you set yourself.
  • Runtime: workflow, stage, panel and agree.