Disclosing AI help in commits
Short answer
Add the trailer your project names, usually Assisted-by, as the last line of the commit message, and say in the pull request what the tool did and how you checked it.
Mesa and the Linux kernel ask for an Assisted-by trailer, and Mesa reserves Co-authored-by for human co-authors. The kernel says AI agents must not add Signed-off-by, because only a person can certify the Developer Certificate of Origin. LLVM expects substantial tool-generated content to be labelled. Some projects ban generated code outright, and no label makes it acceptable there.
Three trailer conventions
- Assisted-by Asked for by the Linux kernel; suggested by Mesa when AI made decisions or generated parts of the code; given as an example by LLVM. Linux kernel, AI Coding Assistants
- Generated-by Mesa's label for when almost all the code in a commit was generated. Mesa, Submitting Patches
- Co-authored-by GitHub reads it to list co-authors; Mesa says not to use it for AI because it is reserved for humans. GitHub Docs
What is a commit trailer?
A trailer is a key and value at the end of a commit message. The git-interpret-trailers manual defines a trailer, in its simplest form, as a key-value pair with a colon as a separator, and says the trailer block must be preceded by a blank line. Signed-off-by, Reviewed-by and Co-authored-by are all trailers. Git itself does not assign them meanings; projects and hosting services do.
Because trailers are structured, a project can search its history later. The command git interpret-trailers can add a trailer to a message file with --trailer and --in-place, and print a commit's trailers with --parse.
Should AI help go in Co-authored-by or Assisted-by?
Co-authored-by is the trailer GitHub reads. GitHub's guide to commits with multiple authors says to add one Co-authored-by line per co-author, with a name and email address, and that the commit counts as a contribution only when the email is associated with the co-author's GitHub account. The trailer was designed for people with accounts.
Use Assisted-by unless the project says otherwise. Mesa's Submitting Patches page says not to use the Co-authored-by tag because it is reserved for human co-authors. Mesa suggests Assisted-by, naming the tool and optionally the model, when AI was involved in making decisions or generated parts of the code, and Generated-by when almost all the code was generated. Mesa requires disclosure whenever AI was involved in the creative process, except for trivial changes that would not be copyrightable anyway and mechanical changes such as autocomplete or renaming a variable.
The Linux kernel uses the same key. Its AI Coding Assistants page says contributions should include an Assisted-by tag, which may also list specialised analysis tools such as coccinelle or sparse, while basic tools like git, gcc, make and editors should not be listed. The same page says AI agents must not add Signed-off-by tags, because only humans can legally certify the Developer Certificate of Origin, and the human submitter takes full responsibility for the contribution.
What should the pull request say?
The kernel's guidelines for tool-generated content list what a transparent submission can include: which tools were used, the input given to them, the prompts or a summary of them for longer sessions, which portions were affected, and how the change was tested. That is more than most projects require, and it makes review faster.
LLVM's AI Tool Use Policy says contributors are expected to be transparent and label contributions that contain substantial amounts of tool-generated content, in the pull request description, the commit message, or wherever authorship is normally indicated, and gives an Assisted-by trailer as an example. LLVM also requires a human in the loop: contributors must read and review all LLM-generated code before asking others to review it.
A disclosure line does not make a contribution acceptable; it tells the reviewer what to look at.
How do you make it a team habit?
Write the convention into your contributing guide and your pull request template, using the exact key, capitals and hyphen included. Put the same instruction in any rules file your assistants read, so they add the trailer themselves. A commit-msg hook can check for it before a push.
Keep Co-authored-by for people, never let a tool add Signed-off-by for you, and read the final message with git log -1 before you push.
How we checked
Checked on 2026-10-15 by the CodeLifter editors: the git-interpret-trailers manual, GitHub's page on commits with multiple authors, Mesa's Submitting Patches page, the Linux kernel's AI Coding Assistants and Tool-Generated Content pages, and LLVM's AI Tool Use Policy. We quoted or paraphrased only what those pages state. Project rules change; the policy tracker records when each was last checked. Drafted with AI assistance; every claim checked against its source.
Questions and answers
What does Co-authored-by mean in a git commit?
It is a commit trailer that credits an additional author. GitHub lists each co-author on the commit when the email matches a GitHub account. Git itself treats it as plain text.
Should I add an AI tool as Co-authored-by?
Not where a project follows Mesa's rule, which reserves Co-authored-by for human co-authors. Mesa, the Linux kernel and LLVM point to Assisted-by instead.
Can an AI agent sign off a commit?
No, under the Linux kernel's rules: AI agents must not add Signed-off-by tags, because only humans can legally certify the Developer Certificate of Origin.
Do I need to disclose autocomplete suggestions?
Usually not. Mesa exempts mechanical changes such as autocomplete and variable renaming, and the kernel's guidelines exclude typing aids like identifier completion.
Where should the disclosure go: commit message or pull request?
Both work. LLVM names the pull request description, the commit message, or wherever authorship is normally shown. A commit trailer stays with the history if the code moves host.
Can I add trailers to old commits?
Only by rewriting history, which changes commit hashes. Note it in the pull request instead.
Does disclosing AI help change who owns the code?
No. A trailer records how the code was made; ownership depends on copyright law, the tool's terms and any matching public code.
Sources
An editor checked every claim on this page against these sources on 2026-10-15. If a source has changed since, the source is the authority.

