claude/for
Search
Subscribe
Claude CodeUpdated

How do I turn off Claude Code commit attribution and the Claude-Session trailer?

Empty attribution.commit stops Co-Authored-By, not Claude-Session. Set attribution.sessionUrl false (and pr: empty) for a full opt-out. Official hide-all JSON.

Claude Code attribution is three switches, not one. Set attribution.commit and attribution.pr to "" to hide Co-Authored-By / PR text. Separately set attribution.sessionUrl to false to omit the Claude-Session: trailer on cloud / Remote Control commits (default on). Deprecated includeCoAuthoredBy: false alone is not enough. On v2.1.281 or later, "attribution": false hides all three at once.

TL;DR. commit: "" + pr: "" hide Co-Authored-By / PR lines. sessionUrl: false hides the session link trailer. On v2.1.281+, "attribution": false hides all of it. Co-authored-by off is not the same as no Claude-Session:. Put the block in a settings file the session can actually read - especially for cloud.

What you are seeing

You cleared Co-Authored-By (or set attribution.commit to "") and still find a trailer like:

Claude-Session: https://claude.ai/code/session_...

That pattern showed up in a community thread (HN Tell, 2026-09-12) - a useful report, but the official answer is the settings-reference attribution section: session links are a separate key. The trailer lands on commits; the same URL can also appear in PR bodies for cloud / Remote Control.

Three separate settings

On Claude Code v2.1.281 or later, the settings reference gives a one-line hide-all:

{
  "attribution": false
}

Earlier versions reject the false value and skip the whole user, project, or local settings file that holds it. In a settings file that earlier versions also read, use the three keys instead, the official fallback recipe:

{
  "attribution": {
    "commit": "",
    "pr": "",
    "sessionUrl": false
  }
}
SurfaceKeyOff valueDefault when unset
Commit text / Co-Authored-Byattribution.commit""Co-Authored-By: <model> <noreply@anthropic.com>
PR description lineattribution.pr""Generated with Claude Code line
Session link trailerattribution.sessionUrlfalsetrue (cloud + Remote Control)

includeCoAuthoredBy is deprecated since v2.0.62. Prefer attribution. Emptying commit or setting includeCoAuthoredBy: false does not cover sessionUrl.

The Claude moves worth stealing, by email

Workflows tested on real jobs, sent only when they are worth it. Free.

Cloud / Remote Control vs local

Per cloud environments: cloud commits include Claude-Session: <url> (v2.1.179+). Omit trailer + PR-body link with attribution.sessionUrl: false (v2.1.182+). Settings-reference states the same for cloud and Remote Control.

Local terminal: with commit: "", staff notes on issue #77830 say plain local commits do not get the trailer. That matches the docs, which tie the trailer to cloud / Remote Control.

Cloud reachability (Settings in cloud sessions): cloud does not read ~/.claude/settings.json or .claude/settings.local.json. Commit attribution into shared .claude/settings.json and/or use server-managed settings.

Not tested yet: we haven't run this in the Claude Code CLI or made a test commit. The steps follow the docs.

Where to put the file

ScopeFileReaches cloud?
User~/.claude/settings.jsonNo
Shared project.claude/settings.json (commit it)Yes
Project local.claude/settings.local.jsonNo
Managedserver-managed / org policyYes (server-managed)

Run /status then Setting sources to confirm which files loaded.

What not to do

  • Do not rely on undocumented flags or env vars. Community threads mention CLAUDE_CODE_SUPPRESS_SESSION_ATTRIBUTION=1, but it isn't in env-vars as of 2026-09-15. Prefer attribution.sessionUrl: false.
  • Do not expect CLAUDE.md alone to beat managed settings. CHANGELOG 2.1.269: Fixed the attribution reminder overriding a CLAUDE.md or memory rule against commit and pull request attribution; lines set by managed settings still apply. Unrelated to the read-only git Bash regression fixed in 2.1.270 (readonly-git guide).
  • Do not flip includeGitInstructions: false just to kill attribution - that strips built-in commit/PR instructions and the git status snapshot.
  • Do not rewrite history first. Settings affect new commits/PRs only.

Ops adjacency after settings changes: how to use /skill-doctor.

FAQ

Why is Claude-Session still there after I cleared commit attribution?

Separate key: attribution.sessionUrl. Empty commit does not turn it off.

Does this affect local terminal commits?

Docs scope the session link to cloud and Remote Control.

Is includeCoAuthoredBy: false enough?

No for session links. Deprecated since v2.0.62: use "attribution": false on v2.1.281 or later, or attribution with all three fields on older builds.

Will this rewrite old commits?

No. Only new commits / PRs from sessions that load the setting.

Related: read-only git permission prompts?

Different issue - Why does Claude Code keep asking permission for read-only git commands?.

Sources (checked 2026-09-15; re-verified 2026-09-18; attribution: false added 2026-10-22)

The Claude moves worth stealing, by email

Workflows tested on real jobs, sent only when they are worth it. Free.