Most teams do not hate code review. They hate the bot that leaves twelve comments on a pull request before a human has opened it. If you want to build a code review bot that developers do not hate, start from that frustration: the bot has to earn its place in the review, the same way a new teammate would, by commenting less, being right more often, and knowing when to stay quiet.
A review bot is a filter, not a replacement for human reviewers. It catches obvious problems early so humans can spend their time on design, logic, and trade-offs that need judgment. Get that balance wrong and the bot becomes background noise; get it right and developers start asking for it on new repos.
Why most review bots get muted
The pattern is always the same: a team installs a bot, it comments on everything, and within a week someone mutes it.
First, false positives. A bot that flags ten things and gets eight wrong teaches developers to ignore all ten. Second, style nitpicks: if your formatter already enforces spacing and quote style, a bot repeating them adds nothing but noise. Third, no sense of proportion. A bot that treats a typo in a comment the same as a SQL injection bug has no judgment, and developers notice fast.
Fourth, it reviews code it should never touch: generated files, vendored dependencies, lockfiles, and migrations it does not understand. Fifth, it writes like linter output pasted into a comment thread, with no explanation of why the issue matters or how to fix it. A good review starts from the reader, not the checker. The habits in how to review AI-generated code without slowing your team down apply just as well to a bot: short, specific, and focused on the change in front of you.
How to build a code review bot: the architecture
Keep the first version of your automated code review small. You need four pieces, and none of them is exotic.
The trigger is a webhook. GitHub and GitLab both send a pull request event when code is opened or updated. Your service receives it, checks the repo is on its allowlist, and fetches the diff through the platform API. The diff endpoint gives you exactly what changed, which is all a reviewer needs.
The second piece is the file filter. Drop generated files, lockfiles, vendored code, and anything outside the languages you support. The third piece is the checker itself. Start with checks you already trust: your linter, your test suite, and a small set of security rules. Add an LLM pass only for what static tools cannot judge, like whether new code handles its error cases.
The fourth piece is the commenter. It posts findings through the platform API, one comment per issue, pinned to the exact file and line. Store every comment, plus whether a developer fixed, dismissed, or ignored it. That feedback log is the raw material for every improvement you will make, so build it in from day one.
Decide what the bot checks, and what it skips
The most important design decision is the check list. A bot that checks everything checks nothing well. Pick a small set of checks where the bot is usually right and leave the rest to humans. This table is a reasonable starting point for a first version.
| Check this | Skip this |
|---|---|
| Real bugs: null dereferences, off-by-one errors, wrong API usage | Formatting and style (the formatter owns this) |
| Security issues: injection, secrets in code, unsafe deserialization | Naming taste and personal preferences |
| Missing tests for new logic | Anything your linter already flags |
| Obvious performance traps: queries in loops, unbounded fetches | Architecture opinions and design trade-offs |
Notice what is missing from the left column: opinions. The moment a bot starts arguing about design, it loses. Humans own design; bots own the mechanical stuff that is easy to verify and boring to check by hand. A code review checklist for AI-assisted pull requests already separates the mechanical checks from the judgment calls.
Write comments developers actually read
A comment has about three seconds to earn attention. Lead with the problem in plain words, then the evidence, then a suggested fix, one issue per comment. Three problems in one function means three comments, each pinned to its own line. A wall of text at the top of a file gets skimmed.
Label severity honestly, with two or three levels at most: blocking, should fix, optional. If everything is blocking, nothing is. Never post a comment that only says “consider refactoring this.” A comment without a concrete suggestion is a chore disguised as advice; if the bot cannot suggest a fix, it should stay silent.
Tone matters more than teams expect. “This query runs inside a loop and will hit the database once per item” gets fixed. “Inefficient database access detected” gets ignored. When the bot is unsure, say so instead of stating a guess as a fact. A bot that admits uncertainty keeps its credibility; one that states wrong things confidently loses it in a day.
Ship it without breaking the pipeline
Roll the bot out as a non-blocking check first: it comments, but never fails the build or blocks a merge. Run it that way for two or three weeks on one or two repos and watch the feedback log. If developers fix most of the comments, you can talk about blocking on the highest-severity findings. If they dismiss most of them, the bot is not ready.
Scope the bot’s permissions tightly: read access to code and write access to pull request comments, nothing else. Use a dedicated bot account or a GitHub App with the smallest permissions that work, and rotate its token on a schedule. Treat the token like any other credential. How to keep secrets out of AI coding assistant prompts covers the habits that keep tokens out of logs and prompts.
Set a timeout and a size limit. A pull request bot that takes ten minutes to review a 2,000-line change is slower than the human it is supposed to help. Cap the diff it reads, skip the review entirely when the change is huge, and post a short note saying the pull request is too large for an automated pass. Developers respect a tool that knows its limits.
Measure whether the bot helps
Ship the bot, then prove it earns its keep. Four numbers tell you most of what you need to know: the share of comments developers act on, time from pull request opened to merged, review rounds per pull request, and how often someone mutes or removes the bot. If the first number is low, your checks are wrong. If the second and third do not move, the bot is not saving time. If the fourth climbs, stop and listen before adding anything new.
Ask the team directly, too. A short survey after the first month, three questions at most, catches what the numbers miss: which comments feel useful, which feel like noise, and what the bot should stop doing. The answers usually point at one or two checks to remove, the cheapest improvement you will ever make. For the numbers side, how to measure whether an AI tool saves your team time lays out a practical way to separate real time saved from feel-good automation.
Review the feedback log monthly and prune. Every check that gets dismissed more often than fixed should be tuned or deleted. That pruning is what keeps code review automation sharp: a bot with five good checks beats one with fifty noisy ones. Before adding a new check, look at what is already on the market: the best AI code review tools in 2026 compared is a useful reference for which checks other tools get right and where they still produce noise.
Frequently asked questions
Should a code review bot block merges?
Not at first. Run it as comments only for a few weeks, and block merges only on the highest-severity findings, once developers fix them most of the time. A blocking bot with noisy checks is the fastest way to get it removed.
Can a code review bot replace human reviewers?
No. It catches mechanical problems early so humans can focus on design, the correctness of the approach, and trade-offs that need judgment. The bot handles repeatable checks; people handle decisions.
How do I keep the bot from commenting on generated code?
Filter by path before any checking runs: exclude generated files, lockfiles, vendored directories, and migrations by default, and let each repo add its own exclusions. This one filter removes a large share of the noise teams complain about.
Build the bot in small steps, measure what it does, and cut whatever developers ignore. A review bot that stays quiet and stays right is the one teams keep.