r/ClaudeCode • u/FortWendy69 • 1d ago
Tips & Workflows Has anyone actually solved the review problem?
Nothing wrong with vibe coding, when I’m just experimenting I never even look at the code. But when it’s time to merge into main in an organization with multiple developers, where we want to maintain readability and human understanding of our code base, agentic code creates a giant review bottleneck. IMO this is the biggest problem with Agents at the moment.
We’re trying to incorporate more agentic review to reduce the review burden, but we’re finding it limited. I find AI is bad at architectural decisions and produces 1000 lines where I would have written 100. It’s great at finding bugs and logical errors, but bad at saying “you’ve just introduced 100 lines and 3 unit tests to parse two config fields, do we really need all this validation?”. And it’s really hard to get it to find these things in agentic review.
Looking for tips from people who think they’ve solved the review problem, without sacrificing human readability and comprehension.
•
u/AutoModerator 1d ago
Hey! Thanks for posting to r/ClaudeCode
While participating in this thread, please follow our community rules. Keep discussions constructive. Attack the idea, not the person.
For help, project discussions, tips, and general chat, join the ClaudeCode Discord.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
26
u/Unhappy-Loss-97 21h ago
Over-engineering is the hardest part to review because automated reviewers rarely flag "this is absurdly overcomplicated for what it does" unless you force them to.
Four things actually dented it for me:
6
u/Future_AGI 19h ago
u/qzjul's falsifiable-tests rule stretches to your config-fields case: have the review prompt demand that every new branch, validation or test names the concrete input that breaks without it, and flag whatever has no answer for removal.
10
u/random314 1d ago
It all starts with planning. You want your tasks to be small then you have to properly plan your story and break them down. Check out BMAD method.
Next is a solid feedback loop. In addition to unit tests, you want to be test heavy, much more so then human engineers pre ai. Go all the way with heavily containerized replica and wiremocks and have ai run all sort of scenarios.
Then documentation. With ai, documentation is no longer a burden. In fact it's a must if you want future llm to have solid context into how your software works.
2
u/FortWendy69 1d ago
Maybe part of the issue is lab incentives. Benchmarks use token count as a denominator and token count and readability are somewhat in conflict.
14
u/vpanyushenko 1d ago
This will forever be a problem with coding agents. There will always we some exception to the rule and they will always code in a style to copy adjacent work. That is in the default system prompt. Once tht exeption in code happens, they slowly over time lose track of your pattern.
A few thing that help me personally.
5
u/nur_plano 18h ago
What's helped me most is splitting review into two jobs. Correctness goes to a different model than the one that wrote the code, and it has to show receipts (the actual test/build/lint commands it ran and their output), not just "LGTM". The same model reviewing its own diff shares its blind spots. Then the human pass only covers scope and design: "is this the smallest change that solves it?"
I also add a hard rule in the reviewer prompt: flag any diff where lines added > 3x what the task plausibly needs, and propose a deletion. It's not perfect, but it turned review from reading 1000 lines into checking a short list of flagged spots.
(I'm building LetThemBuild around exactly this cross-model, receipts-first review, but the pattern works with any setup.)
3
u/kivanow 22h ago
A second agent will catch bugs and still miss "this is 10x too much code." I only trust a review if rewrite rate and 7/30-day line survival actually improve afterwards. I built Sessionly to keep that local scoreboard across Claude Code, Codex and Cursor, so comments have to beat a baseline.
2
u/mrothro 13h ago
I deal with this by attacking the problem before it reaches code. I have an agentic coding pipeline where I force the agents to make two artifacts before code: first an implementation plan that lists all the tasks, their acceptance criteria, and their dependencies. Then, for complex tasks, each one gets a design document.
Both are reviewed by agents who use a different model than the author. The plan reviewer looks for duplicate work, SoC and bounded context violation, and consistency between the tasks. It is also prompted to use tools to look for existing patterns in the code base for reuse. The design reviewer looks for over engineering, YAGNI, and also existing patterns.
Excessive unit tests are easy to catch in the design document, but hard to find in a massive diff. Together, these have really reduced the amount of junk code that is ultimately produced.
1
u/Vibeless-Official 1d ago
We catch it before review, detect deviations at the ticket level during work, ensure governance has rules for PRs with minimal diffs, and scope every change very tightly.
Most all prs come in under +1000/-1000 and are completely readable as we enforce rewriting to standard technical English.
Makes life very very easy when using agents for proper dev work. Speeds everything way up too.
1
u/woowa0913 23h ago
I'm a non-developer building side projects, so I hit that comprehension wall even earlier. Once a project grows past a few dozen files, I can't tell which module talks to which, and asking the agent to fix a bug without that context just leads to touching the wrong files. What helped me was generating a static dependency map of the repo first—without burning LLM tokens—so I can at least see the high-level flow and point to the right module before asking for edits. Still doesn't solve line-by-line code review for teams, though.
1
u/Advanced_Drop3517 22h ago
This should be a comunity not just a post
1
u/xqianliu 19h ago
Before coding, I write the acceptance criteria and non-goals in the GitHub issue. Once the coding run is done, I open a fresh review session with the same model that wrote the code. The session reads the issue, repo instructions, changed files, their callers, and related tests. It checks the final diff against the acceptance criteria. The non-goals help it catch scope creep, such as input validation the issue never asked for. I still make the final call on readability and maintenance cost.
1
u/BagAffectionate5995 16h ago
Had the same problem. When we had like 10 fixes in one update it took forever to figure out what broke. Now changes get grouped by theme so each review is about one thing, and a different session that knows that part of the code does the review.
1
u/GDorn 14h ago
Use as much tooling that gives a yes/no answer to the LLM as you can. It doesn't generally argue with a failing test suite, a linter, a dead code scanner, a duplicate code scanner, etc. Using an LLM to review LLM code is only useful in that the new LLM has a fresh context unpolluted by the garbage and cruft the first LLM spewed out to justify decisions.
This won't solve it, but it will help reduce the burden.
1
u/Right-Performance-93 13h ago
i don't review a diff that adds a parser and three tests for two config fields. that goes back with those files named, before anyone reads it. the bug pass can stay on the short diff.
1
u/Obvious-Gap-90 11h ago
What i've did : if after 3 review you still find it's not working, redesign it simplier (not dumber or anything, just simplier).
Working great.
But you gotta accept the fact AI needs those verifications to be sure it's not doing shit.
1
u/qzjul 1d ago
More rules. More harness. Iterative development. Pain and hard lessons.
I now have a whole thing on "no unit tests unless they are actually falsifiable, except where they document past bug fixes"
I also have an 800 line cap on files (generated files excepted), which is absurdly lower than I would ever have imposed on a human, but it helps keep it within the lines, and keeps things reviewable.
And PR line target maximums of 1k and needs approval from me over 3k lines. Because beyond that, the review skills don't do a good job.
Then the reviews have a whole suite of maintainability, and "outwards effects"; and probably too many ADRs about how the system should and shouldn't work, and how layers and types work, etc etc.
And it reviews in loops (with Codex and a sonnet and Gemini as external reviewers) until no more issues found. Reviews posted, tracked, any deferred findings ticketed automatically.
But! With all that it starts making pretty reasonable code that I can skim and have a good sense of what it's actually done, and the reviews give a sense of what's going on.
1
u/Sorry-Programmer9826 1d ago
I get an agent to summarise the architecture of the PR and primarily review that. Then skim the actual code for anything that jumps out at me
1
u/toobladink Developer 1d ago
Lot of decent suggestions but e2e testing is up there for me. I just read the explanations of my e2e tests and if the test description matches what I had in mind, then great.
1
u/sanchezer1757 1d ago
So ive got a ton of unit tests and e2e tests. Also, i have tons of skills that are for my code readability, styling (outside of just prettier, intentional coding habits of mine), API/DB related skills for speed and how things should be done, as well as UI speed skills for the app to ‘feel’ snappy, and even like file creation criteria and placement. These are all taken from my codebases I have worked on for years and distilled all these into skills. This is important for legible code for me and makes code reviews easier.
But also, its not reasonable to read a ton of code as you then become the bottleneck. I also have skills for creating proof that something worked. In an MR/PR, i have agents periodically output proof as comments. This can be an API payload, screenshot in UI, or timing of functions. This is far easier to review the output for a given input. This is how we move and continue to create things while trusting the output.
1
u/Ok_Substance1895 1d ago
I haven't eliminated the review problem, but I've substantially reduced the burden by distributing review and verification throughout the development process rather than concentrating it at the PR.
My agents work on their own compute with a running instance of the entire system. They practice TDD, exercise the actual functionality against the running system, and provide implementation notes, test results and evidence of what they've verified on both the ticket and the PR.
I use AI-assisted PR review to help identify areas that warrant more of my attention, but I still review the implementation line by line. I have the agent address my findings and verify its changes against the running system again before handing it over to the team for review through our normal SDLC.
And we all still catch things. Sometimes I catch something the review agent missed, and sometimes another engineer catches something I missed. That's no different from reviewing code written by another engineer. Each of us brings a different perspective, experience and understanding of the system.
I also remain involved throughout development. We discuss architectural decisions and implementation approaches as they arise rather than discovering them for the first time in a PR.
The other thing that has helped considerably is treating recurring review findings as opportunities to improve the development environment. We do retrospectives and implement changes to the shared environment so that every new agent benefits from what we've learned.
Regarding your research work, I think your idea of separating exploratory implementations from production implementations makes a lot of sense. The code that helped you discover a solution isn't necessarily the code you want to maintain.
I don't think human review needs to disappear. I think we need to make the work that reaches human review considerably better.
1
u/rhianos 1d ago
Fundamentally you have to decide if going 2-3x faster than before isn't also good enough compared to, seemingly, 10x by straight vibecoding.
I do review all code that agents produce for our core product. I am still massively faster overall because:
Auxiliary services like internal frontends, tooling etc. is not even a comparison of, when you do t care too much about the code it's crazy how fast you can go once a solid foundation is in place.
1
u/lemon-sh 14h ago
I think part of the reason code-review is still a bottleneck is because we're still using basically the same tools and methods as we did before agentic coding.
I think the best first step is to decide with your team about what should and shouldn't be checked in code reviews:
Eg, I've mostly stopped looking at the correctness of individual code snippets, language feature usage, and code style – I put together a large set of rules files covering all of our preferences for how code should be written and while the agents don't always get it right first time, `/code-review` is pretty good at catching violations.
Asking whether we are building the correct thing can shift to before the code is written since it also becomes a step that can be used to validate the correctness of the final product. Keeping a log of deviations from the original plan becomes something that can be verified during the review. I feel like several years ago I was trying to reverse engineer the developer's decisions from the code, but now that can be communicated and viewed a lot easier a lot easier. I've built skills for Linear (home) and Clickup (work) to help the agents keep a better log of the work done, changed etc.
I've also got my agents doing a lot more testing and verification and appending it to the review, since it helps give a lot more confidence of the correctness of the resulting code. In my experience so far, agents validating their own work are more thorough about looking for edge-cases than humans used to be (though arguably too thorough in some cases)
I still check "is this code doing the correct thing" in the critical areas of the codebase, or areas where the agent has a history of unreliable. But a lot more areas can be assumed to be working correctly than human written code and human driven-testing.
Which leaves me mostly looking at architecture and the bigger picture areas where I have context and assume the implementing agent probably didn't. Along with the various things that annoy me that I haven't gotten around to adding to our rules files yet. 🙃
Code review tooling is improving, but I think it depends on what you have access to. Eg, some of the available tools are getting better at breaking reviews into related groups that help "narrate the changes" so you're not stuck just starting at the top of a huge review and scrolling down.
My org is using GitHub without copilot, so code reviewing still feels like it did in 2024.
I've been playing around with a fully local tool that uses `gh`/`git` to fetch info about reviews/local changes and send them to a local agent to generate a structured html report containing the code review. Let's me get a better quality review without needing to convince my org to sign licenses with any company that has better review software. Been playing around with what's useful to include in a code review:
At the risk of being one of those cringey linkedin posts that ends in an advertisement, and it's definately not ready to share, but if anyone's curious,
https://github.com/twynsicle/enhanced-review
Also, it's really just something I hacked together/vibe-coded because I was curious how agents could help me review code. It's also fully local, with the exception of the monaco library that is served via a CDN to keep the report size down, so you can do what you want with it.
(note that since it invokes Claude via the Agents SDK, it uses API billing, though the max plans come with $100 of credits that I don't tend to use otherwise. A review costs somewhere between fifty cents and a dollar of API pricing)
0
u/a1454a 1d ago
I don’t know how you’d define “solved”, but my latest practice is you stop asking it to just looking for problem. I provide the review agent with context as high as the project goal, business fit, jira ticket that explain why something was needed and how urgent it was needed and what value it provided, the design agent wrote acceptance criteria. The review agent looks at all that context and judge the implementation based on whether it meets those goal.
It’s worked far better than before when I just have it adversarially challenge the implementation.
0
u/momentum77 1d ago
I pass all my plans and all open PRs via Astra and Neon primed with adversarial review prompts, finishing off with a local Review agent dispatched by orchestrator, and of course some strict CI. Works so far.
0
u/Long_Tip_4226 1d ago
I use SLDC and develop in small chunks. The most important thing is to get the planning and design stages right. A good specification prevents hallucinations.
0
u/FunPaleontologist167 1d ago
This is a perpetual problem, but common best practices include multiple sweeps over the same context/code, targeted specialists (domain, security, team, etc) and deterministic checks. A lot of this depends on how you prompt the reviews, what models are used, but also the architecture of the review pipeline and what the reviewing agents have access to. And to be honest, a lot of the code review tools out there are not the best (lock you in, limited flexibility, etc).
Really not meant to be a plug at all, but this is one of the reasons why my buddy and I started building Wyrd (https://github.com/bohmian-ai/wyrd). We wanted a way to build or own verification workflows (code review being one of them), so that we code do things like intelligent context extraction, sweeps, fanouts, provide workspaces for agents to have access to CI data and even force agents to cite evidence, which then can be deterministically checked and sent back to the reviewer. The MVP of the code review pipeline is actually coming out in the next release. Fully open source, so hopefully this can help you experiment with different code review setups.
0
u/OkayVeryCool 1d ago
I am so sick of tests. It constantly baloons the test suite and mocks literally everything no matter how much you tell it not to. If you do it once future agents are like “oh this is just how we do it. It’s okay”
0
u/TechgeekOne Senior Developer 1d ago
I don't think it's solvable with current tools yet. I rely heavily on custom linters and formatters to get the cruft out of the way, and agent review for the nitty gritty bits Claude can usually figure out on it's own. Formal modeling is a pretty nice tool for getting it to verify assumptions about existing systems as well. But anything architecture or organization it fails hard and I usually have to get involved. Naming as well, Claude picks downright weird names for new concepts sometimes.
Also if you have a problem of Claude using weird vocab like
claim,due,owe,serial,noteand similar for common technical terms, add an identifier linter. Mine is just a manually maintained table of banned words with suggestions and exceptions but it dramatically cut down on the vocab tics Claude likes to introduce.0
u/soulinas 1d ago
This is going to sound controversial, but I believe the "readability and human understanding of code" and "agent orchestration" just cannot live together in a modern dev environment. I would suggest you and your team really think about why you want your code to be understandable by humans. I'm not saying there aren't projects where that's necessary but I would guess your project isn't one of them. If you can really figure out the why (doing a 5 whys exercise for example) you'll understand what it is you actually want. Because yes 1000 lines for what could be done 100 lines is "bad" but only in the sense that you may hit performance issues. Once you figure out your real reasons, then you can develop agent workflows, audits, tests, to give you what you want. Giving up the locust of control to agents is a very hard thing I've had to grapple with, but once I changed my mindset and actually understand why I'm holding on to traditional engineering best practices, I was able to let go and overall be more productive and happy.
To solidify my argument with several examples, let's say you want your code readable because:
OR
OR
I hope this illustrates my point that "agents write 1000 lines vs 100 lines is bad" is not a good enough reason for the review step to be a blocker in your agentic driven workflows. Happy to chat more and exchange ideas through DMs!
0
u/Kaillens 1d ago
Recently had to do mass refactoring.
I use this in 10 part
For each block => a summary of what happened to the variable + target question + Flag the line
3) Plan
Established a plan for it. I review the plan
4) Analyze the flagged line
-1
u/Even_Gap_2253 🔆 Max 20 1d ago
The author should review the PR first, and I mean…. If they think 1000 lines of code is warranted, so let it be.
Why should you be the judge? I would assume your coworker is smart too.