Remove or customize the Co-Authored-By trailer Claude Code adds to commits with the attribution setting

Claude Code Published:

How to hide or rewrite the Co-Authored-By commit trailer and the PR attribution line with the attribution setting (commit, pr, sessionUrl), plus the deprecated includeCoAuthoredBy.

Verified on Sep 10, 2026 These tools change quickly. Please also check the latest official documentation.
Contents
  1. The shape of attribution
  2. Hiding everything
  3. Using your own trailer
  4. Relationship to includeCoAuthoredBy
  5. Summary

When Claude Code makes a commit, it appends a trailer such as Co-Authored-By: Claude <noreply@anthropic.com>, and pull request descriptions get a "Generated with Claude Code" line. Plenty of teams want a different signature, or none at all.

In short: the attribution key in settings.json lets you change or hide the commit trailer (commit), the PR line (pr), and the session link (sessionUrl) independently.

KEY POINT

What you will learn

  • The three sub-keys of attribution and their defaults
  • The configuration that hides everything, and one that swaps in your own trailer
  • How the deprecated includeCoAuthoredBy interacts with it

The shape of attribution

attribution is an object: commit and pr are strings, sessionUrl is a Boolean. It can live in any settings file.

Sub-keyTypeDefault when unsetMeaning
commitstringa git trailer such as Co-Authored-Bythe trailer appended to commit messages
prstringthe standard attribution textthe line added to PR descriptions
sessionUrlBooleantruethe claude.ai session link on cloud and Remote Control commits

用語解説

git trailer: Key: value metadata at the end of a commit message. git interpret-trailers reads and writes it mechanically, and GitHub recognizes Co-Authored-By as a co-author credit.

Hiding everything

This removes the commit trailer and the PR line and omits the session link.

{
  "attribution": {
    "commit": "",
    "pr": "",
    "sessionUrl": false
  }
}

An empty string hides commit or pr. If you set only one, the other keeps its default text.

Using your own trailer

The official example replaces the commit attribution, removes the PR attribution, and drops the session link.

{
  "attribution": {
    "commit": "Generated with AI\n\nCo-Authored-By: AI <ai@example.com>",
    "pr": "",
    "sessionUrl": false
  }
}

Line breaks inside commit are written as JSON \n. Lines you want treated as trailers should follow a blank line and use the Key: value form, as in the example.

For a team-wide standard, commit the setting in .claude/settings.json. For a personal preference, use ~/.claude/settings.json. The settings layers are explained in Designing permissions in settings.json.

Hiding the trailer is not the same as disclosure policy

attribution only controls the text Claude Code adds automatically. Some organizations and open source projects require disclosure of AI-generated changes. Check the project's CONTRIBUTING guidance before removing it.

Relationship to includeCoAuthoredBy

includeCoAuthoredBy: false used to remove both the trailer and the PR line. The key was deprecated in v2.0.62, replaced by attribution.

StateBehavior
an older file with only includeCoAuthoredBy: falsestill honored; both trailer and PR line are omitted
attribution.commit or attribution.pr setincludeCoAuthoredBy is ignored, and whichever of the two you left unset uses its default text
includeCoAuthoredBy: truesame as unset

For new configuration, use attribution and remove includeCoAuthoredBy so the two cannot combine in unexpected ways. A related key, includeGitInstructions: false, removes the built-in commit and PR instructions from the system prompt altogether. For running Claude Code in automation where these settings matter most, see Running Claude Code headless in CI.

Summary

  • attribution controls commit (trailer), pr (PR line), and sessionUrl (session link) separately
  • To hide everything, set commit and pr to empty strings and sessionUrl to false
  • To replace, put any string in commit, with \n for line breaks and Key: value trailers
  • includeCoAuthoredBy is deprecated since v2.0.62 and ignored once attribution is set
  • Check the project's AI disclosure policy before removing attribution

FAQ

How do I stop the Co-Authored-By trailer?
Set attribution.commit to an empty string in settings.json. To drop the PR line too, set attribution.pr to an empty string, and set sessionUrl to false to omit the session link.
Does includeCoAuthoredBy: false still work?
It was deprecated in v2.0.62 but is still honored in older settings files. Once you set attribution.commit or attribution.pr, it is ignored.
Can I use my company's own trailer?
Yes. Put any string in attribution.commit. Write line breaks as \n and keep the Key: value trailer format so git interpret-trailers can parse it.

Primary sources

This article was drafted by AI from official documentation and reviewed by the site operator before publishing. Found a mistake? Let us know via the contact page.