AI Coding Agents and 'Cognitive Surrender': How to Avoid Approving Code You Never Read

    AI coding agents make it easy to merge large pull requests without ever truly reading them — a habit known as cognitive surrender. This article explains why approving code you don't understand is more dangerous than a code bug, and lays out three practical defenses: writing down your expectations before generation, reviewing AI-generated diffs as critically as a colleague's PR, and keeping pull requests small enough to actually read end to end.

    As AI coding assistants become the default in everyday development, a quiet and widespread bad habit is spreading among engineers. It has nothing to do with code quality — it happens in the exact moment when you don’t make a decision.

    What a 600-Line PR Reveals

    Picture an ordinary situation: you ask an AI coding agent to implement a feature, and a moment later it hands you a pull request of roughly 600 lines. The variable names look reasonable, every test passes, you skim through it quickly, nothing looks wrong, and you click “Approve.”

    The problem is that somewhere in those 600 lines there may be an execution order silently swapped inside a transaction boundary, or a default value quietly inverted for one edge case. The tests are green precisely because they never covered the path that was changed.

    One engineer described this bluntly: you didn’t review that code, you approved it.

    The two are fundamentally different. Reviewing means understanding why every change exists, whether it is correct, and what side effects it carries. Approving means stamping your signature on code you never genuinely understood. The first is judgment; the second is liability deflection. When developers habitually click approve without understanding, their judgment erodes one “the tests passed, so it must be fine” at a time. That is what we call cognitive surrender.

    Why Cognitive Surrender Is More Dangerous Than a Code Bug

    Code written incorrectly can be fixed, and missing tests can be added. The danger of cognitive surrender is that it erodes engineering capability itself.

    AI coding assistants output code that looks right: consistent style, clean naming, complete comments. That polished surface nudges the brain toward a shortcut — we instinctively mistake “reads smoothly” for “understood.” Genuine understanding requires active cognitive effort: tracing data flow, reasoning through edge conditions, questioning implicit assumptions. When you hand that effort to the model and skip verification, you are not using AI to work more efficiently. You are using AI to replace thinking.

    Sustained over time, this leads to three losses:

    • Dulled technical judgment. You gradually lose the instinct for spotting “something is off in this code” — which is precisely the most valuable asset of a senior engineer.
    • Blurred responsibility boundaries. The code is merged under your name; if an incident hits production, the person who signed off is you, not the model.
    • Accumulating invisible debt. Changes merged without being understood keep coming back to bite you during future debugging, refactoring, and evolution.

    Three Defenses You Can Actually Apply

    The good news is that cognitive surrender is not unsolvable. The original author offered three simple but highly effective practices, expanded below with practical detail.

    1. Write down your expectations before you start

    Before letting the AI write any code, jot down in a few sentences what you expect from the result — three lines or fifty, the length doesn’t matter. The core idea is to put judgment before generation, not after it.

    For example:

    1. Expectations:
    2. - The change should live in the order module (order) and should not touch the user module
    3. - Inventory deduction should be handled asynchronously via a message queue, not by calling downstream synchronously
    4. - Failures must be handled idempotently, and retries must be allowed

    With expectations written down, the diff becomes something you read against a reference: what matches your expectations, what deviates, and what the model added on its own initiative. Without expectations, you can only passively take whatever the model gives you; with them, you can actively question why it did it that way.

    2. Read the diff the way you read a colleague’s PR

    This is a critical mindset shift. Facing model output, people easily slide into an unbalanced “reviewer versus generator” relationship. Facing a colleague’s pull request, you instinctively ask: why did the author write it this way? Is there a simpler approach? Is the error handling here sufficient?

    Apply the same standard of scrutiny to AI-generated code:

    • Read block by block rather than scanning the whole thing. Stop and reason through any logic you are unsure about.
    • Pay more attention to what changed than to how much changed. Beyond the code that was added, the existing logic that was deleted or modified is often more important.
    • Actively look for what the tests do not cover — especially transactions, concurrency, and edge conditions.

    3. Keep pull requests small enough that you can actually read them

    This is the most direct and most easily overlooked measure. With a 600-line pull request, even if you fully intend to review it, your brain will abandon deep thinking under fatigue. A widely circulated review convention in the industry is to keep a single review to around a hundred lines, and that figure is not arbitrary: it is roughly the amount of code a person can genuinely absorb while staying focused.

    In the AI coding scenario, the case for this convention is actually stronger. The code being generated is more plentiful and faster, so unless you actively control the size of each submission, pull requests will only grow larger. That means you should:

    • Give the agent one small, clearly defined task at a time, instead of letting it “refactor the surrounding code while it’s in there.”
    • Break a large feature into several logically independent commits, each of which is readable on its own.
    • Explicitly reject huge diffs that “look reasonable but that you can’t finish reading,” and require them to be split.

    The Underlying Logic: The Unit of Review Is the Unit of Understanding

    Read together, these three measures point to a single principle: the unit of review is the unit of understanding.

    This principle has not weakened in the AI era — it has been amplified. When the cost of writing code drops sharply and output volume surges, the bottleneck shifts from “can it be written” to “can it be read, and can you be accountable for it.” AI saves you the time spent typing, but it cannot save you the time required to understand code — because understanding is the prerequisite for judgment, and judgment is how responsibility is expressed.

    Put differently, AI coding assistants will not make you stronger or weaker on their own. What determines the outcome is whether, when facing their output, you choose to “understand and judge” or to “skim and approve.” The first means mastering the tool; the second means being dulled by it. Guarding your right to think is the core capability this generation of developers must deliberately practice.