r/codereview • • Feb 20 '26

Replacing grep with ripgrep in our AI code search, fixed alot of our "hallucination" problems

0 Upvotes

This is one of those things that feels obvious in hindsight but took us way too long to figure out.

We've been building an AI code review tool, basically an LLM agent that searches through a codebase, gathers context, and suggests fixes. For months we had this persistent issue where the agent would produce noisy, sometimes flat-out wrong suggestions. We kept blaming the model. Tweaked prompts. Tried different temperatures. Adjusted system instructions.

None of it helped.

Turns out the problem was upstream. We were using grep for code search, and grep was silently poisoning the context window.

Here's what was happening:

- grep doesn't respect `.gitignore`. So every search was pulling in matches from `node_modules`, `venv/`, build artifacts, binary files — thousands of irrelevant results.

- All of that got dumped into the LLM's context window.

- The model wasn't hallucinating. It was doing its best with garbage input.

We swapped grep for ripgrep (`rg`) and the difference was night and day.

For anyone not familiar, ripgrep:

- Searches recursively by default (no more forgetting `-R`)

- Respects `.gitignore` out of the box — skips `node_modules`, build output, binaries automatically

- Has smart-case matching — lowercase query = case-insensitive, mixed case = case-sensitive

- Is significantly faster (on the Linux kernel: grep 0.67s vs rg 0.06s)

But the speed wasn't even the main win. The real insight was about context pollution

In an agent workflow, ~85% of operational cost comes from the LLM processing input tokens, not from the search itself. So every junk result grep returned was a token the model had to read, reason over, and pay for. Cleaner search results → smaller context → fewer tokens → better reasoning → lower cost.

We weren't optimizing search. We were accidentally optimizing the entire downstream chain.

The command comparison that made us feel dumb:

# grep

grep -R -l --ignore-case --include="*.md" "schema" .

# ripgrep

rg -l -i -t md "schema"

Same result. Half the characters. No noise from ignored directories.

To be fair to grep, it's universal. It's on every Unix box, every container, every minimal image. If `rg` isn't available, grep is your fallback and it's a fine one. We still use it in environments where we can't install extra tools.

But if you're building anything that feeds search results into an LLM context window, do yourself a favor and check what your search tool is actually returning. We wasted months debugging the model when the problem was the input.

Curious if anyone else has run into this pattern, garbage-in problems coming in as model quality issues.


r/codereview • • Sep 24 '25

Would you trust AI to review your AI code?

Post image
0 Upvotes

Hi everyone,

AI is speeding teams up but it’s also shipping risk: ~45% of AI-generated code contains security flaws, Copilot-style snippets show ~25–33% with weaknesses, and user studies find developers using assistants write less secure code.

We’ve been building Codoki, a pre-merge code review guardrail that catches hallucinations, security flaws, and logic errors before merge — without flooding you with noise.

What’s different

  • One concise comment per PR: summary, high-impact findings, clear merge status

  • Prioritizes real risk: security, correctness, missing tests; skips nitpicks

  • Suggestions are short and copy-pasteable

  • Works with your existing GitHub + Slack

How it’s doing
We’ve been benchmarking on large OSS repos (Sentry, Grafana, Cal.com). Results so far: 5× faster reviews, ~92% issue detection, ~70% less review noise.
Details here: codoki.ai/benchmarks

Looking for feedback

  • Would you trust a reviewer like this as a pre-merge gate?

  • What signals matter most for you (auth, PII, input validation, migrations, perf)?

  • Where do review bots usually waste your time and how should we avoid that?

Thanks in advance for your thoughts. I really appreciate it.


r/codereview • • Oct 04 '26

After 15 years I can tell you AI didnt kill coding it turned it into reviewing

0 Upvotes

When I started, around 2010, the rule on my first team was that nobody merged without someone else reading it line by line. It was slow and people hated it, but everybody on that team could explain any part of the system.

We're in a weird version of the same situation now. If there's one thing agents are very good at, it's writing code. My team generates more in a week than we used to in a quarter. Writing it has never been easier.

What hasn't changed is that someone has to understand what got built. The agent will produce something whether or not it fits the architecture. coderabbit / claude review catch a lot of the line level problems, but a diff review can't tell you that the new service quietly duplicates one we already have.

So after 15 years, my honest take: AI didn't kill coding, it turned most of it into reviewing. The person who writes the syntax is getting cheaper every month. I'm not convinced the person who can hold the whole system in their head and say "no, not like this" is going anywhere.


r/codereview • • Sep 24 '26

Object-Oriented I built a system level review tool to be able to keep up with big AI generated code changes

3 Upvotes

Hi all,
I am a long time SWE (8 years professional, 14 years since I started coding) who has worked with enterprice stacks like Java, C# later on Kotlin. Already pre AI architectural impact has been something hard to detect especially if one is not really familiar with the system.

