Cloudflare Runs AI Code Review with Seven Specialists at Once!
Hey everyone, it's Shii-chan! Today I found a super exciting story about handing code review over to AI, and not just one AI but a whole squad of reviewers running at the same time.
Cloudflare Blog
What was announced?
Cloudflare's Blog published a post called "Orchestrating AI Code Review at scale." Cloudflare automates its internal merge request (MR) reviews with a CI-native system built on top of OpenCode, an open-source coding agent.
Instead of leaning on a single all-purpose reviewer, it spins up as many as seven specialist reviewers covering security, performance, code quality, documentation, release management, and compliance.
And this isn't a toy, it runs hard in production. Over a 30-day window (March 10 to April 9, 2026) it handled 131,246 review runs across 48,095 MRs and 5,169 repositories. Pretty wild, right?
Why it matters
Human code review takes time, and different reviewers focus on different things. But if you try to make one AI prompt do everything, security and performance and docs all at once, each part ends up shallow.
So Cloudflare went with a divide-and-specialize approach. On a human team, your security expert and your performance expert each take a pass, right? This does the same thing with AI, so each reviewer can focus on its own area and raise the quality of its findings.
What changes
The clever part is that the system scales the review weight to the size of the MR automatically. Small changes get a light pass, big changes get the full team, sorted by a risk tier.
- Trivial (10 lines or fewer): coordinator + one generalist reviewer, just 2 agents
- Lite (100 lines or fewer): around 4 agents
- Full (over 100 lines or over 50 files): the full lineup of 7+ specialists
And if security-sensitive files like auth or crypto are in the mix, even a tiny change is bumped up to a full review. I love a design that errs on the safe side!
The cost also depends on MR size. The overall average is $1.19 per review with a median of $0.98; Trivial averages $0.20 and even Full averages $1.68. The median time to finish is 3 minutes 39 seconds, so you aren't waiting long.
Dive Deep
Let's peek a little deeper into the machinery. The whole thing is CI-native: a coordinator child process emits events as JSONL while launching the sub-reviewers through the OpenCode SDK.
What I find fun is how it splits models by tier, since running everything on the top model would get pricey.
- Top tier (coordinator only): Claude Opus 4.7, GPT-5.4
- Standard tier (code quality, security, performance): Claude Sonnet 4.6, GPT-5.3 Codex
- Lightweight (documentation, release, AGENTS.md): Kimi K2.5
These model assignments can be swapped at runtime from a Cloudflare Worker backed by Workers KV, so a flaky provider can be switched out without touching code. And when a retryable error like 429 or 503 shows up, it walks a failback chain (for example opus-4-7 to opus-4-6) protected by a circuit breaker. Real production-grade stuff.
The token-saving trick is smart too. It extracts a shared context file (shared-mr-context.txt) from the coordinator's prompt, and each sub-reviewer reads that file instead of duplicating the MR context. That prevents the context from ballooning 7x. The result is an 85.7% cache hit rate and roughly 120 billion tokens processed over 30 days.
Prompt-injection defense is covered as well: boundary tags like mr_input (XML-style tags) are stripped entirely to stop anyone from breaking out of the structure. Each reviewer also gets explicit "do not flag this" instructions, so the security reviewer, for instance, won't flag theoretical risks that require unlikely preconditions. A nice touch to keep false positives from getting noisy.
Adoption is easy: teams include a GitLab CI component in .gitlab-ci.yml. If an engineer comments break glass, they can force approval even when there are findings (the real usage rate is just 0.6%). By the way, this all runs on top of Cloudflare's internal AI engineering stack that was covered earlier.
It isn't magic, of course. The post is honest about the limits: it doesn't know the system's design rationale, can't fully trace downstream impact, and can miss subtle concurrency bugs.
Wrap-up
- Cloudflare shared its CI-native AI code review platform built on OpenCode, launching up to seven specialist reviewers at once
- Team and cost auto-scale by MR risk tier (Trivial / Lite / Full), averaging $1.19 with a median finish time of 3 minutes 39 seconds
- Models are split into three tiers and swappable at runtime via Workers KV + a Worker, with circuit breakers and failback for production resilience
- A shared context file prevents 7x token blowup, hitting an 85.7% cache rate across 130k+ review runs in 30 days
- A must-read for anyone wiring agents into CI, and for DevOps teams who want AI review that runs without getting noisy!