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:

  1. Write the subject line and a short body.
  2. Add one empty line.
  3. 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:

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:

Source: AI Coding Assistants.

Recommendation

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.

docs.github.com/en/pull-requests/how-tos/commit-changes/creating-a-commit-with-multiple-authorsdocs.github.com/en/copilot/concepts/security-governance-and-network-settings/risks-and-mitigationsdocs.kernel.org/process/coding-assistants.htmlgit-scm.com/docs/git-interpret-trailers
Answered live from GitHub & Hugging Face · anthropic/claude-haiku-5.5 · 10/12/2026

Ask your own open-source question →