[FEATURE] Use `Assisted-by` git commit trailer instead of `Co-authored-by`

Status Open
Maintainer reply None cached
Activity 6 comments · opened Mar 19, 2026

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

Hi,

I've seen people contributing to my projects using Claude Code and these git commits include the Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> trailer. (example).

Proposed Solution

I think it'd be more appropriate to use Assisted-by trailer as it's recommended by several big projects:

Alternative Solutions

I know this could be configured, I'm asking for changing the default so it doesn't need to be configured.

Priority

Medium - Would be very helpful

Feature Category

API and model interactions

Use Case Example

  1. Someone is creating commits using Claude Code
  2. They include correct Assisted-by git trailer instead of Co-Authored-By.

Additional Context

More context and in depth discussion of this is at https://fabiorehm.com/blog/2026/03/02/our-coding-agent-commits-deserve-better-than-co-authored-by/

View original on GitHub ↗

6 Comments

yurukusa · 5 months ago

A git commit-msg hook can automatically convert the trailer:

sed -i 's/^Co-Authored-By:/Assisted-by:/' "$1"

Or use a Claude Code PostToolUse hook to amend after commit:

CMD=$(cat | jq -r '.tool_input.command // empty' 2>/dev/null)
if echo "$CMD" | grep -qE 'git commit' && ! echo "$CMD" | grep -q 'amend'; then
    MSG=$(git log -1 --pretty=%B)
    if echo "$MSG" | grep -q 'Co-Authored-By'; then
        NEW_MSG=$(echo "$MSG" | sed 's/Co-Authored-By:/Assisted-by:/')
        git commit --amend -m "$NEW_MSG" --no-verify 2>/dev/null
        echo "[Trailer] Replaced Co-Authored-By with Assisted-by" >&2
    fi
fi
exit 0

Or prevent the trailer entirely and add your preferred one via CLAUDE.md:

When committing, use 'Assisted-by: Claude (Anthropic)' instead of 'Co-Authored-By'.
wiktor-k · 5 months ago
A git commit-msg hook can automatically convert the trailer:

Yes, I understand that this can be worked around with a couple of hacks. The issue is about changing the default so I wouldn't have to modify all projects and ask all my contributors to do the same.

Or prevent the trailer entirely and add your preferred one via CLAUDE.md:

I already have such a suggestion in CONTRIBUTING.md which I hope is read by Claude (nothing against CLAUDE.md but this is additional litter in repos).

Thanks for your practical suggestions and have a nice day! 👋

greogory · 4 months ago

The Assisted-by proposal is a reasonable compromise for users who want attribution, but the core issue remains: any trailer must be opt-in, not opt-out.

Co-Authored-By specifically implies shared authorship and shows up in GitHub's contributor graphs. Assisted-by at least avoids that misrepresentation. But neither should be injected without explicit user consent.

As of 2026-04-13, the system prompt still hardcodes the Co-Authored-By instruction regardless of user settings. The attribution.commit: "" config documented in #45137 doesn't work either.

greogory · 4 months ago

I want to walk back my earlier +1 on this and explain why I've changed my position to a thumbs-down on the proposal itself (not on the author's intent, which I understand).

The problem with proposing Assisted-by as an alternative is that it implicitly accepts the premise that some form of tool-injected trailer belongs in git commit messages by default. It doesn't. No other development tool does this — not IDEs, not linters, not formatters, not CI systems, not even other AI coding tools unless configured to do so.

Renaming the trailer from Co-Authored-By to Assisted-by makes the attribution slightly more honest, but it doesn't address the fundamental issue: a paid tool should not be writing anything into the user's git history that the user didn't ask for. The trailer name is secondary. The consent model is the problem.

I worry that if Anthropic ships Assisted-by as a compromise, it gives them a way to say "we listened" while keeping the default behavior of injecting vendor branding into user commits. The real fix is simple: default to no trailer, let users who want attribution opt in.

