r/codereview • u/Relative-Algae-9579 • Sep 19 '26
Bug fixing your codebase
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??
1
u/TeqPumpkin999 Sep 20 '26
I don’t think this is just skill issue.
“Find bugs in this codebase” is almost the worst possible prompt for a big model. The stronger models tend to go looking for every possible smell, then they start refactoring around the actual bug. That’s how you end up with 6 new changes and 2 new problems.
Treat the model like a narrow debugger:
- here is the bug
- here is the expected behavior
- here is the failing log/test
- do not refactor unrelated code
- explain the smallest change first
- then patch only that
For broad review, ask it for hypotheses or risky areas.
Do not let it directly fix everything it sees.
Smaller/“less ambitious” models sometimes feel better because they stay closer to the problem.
The big ones are useful, but they need tighter boundaries or they start being too helpful in the annoying way.
1
u/soundman32 Sep 20 '26
AI will not always find bugs. It might suggest a different way of doing something, but that doesnt mean the original was in any way wrong. If AI is suggesting real bug fixes then your code IS wrong, or you haven't handled some edge cases (or AI thinks you havent).
1
u/davertua Sep 23 '26
I think bugfixing by only reading codebase is nowhere path. yes, possible for single microservice or API based app. Regularly I use Opus for it but only as the first gate for the review. The final decision is done by my second agent that performs autonomous web testing on the codebase to ensure user can actually achieve desired behvaior from UI. Only after that gate pass I take a look into review.
For agentic UI review I use testomat.ai/explorbot and for codereview non interactive claude code with custom prompt. So far this is stable setup and i don't want to experiment by adding more checks into it.
0
u/mtutty Sep 19 '26
Not a skill issue. If you don't have a good knowledge base around your code, then more powerful models do 10x the work because they're trying to be more thorough, and they break things because they don't have the deep understanding they need.
8
u/sozesghost Sep 19 '26
AI is a mistake.