CCAR-F scenarios › Claude Code for Continuous Integration · Question 45 of 60

Scenario 5 · Claude Code for Continuous Integration

Claude Code runs inside your CI/CD pipeline. It reviews pull requests automatically, proposes test cases, and posts feedback on the PR. The central challenge is writing prompts and configuration that produce actionable findings while keeping false positives low enough that developers keep trusting the output.

Claude Code Configuration & Workflows

Your pipeline has Claude Code generate a fix for a failing build and then, in the same session, asks it to review that fix before the PR opens. The review stage approves nearly 98% of fixes, including several that were later reverted for introducing regressions. What change most improves the review stage?

Show answer and explanation

Answer: D — Run the review as a separate Claude Code invocation that sees the diff and failing test but none of the reasoning used to generate the fix.

A session that generated code keeps its reasoning context and is less likely to question its own decisions. An independent instance without that context reviews more effectively. (a) and (b) are the self-review instructions and extended thinking that section 6 says an independent instance outperforms. (c) depends on self-reported confidence from the same biased context, and that confidence is already demonstrably too high.