r/codereview • • 21d ago

Why asking Claude Code to review its own diff in the same chat fails (+0.0 pp on LiveCodeBench) – built an open-source cross-CLI review gate (cold-jury)

If you ask the same coding agent session that just wrote a feature to review its own git diff, it almost always tells you the code looks great—even when it just introduced a subtle bug or refactored three unrelated files.

During the conversation, the model has already justified every decision in its context window. In the LiveCodeBench cross-model review study (arXiv:2607.21656: https://arxiv.org/abs/2607.21656):

  • Claude Sonnet 4 reviewing its own code: 91.4% -> 91.4% (+0.0 percentage points)

  • Claude Sonnet 4 reviewing OpenAI Codex drafts: 71.6% -> 89.7% (+18.1 percentage points)

  • GPT-4o-mini reviewing Claude Sonnet 4: 91.4% -> 94.0% (+2.6 percentage points)

To automate that cross-examination right before commit or git push, I built and open-sourced cold-jury (https://github.com/Dimoncelli/cold-jury, MIT, Node >=20, zero npm dependencies).

It applies Google's Elephant-Goldfish pattern: your main agent keeps the full project memory, while cold-jury spawns three ephemeral "goldfish" jurors in a different CLI (claude, codex, gemini, opencode, or local ollama) inside sterile temp directories with no chat history and a stripped environment allowlist:

  1. Pre-flight Secret Shield: scans the diff and --spec across 17 credential families (sk-ant-, sk_live_, AKIA, ghp_, PEM, JWT, DB URIs, .env) before spawning any subprocess. If it spots a P0 key, it blocks locally (exit 1) without sending anything out.

  2. 3 Parallel Hostile Probes: appsec (CWE vulnerabilities), correctness (logic bugs & race conditions), and surgical (YAGNI / scope creep against your --spec).

  3. Universal Skill & Git Hook: works standalone via npx, as a pre-push hook, or installed directly as a Skill (SKILL.md + .claude-plugin + agents/openai.yaml).

Quick commands to test it: npx --yes github:Dimoncelli/cold-jury doctor npx skills add Dimoncelli/cold-jury

Curious how others here structure their review step—do you spin up a fresh subagent, switch between Claude Code and Codex, or run automated pre-push gates?

0 Upvotes

1 comment sorted by