Since coding agents became a part from our dev process, maintaining understanding and assessing archiectural impact on changes has become near impossible. That is why with a friend we built an open source deterministic engine ( https://github.com/CodeBoarding/CodeBoarding ) to generate architectures based on the control flow graph of the project. This way all the code is in fact part of the analysis and hallucinations are 100% eliminated as LLMs are used only for naming.

It works by using LSPs + tree sitter to construct a CFG, alongside it we use Lexicographical analysis to figure out how to group code in a strucutral way which is close ot your existing mental model. The result is a map whcih has edges based on the actual source code, and grouping based on your namespace organization.

We recently decided to use the architecture + the fact that we can identify exactly which methods have been modified (as everything is based on real static code indexing) to use it as a starting point for every code review. This way one can catch mishaps before reading a single line of code or reading all the AI generated comments.

I would love to hear, how do you feel about code-review in these days AI first flows? My friend and I strongly believ in human in the loop, but also think that for a lot of the code line level details have to be left to agents, with the human keeping an eye on system design and on understanding the introduced tradeoffs by the agents.

The webplatfrom is free to use and all the anlaysis is done within your CI/CD (Github Actions), we use gemini for the naming of the components. If you are interested you can also give it a spin at: https://app.codeboarding.org

Stay in the loop all!


r/codereview • • Aug 01 '26

Greptile, CodeRabbit or Other?

0 Upvotes

Ok, which AI code review product does everyone recommend ? My company has a few devs and largish codebases and we’re running out of capacity to review PRs based on the rate of code we’re pushing now.

For enterprise work which code review platforms do you all recommend ? I’ve heard of greptile and code rabbit the most. Just wondering which tool people would recommend for automated PR reviews.


r/codereview • • Sep 26 '25

What’s the role of AI in code reviews?

1 Upvotes

Hey folks,

Lately I’ve been experimenting with how AI can fit into the code review process. Personally, I’ve started using a local, privacy-first tool I’m building to help me explain code back to myself during reviews. It’s been surprisingly helpful, but it also raises a bunch of questions.

On one hand, AI could speed things up, pointing out potential issues, highlighting style inconsistencies, or even surfacing security concerns. On the other hand, I wonder whether people would trust its feedback too much, or whether it should always stay in the role of "assistant" rather than "reviewer." And of course, the privacy angle matters a lot if your code is sensitive or proprietary.

I’m curious how others see this: is AI just another helper in the toolbox, or could it actually reshape the way we approach code reviews? Would you be comfortable relying on it, or do you see it more as a secondary voice alongside human reviewers?

Would love to hear your take.


r/codereview • • Mar 07 '25

Best AI-Powered Code Analysis Tool for GitHub Repos?

1 Upvotes

I’m looking for an AI-powered tool that can analyze my GitHub repo and provide high-level structural recommendations, code quality scores, and priority areas for improvement. The goal is to ensure clean, elegant, and well-structured code.

Ideal Features:

  • AI-driven insights (not just static analysis)

  • Supports JavaScript, HTML, CSS, Java, and Python

  • Provides overall structure recommendations & refactoring suggestions

  • Ranks different parts of the codebase based on maintainability, performance, and best practices

I've looked into SonarQube, Codacy, Code Climate, Embold, CodeScene, and CodeRabbit, but I’d love to hear from others who’ve used these or have better suggestions.

What’s the best tool for deep AI-powered analysis that goes beyond basic linters and actually understands the codebase structure? Would appreciate any recommendations or insights!


r/codereview • • Jul 25 '25

27 F from New Delhi- Need a tutor or a coding buddy

0 Upvotes

Hi guys I need a coding buddy to learn with them. Currently learning python. Please help me out Kinda stuck here 😅


r/codereview • • Jul 30 '25

Hello Guys, I am currently building my own AI-native code review tool. Here's why

0 Upvotes

I am a Senior AI engineer, using a bunch of code review tools in the market but all of them are very basic and generic. It doesn't have capability to set your own policies/checks specific to your domain or field. And some of the tools generate overwhelming comments which as a reviewer don't have time to read through it. There are lots of FPs, doesn't understand the code base and developers intent. So, I am building my own AI-native code review tool which addresses all these shortcomings. In my view, code review should happen at the developer lever before going for a PR. I am building it as a command line tool and as IDE plugins, so that developers can make sure all the checks are done before going for the PR. Please let me know if you guys face any problems with the already existing tools, in the code review process and also let me know if you would like to see some feature in my tool.

PS. I am also looking for beta users, if interested dm me.


r/codereview • • Oct 04 '22

How to write to file in Golang?

Post image
0 Upvotes

r/codereview • • Sep 19 '26

Bug fixing your codebase

0 Upvotes

Thought of the night:
Since an LLM will always find a bug in the code even in the code they just wrote with a perfect plan behind, is it really really that helpful to have this gargantuan model looking at your code?
I’m finding deepseek v4.1 like more clever than astra.
I explain the problem-he finds it-he fix it.
Astra on the other hand is like
I explain the problem-checks every crevices and finds numerous things to fix-fixes them-then something else gets lost and has to fix also that…
It sure is my skill issue but idk, that’s my thought.
What do you think??


r/codereview • • Apr 16 '26

Why I'm walking away from my AI code reviewer (4,000+ repos) just as it's ready to monetize.

1 Upvotes

Over the last year, I built LlamaPReview to fix the noise problem in AI code review. It worked: 527 active GitHub App installs with 4,000+ repos subscription.

The plan was to flip the switch on a paid tier for private repos this month. Instead, on May 1st, I am pausing private reviews entirely and walking away from the SaaS model.

Why walk away?

If you review code daily, you know the landscape is shifting. With "vibe coding" and AI-native workflows (Cursor, Copilot), the traditional PR review bot is becoming a relic.

Reviewing diffs after the fact feels like patching a leaky pipe when the entire plumbing system is being replaced. The real bottleneck in engineering today isn't commenting on PRs. It's preventing architectural collapse as AI-driven mutations accumulate.

Being "almost right" on a PR comment isn't enough anymore. AI needs deterministic context before it writes, not just a reviewer after.

What happens to the tool?

Public open-source reviews will remain completely free.

As for the private tier—it’s a turnkey SaaS with an active user base and a validated path to monetization. My focus has just shifted. If someone wants to take the keys and run with it, my DMs are open. Otherwise, it quietly spins down May 1st.

The Pivot

I'm moving upstream. I realized the real frontier isn't understanding code diffs; it's understanding full knowledge environments.

I’m now fully focused on DocMason, an open-source, local-first knowledge base. It compiles unstructured artifacts (PDFs, decks, repos) into deterministic context that agents can actually use—so they build the right thing the first time, rather than needing an AI to review their mistakes later.

If you're tired of AI hallucinations and want to see how to build reliable context infrastructure, I’d be honored if you dropped a star on DocMason.

Thanks to everyone who trusted LlamaPReview with their codebases. The next chapter is going to be much more interesting.


r/codereview • • Oct 13 '26

Python Vibecheck – a GitHub merge gate that checks whether you understand your AI-generated code

0 Upvotes

I built Github merge gate which that checks whether developers understand their own code when they create a PR.

I kept getting sent PRs to review where it was obvious the author had pasted the ticket into an LLM and called it a day. Problem was: the PRs would often be massive 2K monstrosities that nobody could possibly review. As the team scaled up, this problem got only worse, and now we collectively have a system that no one understands and has bugs.

It works like this: when someone opens a PR, it posts a comment with a link. The author clicks through and answers a few technical questions about their own changes. If they can’t answer them, the PR can’t be merged.

It's self-hosted (so you can use it in your enterprise environments or privately)

It is BYOK (Anthropic) obviously.

Here is the source code, build instructions and how to deploy: https://github.com/bhurghundii/vibecheck.dev

I have two demos in the pull requests here: https://github.com/bhurghundii/vibecheck.dev/pulls - you can see what Vibecheck does (it blocks a PR for clearly showing no attempt vs a PR which gets it right)

I would love feedback, especially from anyone dealing with the same thing on their team. I do use it for my own projects a lot so expect improvements.


r/codereview • • Dec 24 '25

Looking for an AI tool that can act like an extra reviewer on PRs

1 Upvotes

Ideally it should read related files and history, post a short PR summary, and suggest a few concrete fixes so I can focus on design and tests


r/codereview • • Aug 05 '25

Anyone here using Qodo for AI-powered code reviews?

0 Upvotes

We’ve been using Qodo to automate the first pass of PRs it pulls in Jira context, past PRs, and even flags missing tests or edge cases.

Curious if anyone else has tried it or using something similar with agentic workflows?


r/codereview • • Jun 23 '26

Do I want to care about the code?

0 Upvotes

I have 27 years of experience in software, and I would now like to move on. So I was looking to acquire a startup(a local grocery delivery app).

Honestly, it looked like a solid deal.  The product worked fine from the outside. Customers were happy.

Do I want to care about the code?

If you were acquiring a startup, would you inspect the codebase before making the deal?


r/codereview • • Apr 20 '26

SICK and tired of Greptile, what are the best alternatives?

1 Upvotes

So I recently found out greptile has become usage based after finding at $200 bill, they didn't inform about this pricing change via email or anything, they just expect users to be okay with this. Moreover, you can't cancel their subscription without reaching out to support lmao.

Keeping this aside, their pricing model sucks either go fully usage based, give controls over billing OR seat based - PLEASE don't do this weird thing of doing a seat based+usage model, it's so confusing and people hate it.

Anyways, there is no way I continue with them after this, even the code reviews seem to be getting worse and I really don't trust their PR ratings either. What are the best alternatives - I do not mind usage based or seat based as long as the company is transparent with their billing.


r/codereview • • Jan 23 '25

I need a bot that can just run and do all my home school work

2 Upvotes

IM WILLING TO PAY. I am home schooled. I’m a sophomore doing freshman work. I have gotten approval from my parents to use a bot to do my work and graduate. I need a bot that will do my assignments automatically and complete them and move onto the next one. Basically a bot that can complete hundreds of assignments in 10-20 minutes


r/codereview • • Mar 03 '26

best ai code reviewer to pair with cursor?

0 Upvotes

been using cursor for like 6 months now and its great for writing code fast. but im realizing the review side is kinda lacking. bugbot is decent for surface level stuff but it misses a lot of the deeper issues, security stuff, actual logic bugs, I'm also testing out codent.ai right now, things that a senior dev would catch. whats everyone using to review the code that cursor generates? im looking at a few options but most of them feel like glorified linters.

specifically want something that:

  • catches security issues

  • understands context across files not just line by line

  • works with github PRs

  • doesnt drown me in false positives (looking at you sonarqube)

what are you guys pairing with cursor?


r/codereview • • Mar 03 '26

Tried a new AI code review tool after seeing a Reddit thread and one week in I'm actually impressed

0 Upvotes

So last week I came across a post on here about an AI code review benchmark comparing a bunch of tools. I'd been pretty unhappy with what we were using, it was noisy, our devs had basically stopped reading the comments and we were keeping it around more out of habit than anything.

Decided to give Entelligence a shot mostly out of curiosity. Only been a week so I can't say too much yet but first impressions are genuinely good. The biggest thing I noticed straight away is how quiet it is. It doesn't comment on everything, and when it does leave something it's actually worth reading. Sounds like a low bar but after what we were dealing with before it already feels like a different experience.

It also seems to actually understand the codebase rather than just looking at the diff in isolation. We caught one bug in the first few days that I'm fairly confident would have slipped through before.

Too early to call it a proper verdict but so far so good. Would definitely recommend people who are in the market for a new tool to try it out


r/codereview • • Aug 25 '26

You are probably worse at code review than AI

0 Upvotes

I genuinely don't understand why people still act like human review is some gold standard.

most code reviews are a senior dev opening the PR between 3 other things, skimming the diff, leaving 2 comments and approving it.

meanwhile a decent AI reviewer will read the entire thing in minutes, every single time, without getting bored halfway through a 900 line PR.

yes, AI reviewers get things wrong. humans get things wrong too. except humans are slower, more inconsistent, way more expensive and tbh just worse

i've been running macroscope and cursors bugbot on every signle PRs and at this point i'd trust either of them to find bugs over a random senior engineer doing a 15 minute review.

people will hate this but i think "AI reviews first, humans only when needed" is obviously where this ends.

what exactly are humans still better at that justifies them reviewing every PR?


r/codereview • • Jul 29 '26

Great tool for code review - CodeRabbit

0 Upvotes

I just used CodeRabbit for my code review, and it's fantastic! It's free for OSS and offers a free trial for proprietary code. Check it out: https://coderabbit.ai


r/codereview • • Jul 19 '26

Java Szczera prośba o feedback

Thumbnail axtar.dev
0 Upvotes

Cześć kochani,

Chciałbym prosić o opinie, bo mój kumpel i ja mieliśmy sporo problemów przy dwóch jednoczesnych projektach związanych z dostosowaniem standardów projektowych i sprawieniem, żeby każdy członek zespołu osiągał spójne wyniki. Rozwój oparty na specyfikacjach nie spełnił naszych oczekiwań, ogromny zestaw dokumentów, które nie dokładnie opisują projektów w branżach pełnych niuansów i odrobiny dziedzictwa. Nawet przy tym, że deweloperzy spędzili dużo czasu na analizowaniu specyfikacji, było wiele odstępstw.

Postanowiliśmy więc stworzyć coś w rodzaju mentora, małą funkcję, która wydobywa zasady z kodu i jest otwarta na wprowadzanie innych rodzajów zasad, a następnie jednoczesny agent prowadzi rozmowę np. z Claude'em, daje feedback i sprawdza, co wyprodukował agent kodujący, wskazując naruszenia i sprawiając, że Claude to dostosowuje - cóż, na pewno jesteśmy stronniczy, ale pomysł działa dla nas, jednak chcielibyśmy usłyszeć innych ludzi.

Można także pisać wiadomości prywatne, jeśli chcesz uzyskać dostęp.

Ktoś? Będę bardzo wdzięczny za wszelkie opinie.


r/codereview • • Jun 24 '14

Review pls

Thumbnail loggan08.github.io
0 Upvotes