What changed
In an October 19, 2026 engineering post, Cloudflare described optimising its internal multi-agent code reviewer after average review cost climbed from about $1.19 in April to $2.46 in late August without major architecture changes. Comparing its two most expensive pre-optimisation weeks with the later system, it reports average cost falling from $2.43 to $0.77 per review (68%), and median runtime from 4m09s to 1m32s. Before optimisation, output tokens represented 23% of spend, cache writes 43%, and cache reads 34%. Work included stabilising the first request's prompt ordering for cache reuse, model/effort experiments and moving to OpenCode v2; vendor-reported shadow tests agreed on review approval decisions in 98% of cases.
Why it matters
Teams paying for repeated coding-agent or review-agent runs may have an avoidable prompt-cache bill even if their model and application architecture seem unchanged. Request ordering, cache hit/miss patterns and effort settings can dominate cost per completed review. Cloudflare's experience also shows why cheap tokens are not the only metric: reducing effort in performance and security reviews appeared to lose real findings, so category-specific quality checks remain essential.
The cost leak was in the actual provider payload
Cloudflare says it investigated what reached the provider on each session's first request, rather than trusting intended prompt structure. Inconsistent message ordering reduced cache reuse across commits and repositories. Making the first request stable enough to hit the cache was the largest reported saving. The pre-optimisation spend mix was unusually cache-heavy: 43% writes, 34% reads and 23% output.
The workflow changed as well as the bill
The reviewer moved to OpenCode v2 after a shadow-mode comparison on canary repositories. Cloudflare reports 98% agreement on approval decisions between versions and a roughly 13% speedup for full-tier reviews using the same models over two comparison days. Agreement on approval decisions is not proof that both versions catch every defect, and no independent reproduction of the system's cost figures is available.
Model effort has different consequences by review type
Cloudflare reports that high-effort code-quality review retained about as many real findings with less noise and fewer inflated severities. Lower effort on performance and security reviews appeared to miss findings, so the team plans to test those categories at high effort. A single effort setting for every agent role may therefore be a false economy.
How to reproduce the useful investigation
Instrument token usage, cache-write and cache-read spend, request ordering and completed-review costs; compare identical review sets in shadow mode; measure false negatives and useful findings separately for security, performance and code quality. The published numbers are Cloudflare's internal workload, not a guaranteed saving for other stacks.