CLAUDE CODE AGENTS: FUNDAMENTALS - Chapter 6, Exercise 1 Why a Review Agent Is Denied Edit Access Even Though It Could Fix Things ==================================================================================== QUESTION: Explain why a code-review agent is deliberately denied Edit access, even though it would be technically capable of fixing many of the issues it finds. SOLUTION / EXPLANATION: This isn't about capability - a capable model could plausibly fix many of the issues it notices while reviewing code. The restriction exists for a different reason: keeping the act of finding a problem separate from the act of fixing it, so the review itself stays honest and complete. If a review agent had Edit access, it could quietly fix something it noticed along the way, rather than reporting it as a finding - meaning the person relying on the review would never actually see that the issue existed in the first place, or get a chance to understand it, disagree with the fix, or decide it wasn't actually a real problem. The review's whole value is a complete, honest account of what's wrong; silently patching issues instead of reporting them undermines that account, even if the patches themselves happen to be correct. There's also a structural benefit tied to Chapter 1's own isolation principle: an agent with no Edit access is guaranteed, by construction, to never accidentally alter the code under review while examining it - no risk of a review agent introducing a new bug while poking around, or changing something the developer didn't ask it to touch. The restriction isn't distrust of the agent's competence; it's a deliberate structural guarantee that a review stays a review, and any actual fix happens as its own separate, visible, reviewable step - typically handed to a coding agent (Chapter 5) afterward. -------------------------------------------------------------------------- WHY THIS WORKS AS AN ANSWER: It explains that the restriction isn't about the agent's competence to fix issues, but about preserving the review's own completeness and honesty as a separate, visible step, and ties this back to Chapter 1's isolation principle as a structural guarantee rather than a matter of trust.