Hey,
I’ve been obsessed with one question lately: what would it take for us to let agents merge their own work without sacrificing quality? How would we get to a point where we can trust them?
Right now we have a problem. Humans simply don’t have the time or capacity to properly review the volume of AI-generated code we’re now producing.
Some companies refuse to adapt their processes or acknowledge this new reality and still try to do things the old way: reviewing every line of code.
When diffs pile up faster than your team can read them, review breaks down: PRs go stale, or reviewers glance at changes and rubber-stamp them.
I don’t think the answer is to have agents merge everything. And I don’t think the answer is to have humans review every line of code for every change.
I think it’s more subtle.
To be clear: you are not letting AI agents auto-merge all of your code. You are only automating a small, low-risk subset inside a layered code quality system.
Below are the five tactics I use to do this safely.
Watch the full walkthrough and live demos or read the guide below.
I cover:
(00:52) Why AI code review is the new bottleneck (Anthropic, SpaceX, Intercom, and OpenAI)
(04:20) Code review on a risk spectrum, and building a code quality system
(06:19) Strategy 1: Repeatable agent pipelines (live Machinist demo)
(09:30) Strategy 2: Merge gates, LLM-as-a-Judge, deterministic tripwires, and Claude Ship
(13:33) Strategy 3: Give your coding agent its own GitHub identity
(14:58) Strategy 4: Require visual proof of work in AGENTS.md
(15:40) Strategy 5: Test after the merge in a pre-production environment
Build a code quality system, not just code review
Anthropic went from 2,500 changes a day in May to over 30,000 in September. At SpaceX, engineer Lauren Tan talks about individuals shipping over 3,000 pull requests a month, and the SpaceX GrokBot team shipping 11,000 changes a month with a 0.5% revert rate.
No human can read that much code line by line to a high standard.
Intercom wrote about this exact failure mode: once volume outpaces human reviewers, rubber-stamping creeps in and code review stops doing its job.
The scepticism about letting agents merge code is healthy. Nobody wants to trade quality for speed. We want both.
The shift is treating code changes on a risk spectrum. A typo fix in docs is not the same as a database migration. OpenAI uses a risk classifier (I call it a merge-gate) to decide how many humans review a change.
Human review never catches every bug anyway; use humans where you need judgment or real intelligence, and build a layered code quality system around everything else.
1. Run every change through a repeatable agent pipeline
Repeatability and consistency raise quality. That is why we have CI/CD pipelines, and the same principle applies to coding agents.
Push every task through the same sequence of deterministic scripts and agent steps: check out a fresh branch, implement the change, run a secondary agent review, revise findings, open a pull request, and run the merge gate.
In my open-source software factory, Machinist, I cap parallel runs with a concurrency throttle and mix models per step: Gemini 4 Neon High to implement, and Claude Opus to review. Once every change runs the same process, you can swap models or tweak prompts and measure time, correctness, and cost.
2. Use an LLM merge gate backed by deterministic tripwires
My favourite tactic is a merge gate: an LLM as a judge paired with deterministic tripwires.
I borrowed this pattern from Anthropic’s Claude Ship, which runs changes through a review agent, a fix agent, and a custom policy approval gate.
When a pull request opens, an agent reads the diff against your merge policy and classifies it as low-risk pass or human review. Because an LLM can still get things wrong, pair it with deterministic tripwires: hard rules that can never be broken.
Touch Terraform, database migrations, auth, payments, or secrets and the tripwire immediately blocks the merge for human review.
There is no single right policy. A personal project will be far more lenient than a fintech.
Start strict, like docs and tests only, and widen only where you trust your checks.
3. Give your coding agent its own GitHub identity
If agents commit under your personal GitHub account, your audit trail blurs human and agent work, and you give the agent all your GitHub permissions.
Give agents a separate GitHub App or user account instead. A quick tip is email plus-aliasing: sign up with you+agent@yourdomain.com so the agent gets its own GitHub account while emails still land in your main inbox.
In my repos, PRs and comments clearly come from the agent, and I lock down its permissions so it cannot tamper with GitHub workflows.
4. Require visual proof of work on every pull request
For changes that still need human review, you should not have to check out every branch locally just to verify a UI change works.
Add one instruction to your AGENTS.md file asking agents to attach screenshots or a video walkthrough whenever they change the UI. On a recent ticket-reordering feature, my agent attached a video of itself clicking through the board and reordering tickets right inside the pull request.
You can verify the behaviour right inside the PR before deciding whether to inspect the diff.
5. Test after the merge in pre-production
Human review never catches 100% of bugs. Memory leaks, race conditions, and subtle performance regressions only show up once code runs.
Deploy merged changes to a staging or pre-production environment and let them soak before shipping to production. Post-merge testing catches the runtime failures static review misses.
Final thoughts
It is naive to treat every change, review, or company the same way. Auto-merging AI code is controversial, and healthy scepticism matters. Match your review gates to the blast radius, keep humans focused on real judgment, and build a quality system around the whole lifecycle.
Watch the full video and live Machinist demos here.
Where do you draw the line on letting AI agents auto-merge code? Reply and let me know.
PS: All Machinist merge policy examples are open source here, and free resources and skills for AI coding live in AI Developer.
If you want to build your own software factory, check out aiengineer.co/sfe.
Thanks for reading, and have a nice week.




