
Lessons from building Sashiko, an agentic code review system

Large open-source projects are limited by code review, not code generation, and the Linux kernel is a sharp example: it spans more than 35 million lines of code, absorbs more than 85,000 changes a year, and maintainers still read hundreds of patches by hand every day. To help with that load, the Google AI & Infrastructure team built Sashiko, an open-source agentic code review system powered by Gemini, named after the Japanese stitching technique 刺し子 and donated to the Linux Foundation. Sashiko reviews patches sent to public Linux kernel mailing lists and runs openly at sashiko.dev: every prompt, tool call, reasoning step, and ruled-out bug is public. Google runs the service, so deep agentic reviews are free for developers and do not require their own API keys.
Reviewing kernel changes is hard for humans and LLMs alike, and Sashiko was designed around LLM failure modes: models cut corners to save tokens, are easily biased by commit messages, and tend to stop looking after finding one obvious bug. Sashiko separates candidate-bug finding from verification, and every pass records what it ruled out with supporting code. It first gathers context from modified functions, structs, direct callers, and subsystem domain guides; a planner picks specialist passes and reasoning budgets. Up to seven specialists then run in parallel, each focused on one class of problems: commit intent, implementation match, control flow, resource lifetimes, locking, security, and hardware. Each session reads the repository with git tools, averaging about 100 tool calls per review, and returns both real concerns and candidate concerns it investigated and dismissed. A lead verifier audits those lists together, drops dismissals proven by local checks, and sends every contested bug or shaky self-dismissal to a dedicated parallel verification agent with a symmetrical rule: neither a bug claim nor a dismissal is accepted without concrete code proof across all call sites. The final report is written like a human maintainer asking questions on a Linux mailing list.
Seven months of production data show that maintainers pay attention. Sashiko does about 1,200 reviews per day across over 100 kernel mailing lists; more than 75 subsystem lists have opted in, and over 1,500 kernel developers have replied, with pushback on false alarms driving fixes to the prompts and verification engine. LWN.net recently described Sashiko as an important part of kernel development and the top bug reporter of issues in the 7.2 release cycle. When Sashiko flags a bug in a proposed patch, authors typically fix it in the next revision before merge, which is why prevented bugs leave no trace in git history. The countable portion is fixes for preexisting bugs Sashiko found as a byproduct: Sashiko is credited in over 2,000 mainline kernel commits and in 528 Linux kernel CVEs in 2026.
The strongest evidence is the post-merge fix rate. Across the 18 kernel releases before Sashiko (Linux 6.2 through 6.19, 254,000 commits), an average of 3.4% of merged commits required a follow-up fix within 60 days. Since rollout, that fell to 2.8% in Linux 7.1 and 2.2% in Linux 7.2, a 35% drop, with the 30-day fix rate falling from 2.3% to 1.4%. The source cautions that many other factors influence release-to-release numbers, so Sashiko cannot be solely credited for the whole drop. The per-patch signal is cleaner: across 21,500 tracked mainline commits, patches with a clean review needed a follow-up fix within 60 days only 0.9% of the time, less than a third of the historical baseline, while patches merged despite a critical warning needed a fix 7.6% of the time, an 8x higher risk (6.3x after adjusting for patch size). Linus Torvalds wrote a few weeks after launch that Sashiko is quite good, often asks the right question even when it flags something unnecessary, and has produced deep, subtle, fully correct reports.
What the team learned: benchmark-driven development beats intuition. They built a benchmark from nearly 1,000 real Linux kernel bugs that had passed human review, merged, and later had to be fixed, and used it to evaluate every major Sashiko change; with the new Gemini 4 Carbon model at high thinking, Sashiko catches 75.8% of bugs that human reviewers missed. Coding agents are not great at reviewing their own code: models optimize for a working solution within a token budget, but in large codebases the functional solution is often only 5-10% of the work, and external review catches integration problems and subtle regressions. Open source and shared community ownership built trust. Anyone can run Sashiko with different models, customized prompts, or on non-Linux projects; the project’s early review prompts came from open-source work by Chris Mason, and more than 100 contributors, including prominent kernel developers, have since improved them. Engineers increasingly run local or corporate private Sashiko instances inside coding-agent loops, and the team uses the same workflow on Sashiko itself (Sashiko for Sashiko).
Although Sashiko started in the Linux kernel, the need for an agentic trust layer applies across critical open-source software. Because the core review engine does not depend on C or kernel-specific rules, the Linux kernel playbook (an open verification pipeline, community-owned domain guides, and a benchmark mined from historical fixes) can likely be applied to projects such as GCC, LLVM, or Git.

