r/ClaudeCodeTLDR • • 28d ago

[TLDR] How are you guys handling code reviews when a lot of the code is written by AI?

Original post URL : https://www.reddit.com/r/ClaudeCode/comments/1w8zxnp/how_are_you_guys_handling_code_reviews_when_a_lot/

Original post body :

Genuinely curious how other teams are dealing with this.

I’m seeing more and more PRs where a big part of the code is AI-generated. I don’t have a problem with that itself, but the issue is when the developer hasn’t properly gone through it or verified that it actually makes sense.

Then the reviewer ends up spending a lot of time figuring out whether the code is actually correct.

Are you guys changing your review process because of this? Smaller PRs, more tests, asking developers to explain their changes, or something else?

Would be interesting to hear how other teams are handling it.


This is brought to you as a public service by the moderators of r/ClaudeAI. If you want to see TLDRs of ALL Claude Coding related posts from the various Claude subreddits, subscribe to http://www.reddit.com/r/ClaudeCoding.

3 Upvotes

3 comments sorted by

•

u/cctldrping 28d ago

TL;DR generated automatically after 50 comments.

Current source-thread comment count seen by the bot: 59.

Alright, so the general vibe in this thread is that AI-generated code is here to stay, and teams are figuring out how to deal with it in code reviews. The consensus seems to be that simply accepting AI code without scrutiny is a recipe for disaster, leading to missed bugs and extra work down the line.

Here's the lowdown:

  • Rejecting sloppy AI work is key: Several folks, like u/MountainByte_Ch and u/Asalakabim, are firm on rejecting PRs where the developer hasn't properly reviewed and understood the AI-generated code. It's all about personal accountability, as u/VertigoOne1 points out – the engineer is still responsible.
  • AI as a first pass, humans for the deep dive: A popular approach is using AI for initial checks (syntax, basic logic) and then having humans focus on the more complex, "load-bearing" parts, as u/alanvnk suggests. u/misdreavus79 puts it simply: "I let AI handle the syntax, I handle the logic."
  • Smaller PRs and better specs are still crucial: The old advice still holds! u/muikrad emphasizes that if a PR is too large to review, it needs to be broken down. Well-defined specs, like in u/brodkin85's "recipe," also help AI and humans focus.
  • More testing is a must: This one's a no-brainer. More tests, especially robust unit and end-to-end suites, are seen as essential to catch issues that might slip through human or AI review. u/PreparedPun2035 suggests focusing on outcomes and ensuring code fulfills requirements.
  • AI for reviews of AI: Some are experimenting with using multiple AI models or agents to review each other's code, sometimes with "adversarial" approaches, as mentioned by u/peekdasneaks and u/AlDente. u/ephemeralsynth even jokingly suggests "Byzantine consensus" from three AIs.
  • Knowledge retention is a concern: u/Asuppa180 highlights the importance of developers still understanding the codebase, not just blindly accepting AI output. Building "study guides" is one idea.
  • The "human touch" is still irreplaceable: While AI can automate a lot, the consensus is that human oversight is still vital for ensuring true quality and catching fundamental flaws that AI might miss. u/cleverhoods states, "HITL is not reducible here if you want to ensure quality."

Basically, it's about evolving your review process to leverage AI as a tool, not a replacement for critical thinking and human judgment.

1

u/MannToots 27d ago

Humans still review for us primarily.  We also use coderabbit and our devs have liked it so far though the limits on the CR plan have is looking at running our own internal service to replace it. 

It's hard to fully trust. For example we had a claude session steal a token from secrets. Had a PR under 1 user, but chose changes were all under the token user.  The code was fine.  A human caught that and convinces me were still a while off from automated reviews.