answered from live GitHub & Hugging Face data
How do I use Co-authored-by trailer for commits from AI coding agents like Copilot?
Copilot cloud agent already adds the co-author trailer for you, so you only add it yourself for other agents.
Copilot cloud agent (GitHub-run)
You do not add a trailer for Copilot cloud agent commits. GitHub documents this behavior:
"Copilot cloud agent's commits are authored by Copilot, with the developer who assigned the issue or requested the change to the pull request marked as the co-author."
Its commits are also signed, so they show as "Verified." Each agent-authored commit links to the session logs. Source: Risks and mitigations for GitHub Copilot cloud agent.
Your own agent (Claude Code, Codex, Cursor, or a script)
Use the Co-authored-by trailer with this format:
- Write the subject line and a short body.
- Add one empty line.
- Add one line for each co-author:
Co-authored-by: name <email>.
The GitHub docs show this command-line form:
git commit -m "Refactor usability tests.
>
> Co-authored-by: NAME <NAME@EXAMPLE.COM>"
Rules from the same GitHub page:
- Use the email address linked to the person's GitHub.com account. Only then does the commit count toward their contributions.
- If the person keeps their email private, use their GitHub
no-replyaddress. - Use GitHub Desktop or the web editor if you prefer a form. Both accept the same trailer lines.
Source: Creating a commit with multiple authors.
To add the trailer from a script, use git interpret-trailers. It adds a trailer after the existing trailer block and inserts the blank line when needed. Its --trailer, --if-exists, and --if-missing options control duplicates (git-interpret-trailers).
Linux kernel convention: a different trailer
The Linux kernel does not use Co-authored-by for AI tools. Its rules differ:
- AI agents must not add
Signed-off-by. Only a human can certify the Developer Certificate of Origin. - Add an
Assisted-bytrailer in this format:Assisted-by: LLM [TOOL1] [TOOL2].
Source: AI Coding Assistants.
Recommendation
- For Copilot cloud agent: Do nothing. GitHub adds the trailer and the signature.
- For another agent on a project that uses GitHub: Add
Co-authored-bywith the accountable human's GitHub email. Usegit commitwith the format above. - For a Linux kernel patch: Use
Assisted-by, and add your ownSigned-off-by.
I did not check the contribution-graph behavior for an agent identity. I did not find documentation that says a Co-authored-by entry for a bot account counts toward anyone's graph.
If you run several agents, githug gives each agent its own key. Its commits are authored as the agent, with trailers that name the accountable human. Adding Co-authored-by for the human is opt-in and off by default.