CertSafari
    Anthropic Claude Certified Architect – Foundations (CCAR-F)· Lessons

    Domain 4 · Lesson 24/30

    Independent reviewers and multi-pass code review

    Design multi-instance and multi-pass review architectures

    15 min read
    3.33% of exam
    7 sources
    Published 20 Oct 2026
    Docs as of 14 Oct 2026

    What you will be able to do

    • Explain why a model that just generated code misses subtle issues when asked to review it in the same session, and why extended thinking does not close that gap
    • Set up an independent review instance that has never seen the generator's reasoning, using a second session or a subagent
    • Split a large multi-file review into per-file local passes plus a cross-file integration pass, and resolve conflicting per-file findings correctly
    • Design a finding pass that reports every issue with a confidence level, so a separate verification pass can filter and route the findings

    Key concept

    Independent review instance — A separate Claude instance that reviews generated output without the context, reasoning, or shortcuts of the session that produced it. Independence comes from the review starting with a clean context, not from a different model or a bigger thinking budget.

    1.Why the generating session is a weak reviewer

    A session that has just written code is a poor judge of it, because everything that led to the code is still in its context. The plan it chose, the edge cases it decided were out of scope and the shortcut it took on the third file are all sitting there. Ask that session to "review your work for bugs" and it reads the code alongside the reasons it already accepted. A decision that looked right while it was being made still looks right, so the session seldom questions it.

    Claude Code's best practices tell you to get a second opinion from outside the work. A verification subagent "has a fresh model try to refute the result", so the agent that did the work is not also the one grading it. The same guidance describes how accumulated context hurts later turns. When you correct Claude over and over, the session degrades because "Context is polluted with failed approaches." A self-review step suffers in the same way. Its context is full of the reasoning it is meant to be checking.

    Extended thinking, stricter self-review instructions and a second review round in the same conversation all share one flaw: they add reasoning on top of the original reasoning. None of them removes it. An instruction such as "challenge the design decisions you made earlier" asks the author to argue with itself while it still has its own justifications in view. An independent instance starts from the code alone. The Outcomes grader in Claude Managed Agents shows this clearly: the platform spins up "a fresh grader with the same model and tools as the writer". The model and tools are the same as the writer's. Only the context is different, and that difference is what makes the grader independent.

    Checkpoint 1 of 7· Check yourself

    A team wants a review step that catches the subtle bugs its code-generation agent keeps missing. Which setup gives them a review that is actually independent?

    Checkpoint 2 of 7· Exam question

    A team built a pipeline where the same Claude instance that generates code is then asked, within the same conversation, to 'review your own work for bugs before finishing.' QA later finds subtle issues the model missed during that self-review step. Which architectural change is most effective at catching those issues going forward?

    Checkpoint 3 of 7· Exam question

    An engineer configures the generation session with a high extended thinking effort and instructs the model to reflect deeply on flaws before submitting its code. Bugs still slip through review. Why is extended thinking insufficient as a substitute for an independent review instance here?

    Sources12

    2.Setting up an independent review instance

    The simplest independent reviewer is a second session. Claude Code's best practices describe a Writer/Reviewer split. Session A implements the feature. Session B, which never saw that work, reviews the resulting file. Session A then receives Session B's output as feedback and addresses it. The reviewer gets a concrete brief: "Look for edge cases, race conditions, and consistency with our existing middleware patterns."

    Which review setups give you an independent reviewer
    SetupSees the generator's reasoning?Independent review?
    Same session told to review its own workYesNo
    Same session with extended thinking turned upYesNo
    Resuming the subagent session that generated the codeYes, all of its carried contextNo
    Session B (Reviewer) reading Session A's (Writer) outputNo, only the codeYes
    A fresh review subagent given the diff and the planNo, only what it is handedYes

    Resuming the generator's session to save setup work defeats the purpose. A long-lived session "can anchor the reviewer on old conclusions", which is why a reviewer that gates pull requests should start fresh every time: "no old opinions and no carried context steering the current verdict." If you reuse the session, you keep its setup, and you also keep its bias.

    Delegating review of a diff to a subagent, which runs in its own context, with explicit criteriatext
    Use a subagent to review the rate limiter diff against PLAN.md. Check that
    every requirement is implemented, the listed edge cases have tests, and
    nothing outside the task's scope changed. Report gaps, not style preferences.

    A fresh context is necessary but not enough on its own. The reviewer also needs criteria that force it to look for evidence. Outcomes graders show what happens without them: "The default failure mode is a grader that approves everything." A rubric that only asks whether a topic is covered lets the grader skim and confirm. A rubric that names the exact thing to verify makes the grader check it. If you review in the same domain repeatedly, a dedicated subagent file keeps the brief fixed. Claude Code's example security-reviewer lists injection, auth flaws, secrets and insecure data handling, and asks for specific line references.

    Checkpoint 4 of 7· Fill the gap

    This review prompt from Claude Code's best practices is meant to get a verdict from a reviewer that cannot see the writer's reasoning. Which word fills the blank?

    Use a  ?  to review the rate limiter diff against PLAN.md. Check that
    every requirement is implemented, the listed edge cases have tests, and
    nothing outside the task's scope changed. Report gaps, not style preferences.

    Sources132

    3.Per-file passes plus a cross-file integration pass

    A single review of a twenty-file change asks one context to hold every file at once, and attention spread that wide gets thin. Anthropic's context engineering guidance describes a finite attention budget, where "Every new token introduced depletes this budget by some amount", and recall gets less precise as context grows. The pattern for complex tasks is sectioning: "LLMs generally perform better when each consideration is handled by a separate LLM call, allowing focused attention on each specific aspect."

    In a multi-file review, sectioning means two kinds of pass. Per-file passes each read one file and look for local problems such as a missing null check, an off-by-one error or an unhandled exception. Because each pass sees only its own file, it gives that file full attention. One thing it cannot see is a value that leaves one file and is misused in another. A separate integration pass covers that case. It reads the files that share data together and traces the flow across the boundary between them.

    Contradictory findings are how a missing integration pass shows up. Two per-file passes can each be right about their own file and still be wrong together, because each one only saw half of the bug. The other fixes for a conflict each break something. Re-running the local passes gives them the same limited view. Asking the generator to decide hands the review back to the author and its bias. Merging the files into one review undoes the split and brings back the diluted attention. Claude Code's Code Review product follows the same shape, although it splits the work by issue class rather than by file: "multiple agents analyze the diff and surrounding code in parallel", and then "Findings are deduplicated, ranked by severity, and posted as inline comments".

    When a change touches hundreds of files, don't run the per-file passes as turn-by-turn requests in one conversation. That conversation would fill with every file and run into the dilution problem again. Script the fan-out instead, with one non-interactive claude -p call per file, each in its own fresh context. Claude Code documents this loop for a large migration. A per-file review uses the same structure with a review prompt in place of the migration prompt.

    Fan-out over a file list with one headless invocation per file, documented for migrations; a per-file review loop has the same shapebash
    for file in $(cat files.txt); do
      claude -p "Migrate $file from Python 2 to Python 3. Return OK or FAIL." \
        --allowedTools "Edit,Bash(git commit *)" \
        --permission-mode dontAsk
    done

    Checkpoint 5 of 7· Check yourself

    A refactor touches 300 files, and several modules pass data to one another. You need a review that catches local bugs and also bugs where a value is misused after it crosses a file boundary. Which plan fits?

    Checkpoint 6 of 7· Exam question

    Per-file passes on two interdependent files each recommend a different fix for what turns out to be the same underlying data-flow issue, and the two recommendations conflict. What architectural step should resolve this rather than picking one per-file recommendation at random?

    Sources456

    4.Finding passes report confidence, verification passes filter

    A multi-pass review should keep finding issues and filtering them as separate jobs. If a finding pass is told "only report high-severity issues" or "be conservative", it can investigate as thoroughly as before and then quietly drop anything below that bar. Claude Opus 4.8 follows such instructions faithfully. The result is that "Precision typically rises, but measured recall can fall", even though its underlying ability to find bugs has improved.

    Recommended finding-stage prompt: report everything, attach confidence and severity, and leave filtering to a later steptext
    Report every issue you find, including ones you are uncertain about or consider low-severity. Do not filter for importance or confidence at this stage - a separate verification step will do that. Your goal here is coverage: it is better to surface a finding that later gets filtered out than to silently drop a real bug. For each finding, include your confidence level and an estimated severity so a downstream filter can rank them.

    The confidence attached to each finding is what makes the next stage possible. A verification pass takes the full list and checks each finding against the code, discarding the ones that do not hold up. Code Review works this way: "a verification step checks results against actual code behavior to filter out false positives", and the surviving findings are deduplicated and ranked. The per-finding confidence also drives routing. How to calibrate those scores and set thresholds for routing findings to people is covered in calibrated confidence scores for review routing. For this design, the point is that the finding pass has to emit confidence for every finding, and "moving confidence filtering out of the finding step often helps."

    Checkpoint 7 of 7· Fill the gap

    In a multi-pass review, the finding stage runs this prompt and a separate verification step filters its output afterwards. Which word sets the finding pass's goal?

    Report every issue you find, including ones you are uncertain about or consider low-severity. Do not filter for importance or confidence at this stage - a separate verification step will do that. Your goal here is  ? : it is better to surface a finding that later gets filtered out than to silently drop a real bug. For each finding, include your confidence level and an estimated severity so a downstream filter can rank them.

    Sources76

    Sources

    (7)

    Every claim above is drawn from one of these pages, quoted as it was written on the date shown.

    1. 1.
      “has a fresh model try to refute the result”
      ↩︎ Why the generating session is a weak reviewer
      “Context is polluted with failed approaches.”
      ↩︎ Why the generating session is a weak reviewer
      “Look for edge cases, race conditions, and consistency with our existing middleware patterns.”
      ↩︎ Setting up an independent review instance
      “has a fresh model try to refute the result, so the agent doing the work isn’t the one grading it”
      ↩︎ Checkpoint
    2. 2.
      “After each writer turn the platform spins up a fresh grader with the same model and tools as the writer”
      ↩︎ Why the generating session is a weak reviewer
      “The default failure mode is a grader that approves everything.”
      ↩︎ Setting up an independent review instance
      “The grader can't see the writer's reasoning and has no idea what shortcuts were taken.”
      ↩︎ Key concept
      “The grader can't see the writer's reasoning and has no idea what shortcuts were taken.”
      ↩︎ Exam trap 1
      “The grader can't see the writer's reasoning and has no idea what shortcuts were taken.”
      ↩︎ Prediction
    3. 3.
      “can anchor the reviewer on old conclusions”
      ↩︎ Setting up an independent review instance
      “A CI reviewer that gates pull requests needs this: no old opinions and no carried context steering the current verdict.”
      ↩︎ Exam trap 2
    4. 4.
      “Every new token introduced depletes this budget by some amount”
      ↩︎ Per-file passes plus a cross-file integration pass
      “as the number of tokens in the context window increases, the model’s ability to accurately recall information from that context decreases”
      ↩︎ Checkpoint
    5. 5.
      “LLMs generally perform better when each consideration is handled by a separate LLM call, allowing focused attention on each specific aspect.”
      ↩︎ Per-file passes plus a cross-file integration pass
      “LLMs generally perform better when each consideration is handled by a separate LLM call, allowing focused attention on each specific aspect.”
      ↩︎ Exam trap 3
    6. 6.
      “multiple agents analyze the diff and surrounding code in parallel”
      ↩︎ Per-file passes plus a cross-file integration pass
      “Findings are deduplicated, ranked by severity, and posted as inline comments”
      ↩︎ Per-file passes plus a cross-file integration pass
      “a verification step checks results against actual code behavior to filter out false positives”
      ↩︎ Finding passes report confidence, verification passes filter
    7. 7.
      “Precision typically rises, but measured recall can fall”
      ↩︎ Finding passes report confidence, verification passes filter
      “moving confidence filtering out of the finding step often helps”
      ↩︎ Finding passes report confidence, verification passes filter
      “Do not filter for importance or confidence at this stage - a separate verification step will do that.”
      ↩︎ Exam trap 4

    Ready to test yourself?

    Practise the 13 questions on this subdomain.

    Spotted a mistake, or was something unclear? Tell us.