{"slug": "don-t-review-agent-code-interrogate-it", "title": "Don't Review Agent Code. Interrogate It.", "summary": "A developer who has spent about a year working with coding agents reports that cross-reviewing agent-generated pull requests produces a \"very efficient LGTM machine\" — after 30 merged PRs passed mutual review by Claude and Codex, the delivered feature was riddled with unrequested validation and verification steps. The developer's alternative is to stop reading diffs and instead run a fresh agent as a witness, prompting it to report only factual changes — schema, jobs, endpoints, config flags, dependencies — before any judgment, then interrogating anything unexplained, since agents default to assuming over-engineered abstractions had a reason to exist.", "body_md": "I don't really review agent-generated code anymore, and I doubt most of you do either. We can keep this between us.\n\nAn agent can write 100K lines or open 30 PRs in a day. Nobody has time to read that. The obvious bugs are mostly gone by the time I see the PR anyway, because the agent already checked its own work a few times while building it. It's very proud of that.\n\nSo the usual move is to start a fresh agent, tell it \"review this PR\", skim what it says, and merge.\n\nI did that for a while. For one whole feature I even had Claude and Codex cross-review each other's PRs, which felt very responsible at the time. After 30 merged PRs, the agent handed the feature back to me for manual testing, and the whole thing was completely over-engineered. It was full of verification steps and strict validation I never asked for, and every one of those PRs had passed a cross-review.\n\nTwo agents politely approving each other's work for 30 PRs. I had built a very efficient LGTM machine.\n\nThe reviewer starts with nothing. It doesn't know why the PR exists or what the feature was supposed to cover, so it can't tell when the code wanders past the scope. It has no idea what you're building next month either, so it can't judge whether an abstraction will ever pay off.\n\nWhat bugs me most is how it handles over-engineering. Hand it a PR with a generic retry framework or a brand new caching layer and it assumes somebody had a good reason. It might suggest a rename or one more test. It almost never asks whether the thing should exist.\n\nYou end up with a review that looks thorough, full of small comments, and the extra code goes through untouched.\n\nI've been doing this for about a year, and it's how I catch most of the over-engineered code now. I still don't read most of the diff. I treat the reviewer like a witness: it reads the code, and I ask the questions.\n\nFresh agent, and a prompt like this:\n\n```\nRead this PR and give me a report on exactly what it changes. List:\n\n- Database schema changes (new tables, columns, indexes, migrations)\n- Scheduled job / cron / background worker changes\n- A summary of every feature added or modified\n- New external services, APIs, or third-party libraries\n- New environment variables or config flags\n- New public endpoints or interfaces\n- Anything deleted or deprecated\n\nDon't judge the code yet. Just tell me what it does.\n```\n\nThe last line is there on purpose. I want the facts before any opinions. Left alone, it will happily jump straight to \"Overall this is a clean, well-structured PR.\"\n\nThe report is usually long and looks detailed. Read it slowly and you'll hit sentences like these (made up, but you'll recognize the type):\n\n\"Adds a `sync_state` table to support improved synchronization reliability.\"\n\n\"Introduces a background job for periodic maintenance.\"\n\n\"Adds `FEATURE_X_MODE` to allow flexible configuration.\"\n\nWhen the agent can't say plainly why something exists, there's a decent chance nobody asked for it.\n\nOne time I asked the implementer agent to \"send a notice to the admin if a third-party service is down and returning error codes.\" It added two new tables to track Slack notification and email status. I never asked for either. I wanted a message. I got a data model.\n\nAgents love tables the way some people love storage bins. There is always room for one more.\n\nNow push on anything that doesn't make sense to you. Pull up a chair, point the desk lamp at it, and start asking:\n\n`FEATURE_X_MODE`. Name one person who will ever set it to anything other than the default. I'll wait.\"\nBe ready for \"You're absolutely right!\" on the first question. Keep going anyway. Agreeing with you is easy for it. Explaining why the table exists is the part that takes work.\n\nThen slide the evidence across the table, the stuff it couldn't have known:\n\n\"We will only ever have one region. So tell me again why we need this abstraction.\"\n\n\"We're going to plug in more external tools like this in the next phase. Does the current design make that easy?\"\n\nThat's the point where the reviewer starts being useful. Once it knows the scope and the plan, it points at real problems, and the comments about variable names mostly go away.\n\nThe agent can read 3,000 lines in a few seconds, but it has no idea what's supposed to be there. I can't read 3,000 lines for every PR, but I know what the feature is for and where the product is headed. The questions are where those two meet.\n\n*Me, a few questions in, finally understanding why there's a cron job.*\n\nBy the end I have a pretty clear picture of what's going into the codebase, and I still haven't read most of the diff.\n\nAsk the agent what the PR changes, not whether it's good. Look for the vague answers. Push on every table, job, env var, and dependency you can't explain, and tell the agent what it doesn't know. Whatever nobody can justify gets cut. The agent will say you're absolutely right about that too.", "url": "https://wpnews.pro/news/don-t-review-agent-code-interrogate-it", "canonical_source": "https://dev.to/lightman_miao_fcd6ce02a1c/dont-review-agent-code-interrogate-it-25pd", "published_at": "2026-10-25 04:08:11+00:00", "updated_at": "2026-10-25 04:11:09.169191+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "developer-tools", "artificial-intelligence"], "entities": ["Claude", "Codex"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/don-t-review-agent-code-interrogate-it", "markdown": "https://wpnews.pro/news/don-t-review-agent-code-interrogate-it.md", "text": "https://wpnews.pro/news/don-t-review-agent-code-interrogate-it.txt", "jsonld": "https://wpnews.pro/news/don-t-review-agent-code-interrogate-it.jsonld"}}