Back to blog

Claude Code Attribution: Remove Co-Authored-By (2026)

Claude Code adds Co-Authored-By trailers and PR footers. Turn them off with the 2.1.281 attribution setting: boolean and object forms, scopes, and the old key.

24 de set. de 2026

Every commit Claude Code makes used to carry a passenger: a Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> trailer you never typed, plus a 🤖 Generated with Claude Code line at the top of every pull request description. For most of 2026 the only answer was a forum workaround, and the threads kept coming — "How do you stop Claude from adding Co-Authored-By?" has been a recurring front-page complaint since the 2.1.257 builds started stamping harder.

That changed on September 23, 2026, when Claude Code 2.1.281 shipped a first-class kill switch: an attribution setting in settings.json that hides, edits, or replaces every commit and PR credit. The catch is that the official docs spread it across four keys and one deprecation notice, and the boolean shorthand only works on new builds — so a team on mixed versions can silently lose the setting.

This post is the complete map: the one-liner, the version-safe object form, the per-surface switches (commit only, PR only, session links), the deprecated key that still works, and how to verify each one actually took effect.

Quick answer

  • One-line fix (Claude Code 2.1.281+): put "attribution": false in settings.json — hides the commit trailer, the PR footer, and session links in one go.
  • Version-safe fix: use the object form — { "commit": "", "pr": "", "sessionUrl": false } — in files shared with older CLI versions.
  • Still on an older build? "includeCoAuthoredBy": false is deprecated but still honored on current versions.
  • Surgical option: keep the commit trailer but drop the PR footer (or vice versa) by setting just one of attribution.commit / attribution.pr.

What Claude Code actually adds

SurfaceDefault textControls it
Git commitCo-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> — the model name in your sessionattribution.commit
Pull request🤖 Generated with [Claude Code](https://claude.com/claude-code) at the top of the descriptionattribution.pr
Cloud commitsA Claude-Session trailer linking the claude.ai transcript (cloud and Remote Control sessions)attribution.sessionUrl

Two details worth knowing before you delete anything:

  • The trailer's model name is dynamic. On a recognized Claude model you get Claude Sonnet 5 or Claude Opus 5.5; when the model ID doesn't match a known Claude model — for example when you point ANTHROPIC_BASE_URL at a router or a DeepSeek endpoint — it degrades to a generic Co-Authored-By: Claude Code.
  • Claude Code is told that your own attribution instructions (a line in CLAUDE.md, a memory rule) take precedence over its commit and PR lines — unless the line comes from managed settings, which always win.

The one-line fix

Drop this into any of your settings files:

{
  "attribution": false
}

That hides all commit and PR attribution — the Co-Authored-By trailer, the PR footer text, and the Claude-Session cloud-session link. It is the shorthand the 2.1.281 changelog entry describes: "Added \"attribution\": false in settings.json to hide all commit and PR attribution."

Where the file goes depends on how far the setting should reach:

FileScope
~/.claude/settings.jsonYou, in every project
.claude/settings.jsonEveryone who clones the repo (check it in)
.claude/settings.local.jsonJust you, in this repo (gitignored by convention)
Managed settingsYour org's administrator — overrides everything

For "I never want my name next to Claude's, anywhere," the user file is the right home. For "this open-source repo wants a clean git log regardless of who commits," put it in the checked-in project file.

The version-safe object form

The 2.1.281 changelog carries a warning alongside the new shorthand: older CLI versions skip a settings file holding it. If your team (or your CI image, or that one server nobody upgrades) runs a pre-2.1.281 build, use the object form instead — every current version understands it:

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

An empty commit string removes the trailer; an empty pr string removes the footer text; sessionUrl: false drops the session link from cloud commits and PRs. Same net effect as the boolean, at the cost of three lines.

The object form is also how you do surgical edits rather than removal. Both fields accept custom text:

{
  "attribution": {
    "commit": "Co-Authored-By: Atlas (agent) <atlas@example.com>"
  }
}

That replaces the default trailer with your own — useful when your team convention wants the agent named but not as a co-author, or when you are routing Claude Code through a different model and want the trailer to say what actually did the work.

The deprecated key that still works

Before 2.1.281, the answer floating around every thread was:

{
  "includeCoAuthoredBy": false
}

It still works — current versions honor it, and false omits both the commit trailer and the PR attribution text. But it is now formally deprecated, and the precedence rule matters: once you set attribution.commit or attribution.pr, Claude Code ignores includeCoAuthoredBy. If you set the old key months ago and are migrating, delete it when you add the new one, or you will end up debugging two sources of truth.

Verifying it worked

Attribution settings only affect new work. Check the next thing Claude Code produces:

# After a Claude Code commit:
git log -1 --format=%B
# Clean: no Co-Authored-By trailer. PR check: open the description.

# What a raw message looks like when the trailer is still on:
git log -1 --format=%B | tail -2

Two expectations to set:

  • Existing history is untouched. Commits from before the change keep their trailers forever unless you rewrite history (git rebase / git filter-repo) — which is a team decision, not a settings change.
  • Squash merges surface the trailer anyway if the branch's last commit had one. The setting prevents new trailers; it does not scrub ones already written into a commit message body.

FAQ

Does "attribution": false also change past commits? No. It stops Claude Code from adding the trailer and footer to new commits and PRs. Old commits keep whatever they were given; removing those means rewriting history.

I set the key but nothing changed — why? Three usual suspects: you are below 2.1.281 and used the boolean shorthand (use the object form); the setting lives in a file another file overrides (managed settings win, then --settings, then project local, then project, then user); or attribution.commit/attribution.pr is set somewhere, which silently disables the deprecated includeCoAuthoredBy. Run /status or claude doctor to see which files loaded.

Can I keep the commit trailer but remove only the PR footer? Yes — that is exactly what the object form is for: set attribution.pr to "" and leave commit alone (or vice versa).

Why does my trailer say "Claude Code" instead of the model name? The trailer normally names the session's Claude model. When the model ID is not a recognized Claude model — typically because ANTHROPIC_BASE_URL points at a router or third-party endpoint — it falls back to the generic Claude Code credit.

What about the claude.ai session links on commits? Those are the Claude-Session trailers from cloud and Remote Control sessions. The boolean hides them; in the object form, set "sessionUrl": false.

Is any of this enforced org-wide? Managed settings (deployed by your administrator) override every other file, so an org can pin attribution on or off regardless of user or project files.

Clean history, cheaper commits

Turning attribution off is often the first step of a bigger cleanup: making agent-made commits indistinguishable from human ones, at scale, without watching a subscription meter. If that is where you are heading, two paths we have documented end to end:

And when the commits are clean and the history is readable, the next bottleneck is organizing what the agent actually works on — our Claude Projects tutorial covers the workspace side of that workflow.

Further reading