How to remove Co-Authored-By from Claude Code commits
Thomas Poulain Ā·
To remove the signature Claude Code adds to your commits and pull requests, set the attribution key to false in your settings.json. The Co-Authored-By trailer goes away from commits and the āGenerated with Claude Codeā line goes away from PRs, session link included. The false value works since v2.1.281. The attribution key itself replaced the older includeCoAuthoredBy in v2.0.62.
A rule in your CLAUDE.md file works too. The last section covers when it wins.
What does Claude Code add to commits and PRs?
With nothing configured, Claude Code adds three things, each controlled by its own sub-key.
Where
Default text
Sub-key
Commit message
Co-Authored-By: <name> <noreply@anthropic.com>
attribution.commit
PR description
š¤ Generated with [Claude Code](https://claude.com/claude-code)
attribution.pr
Commits and PRs from cloud and Remote Control sessions
The claude.ai session link, as a Claude-Session trailer on commits
attribution.sessionUrl
The name is the model in use when the commit is made, such as Claude Sonnet 5. When a subagent makes the commit, the trailer names the subagentās model. If Claude Code recognizes a Claude model but canāt confirm its exact version, it writes Claude alone. For a model it canāt match, like a third-party model behind a custom ANTHROPIC_BASE_URL, it writes Claude Code.
How do I remove all attribution?
One line does it.
{ "attribution": false}
Pick the file by how far you want it to reach. ~/.claude/settings.json applies to every project on your machine. .claude/settings.json, committed to the repo, applies to the whole team. .claude/settings.local.json applies only to you, in that one project.
For a single session, pass the setting at launch.
claude --settings '{"attribution": false}'
Why avoid false in a shared settings file?
Claude Code versions older than v2.1.281 reject the false value and skip the whole settings file that holds it. In your teamās .claude/settings.json, a teammate on an older version would lose the projectās permissions, hooks and every other setting in that file.
In a file that several versions read, the docs recommend the object form, which hides everything the same way.
An empty string hides that part of the attribution, and sessionUrl: false drops the session link.
How do I replace the signature instead of removing it?
Put your own text in commit or pr. For commit, the string holds everything added to the message, trailers included. This example from the docs replaces the trailer, removes PR attribution and drops the session link.
{ "attribution": { "commit": "Generated with AI\n\nCo-Authored-By: AI <ai@example.com>", "pr": "", "sessionUrl": false }}
Once you set commit or pr, Claude Code ignores includeCoAuthoredBy and uses its default text for whichever of the two you didnāt set. If you move from includeCoAuthoredBy: false to a custom commit, also add "pr": "", or the line comes back in your PRs.
What about the old includeCoAuthoredBy setting?
It has been deprecated since v2.0.62, but Claude Code still reads it. "includeCoAuthoredBy": false drops the commit trailer and the PR text, as long as attribution sets neither commit nor pr. It doesnāt cover the session link. For a new configuration, use attribution.
Why does the signature come back after I set it?
A higher-priority file sets it. The order runs from managed settings at the top, then --settings, then the local file, the project file and finally your user file. A value in your teamās .claude/settings.json wins over your ~/.claude/settings.json.
Your organization sets it in managed settings. Nothing in your own files overrides it, and neither does a CLAUDE.md rule.
Your file was skipped. With false on a version older than v2.1.281, the whole file is dropped. /status lists the loaded files on its Setting sources line, and claude doctor shows rejected entries.
You changed CLAUDE_CODE_ATTRIBUTION_HEADER. That variable doesnāt touch your commits. It removes a block at the start of the system prompt that carries the client version and a prompt fingerprint.
Claude Code tells Claude that a rule in your CLAUDE.md or memory, like āno Co-Authored-By in commitsā, takes precedence over the lines attribution sets, unless those lines come from managed settings. Since v2.1.269, the attribution reminder no longer overrides those rules.
The setting applies to the next commits. For a commit you already made and havenāt pushed, git commit --amend lets you rewrite its message.