Remove or customize the Co-Authored-By trailer Claude Code adds to commits with the attribution setting
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.
Contents
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
attributionand their defaults - The configuration that hides everything, and one that swaps in your own trailer
- How the deprecated
includeCoAuthoredByinteracts 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-key | Type | Default when unset | Meaning |
|---|---|---|---|
commit | string | a git trailer such as Co-Authored-By | the trailer appended to commit messages |
pr | string | the standard attribution text | the line added to PR descriptions |
sessionUrl | Boolean | true | the 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.
| State | Behavior |
|---|---|
an older file with only includeCoAuthoredBy: false | still honored; both trailer and PR line are omitted |
attribution.commit or attribution.pr set | includeCoAuthoredBy is ignored, and whichever of the two you left unset uses its default text |
includeCoAuthoredBy: true | same 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
attributioncontrolscommit(trailer),pr(PR line), andsessionUrl(session link) separately- To hide everything, set
commitandprto empty strings andsessionUrltofalse - To replace, put any string in
commit, with\nfor line breaks andKey: valuetrailers includeCoAuthoredByis deprecated since v2.0.62 and ignored onceattributionis 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.