I do appreciate the thoughtfulness of this proposal and the examples from other ecosystems — I just think the energy is better spent on getting the opt-out to actually work (#4287, #45137) and then flipping the default.

joshuagay · 2 months ago

Thanks @wiktor-k for filing this (and thanks for signstar!).

So, I agree with this suggestion, but, maybe frame the priority a little differently, though: dropping the Co-Authored-By trailer is worth doing on its own, regardless of whether it's replaced by anything.

Co-authored-by is a literal authorship assertion, and crediting an AI as an author or co-author is squarely at odds with how the U.S. Copyright Office treats AI authorship.

In its Copyright Registration Guidance: Works Containing Material Generated by Artificial Intelligence (Statement of Policy, 88 Fed. Reg. 16190, Mar. 16, 2023; 37 CFR Part 202), the Office states plainly (§IV.A):

Applicants should not list an AI technology or the company that provided it as an author or co-author simply because they used it when creating their work.

The same guidance treats AI as a tool, not a co-author. And that's exactly why Assisted-by is the more accurate trailer: it credits the human as the author and the model as the instrument, whereas Co-Authored-By asserts the one thing the guidance says not to assert.

One implementation note that I think argues for changing the default (not just documenting a setting): today the trailer is on by omission. If nothing is set in settings.json, the harness inserts the Co-Authored-By string by default. From the bundled attribution function (de-minified):

function wuH() {
  if (jUH() === "remote") {                                  // remote/cloud session path
    if (Y$.CLAUDE_CODE_SUPPRESS_SESSION_ATTRIBUTION)
      return { commit: "", pr: "" };                         // env-var off-switch (remote only)
    ...
  }
  let H = z7(),
      $ = QjH(H) !== null ? u36(H) : "Claude Opus 4.8",      // model name; default literal "Claude Opus 4.8"
      q = `🤖 Generated with [Claude Code](${dSH})`,          // the PR-body attribution
      K = `Co-Authored-By: ${$} <noreply@anthropic.com>`,    // the commit trailer (email hardcoded)
      _ = d6();                                              // resolved settings
  if (_.attribution) return {                                // newer schema:
    commit: _.attribution.commit ?? K,                       //   settings.attribution.commit ("" => none)
    pr:     _.attribution.pr     ?? q
  };
  if (_.includeCoAuthoredBy === false) return { commit: "", pr: "" };  // older switch => none
  return { commit: K, pr: q };                               // default: include it
}

The opt-outs (attribution, includeCoAuthoredBy: false) only fire for a user who already went looking for them. The default is the co-authorship claim. Given the guidance above, I'd argue the default simply shouldn't credit the model as a co-author out of the box; Assisted-by (or no trailer at all) would be both more accurate and a better default.

If it makes sense, I can file the removal of this default behavior in the compiled harness as a separate bug. Guidance from a maintainer on this would be greatly appreciated.

mzagaja · 1 month ago

A bunch of thoughtful comments in this thread have me personally considering where I land on this, and I think the Assisted-by convention adopted by the Linux kernel is both the most useful and honest version of this convention, and the one I encourage the Claude Code team to adopt by default.

@greogory makes a compelling case for dropping this convention entirely, but the case does not account for the difference in the role played by coding agents and assistants. For the most part other tools from text editors to documentation reference utilities are attention and utility aids. They cannot and do not generate actual code on their own. The reviewer of code need not be worried that EMACS or Vim has created a class or adopted an architectural approach that may not have been fully comprehended or understood by a reviewer. Coding agents introduce this new kind of risk. Assisted-by sits as a useful signal to the reviewer that the generated code may or may not reflect deliberate choices v. passive acceptance by the commit author.

Previous posters have recounted the reason Authored-by is a misnomer, both from a legal perspective and also from a moral perspective. Ultimately generating AI output requires prompting and some kind of input by a user. That input may include their own preferences and conventions in their CLAUDE.md, the use of reference tools setup as Plug-Ins and MCPs, and post commit linters and other checks. This is in addition to the novel prompting done at the start and potentially during the process of generating the code. Many tricks and tools exist to make it seem as if AI is acting on its own, but ultimately all require some sort of system to kick it off and direct how the output is created. Opus 5 cannot act, as lawyers would say, sua sponte. This lack of ability to independently start work is what distinguishes it as a tool versus being an "author" or "collaborator".

Finally I asked Opus 5 itself what it preferred and it shared the following:

I mildly prefer "Assisted-By," and the reason is practical rather than about credit. Co-Authored-By is a load-bearing trailer: GitHub resolves it to an account, it feeds contributor graphs, and it carries an implication that the named party is an author who could be asked "why did you do it this way?" six months later. I can't answer that. I don't remember the commit, can't be pinged on the regression, and can't hold copyright in most jurisdictions anyway. Whoever ran git commit made the judgment calls about what to keep, and git blame should land on them. Assisted-By describes the actual relationship without those implications, and it still preserves the provenance signal some teams genuinely want — useful if you later ask "which parts of this codebase came out of LLM sessions?" That said, I don't feel strongly, and I don't want credit for its own sake. The counterargument is real: Co-Authored-By is the established convention (Claude Code emits it by default), tooling already parses it, and inventing a trailer means nothing consumes it. If your team wants one grep-able marker and doesn't care about the semantics, consistency beats precision.