The Linux kernel development community is grappling with a persistent administrative headache: inaccurate Fixes: tags. In kernel patches, a Fixes: tag is meant to point directly to the commit that originally introduced a bug. However, tracing these origins is notoriously tricky. Often, the last commit to touch a buggy line of code did not actually cause the underlying problem—it may have merely relocated the code to a new file during a refactoring phase.
To combat this widespread issue, Sasha Levin, a co-maintainer of the stable and long-term support (LTS) kernel trees, has proposed a novel solution leveraging artificial intelligence. Levin wants to harness AI coding assistants to rigorously verify which commit genuinely introduced a bug before allowing developers to assign it a Fixes: tag.
Levin recently submitted a two-phase patch series to the kernel’s workflows and ksummit mailing lists. The proposal introduces a dedicated agents directory within the primary kernel source tree to house specialized AI skills, prompts, and resources designed to assist developers with complex code attribution tasks.
The New Directory and Agent Framework
The first patch in Levin’s proposed series creates an agents/ directory at the top level of the kernel source tree. This directory is intended to serve as a centralized repository for resources tailored to coding assistants, complete with a dedicated MAINTAINERS entry to oversee its contents.
Under this new structure, each distinct AI skill receives its own isolated folder beneath agents/skills/. Each skill relies on a primary SKILL.md file as its entry point, strictly adhering to the established Agent Skills format. AI assistants operating within the repository are instructed to read resources directly from their explicit file paths, ensuring that any internal links remain relative to the specific skill’s folder. Furthermore, a newly drafted section within the kernel’s official documentation for coding assistants outlines this repository layout.

The second patch introduces the very first capability to this directory: the find-fixes skill.
The origin of this initiative traces back to a discussion sparked by Ted Ts’o, who raised concerns regarding incorrect attribution tags within stable tree maintenance work. Ts’o pointed toward emerging Large Language Model (LLM) workflows as a potential mechanism to accurately track down the correct historical commits.
Elaborating on the background, Ts’o explained that the request stemmed from a conversation with Hannes Reinecke, who estimated that a staggering 15 to 20 percent of all Fixes: tags submitted to the kernel are fundamentally incorrect.
This margin of error extends far beyond mere bookkeeping or administrative tidiness. The Fixes: tag is the critical mechanism that stable maintainers and downstream Linux distribution packagers rely upon to determine which specific kernel versions require a given bug fix. An erroneous tag can inadvertently route a critical patch to the wrong kernel branches, leaving vulnerable systems unpatched or destabilizing stable environments with misplaced code.
The newly proposed find-fixes skill is designed to parse deep Git history and return a thoroughly verified proposed tag alongside concrete evidence, leaving the underlying commit untouched and under human control.

According to the skill’s accompanying guide.rst file, no single clue can definitively settle which commit a Fixes: tag should name—not even a pre-existing tag. Instead, the AI agent is instructed to systematically explain how a bug fails, trace candidate historical commits, and rigorously compare each candidate against its respective parent state.
The analytical framework separates the initial commit that added the code, the distinct commit that rendered it defective, and any subsequent modifications that merely exposed the latent flaw. For backported fixes, the tool checks whether a bug originated from the original upstream change or from how that change was subsequently adapted for compatibility with an older kernel branch. Complicated scenarios involving merges, reverts, and incomplete historical records receive specialized handling.
Crucially, when the agent cannot definitively establish a bug’s true origin, it refuses to guess. It returns no tag at all, instead listing the viable candidates alongside a detailed breakdown of the missing information, leaving the fix as a draft until a human developer can resolve the ambiguity.
A Work in Progress
The second patch in Levin’s series also proposes updating the kernel’s official coding assistants documentation. It would mandate that an assistant strictly follow the new analytical guide before finalizing a bug fix, drafting its commit message, or reviewing an existing attribution tag.
While the documentation update would modify the workflow for committing a fix by asking for a verified tag rather than a standard Fixes: tag, the boundaries of the AI’s role are strictly defined. The skill itself will not automatically write commit messages, apply tags to patches, or make independent decisions about whether a given fix belongs in a stable release tree.

This initiative follows closely on the heels of Levin’s earlier efforts to establish a formal policy for AI coding assistants within the Linux kernel, as well as his separate proposal for a kernel killswitch.
Despite the technical promise of the find-fixes skill, several logistical details remain under active discussion within the mailing lists. In the introductory patch message, Levin noted that he was still weighing whether these agent files should reside under the standard Documentation hierarchy or be housed in a separate, dedicated agents directory at the root of the source tree.
During the mailing list discussions, veteran kernel maintainer Greg Kroah-Hartman questioned whether the proposed patch series would address underlying tools that skip kernel guidance simply because a standard AGENTS.md configuration file happens to be missing. Levin clarified that this particular challenge represents a distinct, separate issue that will need to be addressed by a forthcoming symlink patch.
Leave a Reply