Reviewing AI-generated code line by line doesn’t scale, and a growing number of developers say the answer is to split control between tools and people. One experienced Java developer argues that reading every line was never the goal. Reading was only the way teams got guarantees about their code.
Why reading every line breaks down
An agent writes code much faster than anyone can read it. The argument leans on research on peer review which found that defect detection drops sharply beyond a few hundred lines per hour. That study predates AI coding tools, but human attention hasn’t changed since. If an agent produces a thousand lines while you get coffee, you’ll read them badly or skip them.
Developers have stopped reading before
Two earlier shifts make the case. When the JVM arrived, C and C++ developers found it reckless to run serious systems without knowing when memory is released. Garbage collection proved them wrong at scale, and the ecosystem added GC logs, heap dumps and profilers. Control over memory moved from source code to observation of the running system.
The second case is open source dependencies. A Spring Boot application pulls in hundreds of JARs and a Node.js application thousands of packages, and nobody reads them all. Control moved to lock files, software bills of materials, vulnerability scanners and policies for choosing dependencies.
Where that machinery is missing, things break. In 2016, eleven lines of JavaScript removed from npm (the left-pad package) broke thousands of builds. The lesson is to set up the machinery before you stop reading.
There’s one difference. Garbage collectors and Maven are deterministic to a large extent, while a large language model isn’t. That makes the surrounding machinery matter more. The agent works like a fast, tireless junior you can’t trust blindly.
What tools own and what humans own
The proposal is that control is partitioned, not lost. Tools take the mechanical checks: formatting and style, nullness, common bug patterns, whether tests are sensitive to changes, and whether tested behavior still works. People do those checks badly and machines do them perfectly in seconds.
Humans keep three areas:
- Intent: what the software should do, including the specification and the tests that encode it. If the agent writes both the code and its tests, nobody has checked intent.
- Boundaries: public APIs, the security perimeter and the data model, where a mistake spreads to others.
- The irreversible: database migrations, deletions and anything with a large blast radius.
Where automated checks stay blind
Five gaps remain. Tools don’t catch wrong requirements, which only a conversation with a person exposes. They miss concurrency bugs except by luck, and performance regressions unless the pipeline has performance tests. Architecture drift slips through unless the architecture is encoded in tests, for example with ArchUnit. Injection flaws need a dedicated scanner.
Each blind spot needs a person looking in the right place, and knowing where to look is the skill that matters.
A sample guardrail setup
The guardrails are ordered by timing, since a problem caught earlier is cheaper to fix. The first is instructions. Before writing anything, the agent reads coding conventions, forbidden patterns and project layout, packaged as reusable skills. It’s the only guardrail that fires before generation.
Next come statically and strongly typed languages, plus a linter and static analysis where possible. Testing follows: unit and integration tests for behavior, property-based tests where the developer states a property and the runtime verifies it, and mutation testing to confirm the tests react to changes.
The last layer is post-verification, which most developers overlook, in this view. The setup uses a custom /challenger subagent for plans and the standard /code-review command for code.
What teams can take from this
The advice for teams is to decide what a person must read, automate everything else and know what the automation can’t see. Developers who insist on reviewing every line are right that control matters, but wrong about where to spend it. Teams that adopt AI-generated code review at scale will need the tooling in place before they ease off reading.
Source: A Java geek