Agentic review of Linux Kernel code changes
Sashiko (刺し子, literally "little stabs") is a form of decorative reinforcement stitching from Japan. Originally used to reinforce points of wear or to repair worn places or tears with patches, here it represents our mission to reinforce the Linux kernel through automated, intelligent patch review.
Sashiko is an agentic Linux kernel code review system. It uses a set of Linux kernel-specific prompts and a special protocol to review proposed Linux kernel changes. Sashiko can ingest patches from mailing lists or local git. It's fully self contained (doesn't use any external agentic cli tools) and can work with various LLM providers.
If you are a kernel maintainer, please see our Guide for Kernel Maintainers for information on interacting with Sashiko.
Sashiko is not perfect, but in our measurements the quality of reviews is high: in our tests sashiko was able to find 53.6% (with Gemini 3.1 Pro) of bugs based on unfiltered last 1000 upstream commits with Fixed: tags. In some sense, it's already above the human level given that 100% of these bugs made it through human-driven code reviews and were accepted to the main tree. The rate of false positives is harder to measure, but based on limited manual reviews it's well within 20% range and the majority of it is a gray zone.
Please, note that as with any other LLM-based tools, Sashiko's output is probabilistic: it might find or not find bugs (or find other bugs) with the same input.
lore.kernel.org), GitHub PRs, and GitLab MRs for new patch submissions.Sashiko uses a multi-stage review protocol to evaluate patches thoroughly from multiple perspectives, mimicking a team of specialized reviewers.
Stages are identified by name. The analysis stages run in parallel; the consolidation stages then run in sequence over what they produced.
Analysis stages. goal, implementation and execution-flow always run.
The planning stage decides which of the rest a patch warrants, and --stages
overrides that choice by name.
Consolidation stages, in order:
Also Sashiko is using per-subsystem and generic prompts, initially developed by Chris Mason:
Before using Sashiko, please be aware of the following:
Sashiko operates by sending patch data and potentially extensive portions of the Linux kernel git history to your configured Large Language Model (LLM) provider.
Running an automated review system like Sashiko can be computationally expensive and may incur significant API costs.
cargo install sashikogit clone --recursive https://github.com/sashiko-dev/sashiko.git
cd sashikoNote: The --recursive flag is important to initialize the linux kernel source submodule.
Copy Settings.toml to customize your configuration. For a full reference of every
setting, see the Configuration Reference. The default Settings.toml includes sections for:
sashiko.db).[forge], the NNTP (mailing list) ingestor is disabled by default. If you need to monitor both, set disable_nntp = false in the [forge] section of your config.Sashiko supports multiple LLM providers. To get started with the default (Gemini):
cp docs/examples/Settings.example.toml Settings.toml
export LLM_API_KEY="your-api-key-here"When installed with cargo install, create the user config with:
sashiko initThis writes ~/.config/sashiko.toml by default. Use sashiko init --print
to print the template or sashiko init --path to choose a different
location.
For Claude, Claude Code CLI, GitHub Copilot CLI, AWS Bedrock, Vertex AI, Kiro CLI, Devin CLI, goose, and OpenAI-compatible endpoints, see the LLM Provider Configuration Guide.
cargo build --releaseSashiko requires a configuration file to run (usually ~/.config/sashiko.toml or ./Settings.toml). You can initialize a default configuration with:
sashiko initSashiko can be run in two modes: Local Review (standalone, no daemon required) or as a Daemon (for automated monitoring, web UI, and team integration).
Sashiko can review your patches locally without starting the daemon, sending emails, or updating the database.
Run it from the Linux source checkout containing the commits to review:
# Review the latest commit
sashiko review
# Review a range of commits
sashiko review HEAD~3..HEADThis mode:
For local review, Sashiko loads settings from ./Settings.toml if it exists in the current directory, otherwise from ~/.config/sashiko.toml. Use --settings to point to a specific settings file.
The daemon is responsible for monitoring mailing lists (NNTP), managing the database, and coordinating the AI review process. It also provides a Web UI and an API.
To start the daemon:
sashiko(Or from source: cargo run, or via Nix: nix run github:sashiko-dev/sashiko)
Once the daemon is running, you can access the Web UI. The daemon will print the URL to access it from localhost.
The CLI tool sashiko-cli allows you to interact with a running Sashiko daemon.
# Submit patches to the running daemon
sashiko-cli submit HEAD~3..HEAD
# Check review status
sashiko-cli show latest(From source: cargo run --bin sashiko-cli -- [OPTIONS] [COMMAND], or via Nix: nix profile add github:sashiko-dev/sashiko)
For the full command reference, see the CLI Reference.
Sashiko includes a benchmark tool to evaluate review quality against known bugs. See the Benchmarking Guide for setup and usage.
Sashiko implements stateless JWT-based authorization and login via sign-in links.
API mutations are strictly controlled by a fine-grained, capability-based Access Control List (ACL) configured in Settings.toml ([server.acl]). Administrators assign user identities directly to specific capability arrays (ingest, cancel, review), adhering strictly to the principle of least privilege. Two further arrays cover the Linux kernel bug tracker: security lists the kernel security list, whose members read and comment on every bug and read the raw AI transcripts without gaining any other capability, and bug_reporters lists the principals permitted to file a bug over HTTP, which ships empty so that only admins can. Authority over an individual bug is not a capability array: it is resolved per request from MAINTAINERS, so a maintainer reaches exactly the bugs filed against the subsystems they are listed for. In addition, an explicit blocklist array denies access unconditionally, taking precedence over every capability, over admin rights and over every bypass. If the ACL configuration is omitted or the arrays are empty, the server transparently falls back to a completely secure, "Fail-Closed" mode where no remote mutations are permitted.
The server operates without persistent traditional user accounts and retains no user data aside from the explicit comments, actions, and review history metadata submitted directly onto the hosted bugs.
We welcome contributions and feedback through two main channels:
No open issues yet, or sync has not completed.