← Back to blog

Letting a Bot Write the Patch, Not Approve It

Brandon Schaefer··Updated November 24, 2026·3 min read·

A rule that an automation may never merge its own pull request is cheap to write and, on a bad day, expensive to live with - a clear-eyed look at what that human-in-the-loop line actually costs, not a case for moving it.

Table of contents

The same issue-working bot that opens pull requests against my site's repo has one rule baked into its instructions that never bends, no matter how confident it is: it writes the fix, opens the PR, leaves a comment explaining what it did and why - and stops. It does not merge its own pull request. It does not push to the default branch. That boundary is cheap to state in a prompt template. Living with it, on the day it actually matters, is not free.

The rule, stated once, followed every time

It's one line in the bot's operating instructions: never merge the pull request yourself, no matter how certain the fix looks. Open it, link it to the issue, and wait for a human. There's no carve-out for "but this one's obviously correct" or "but the bug is actively causing problems right now." The rule doesn't ask the bot to judge its own confidence, because a confident bot is exactly the failure mode the rule exists to prevent.

What that boundary buys

The payoff is straightforward: there is no scenario where this automation pushes a breaking change straight into production unsupervised. Whatever the bot gets wrong - a subtle regression, a misread of the actual bug, a fix that's technically correct but operationally risky - gets caught by a human before it can run anywhere that matters. The blast radius of any single mistake is capped at "opened a pull request that someone has to act on," which is about as safe a failure mode as autonomous code changes get.

What it costs

The cost showed up concretely, not hypothetically. A fix for an actively-misbehaving piece of this same automation - a timing bug that kept letting a busy comment thread cancel its own work before it ever finished - sat open and unmerged for over a day. The fix itself looked right: narrowly scoped, addressing the exact failure mode, nothing suspicious about the diff. None of that mattered to how long it sat there, because the bot that wrote it has no path to merging it, and the human review step doesn't run on the bot's schedule. For a full day, the underlying bug kept doing the thing the pull request existed to stop.

The tradeoff, named honestly

It's tempting to frame this as "should a bot be allowed to fix bugs," but that's not actually the open question - the bot already forms an opinion about what's wrong and how to fix it, writes the diff, and explains its reasoning in plain language. All of that already happens unsupervised. The real question is narrower and less comfortable: should a bot be allowed to decide a fix is good enough to ship? The answer this setup gives, every time, is no - the only step withheld is the final keystroke, after everything that actually requires judgment has already been done by the machine.

Where the line could plausibly move

If this boundary moved at all, the obvious place to loosen it first would be narrowly-scoped, test-covered changes - a one-line config fix, a dependency bump, something where the blast radius of being wrong is small and provable by a test suite rather than by a human reading a diff. The place it should never move is anything touching CI workflows, deployment pipelines, or secrets handling, where a plausible-looking fix with a subtle flaw can do real damage before anyone notices - which, not coincidentally, describes the exact category of bug this bot spends most of its time fixing.

Not a recommendation, just the receipt

This isn't an argument for changing the policy. It's a receipt for what the current one actually costs, stated plainly instead of left as an abstract safety principle nobody has to account for. A day of a known bug staying live is a real price, paid on purpose, in exchange for a guarantee that's worth having: nothing this bot writes ships without someone deciding, deliberately, that it should. Whether that trade is still worth it on the next bad day is a fair question to keep asking - just not one this post is trying to answer.