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.

TL;DR. commit: "" + pr: "" hide Co-Authored-By / PR lines. sessionUrl: false hides the session link trailer. 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 discourse (HN Tell, 2026-09-12) - useful signal, not product of record. Product truth 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.

Labs has no measured volume for attribution / Claude-Session keywords on 2026-09-15 - discourse-led Spec B, not a Growth KW wedge.

Three separate settings

Official hide-all recipe from settings-reference:

{
  "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.

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 - supporting discourse; product of record = docs (trailer tied 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.

[GAP]: Research did not run Claude Code CLI or create a test commit.

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 invent flags or treat undocumented env as primary. Discourse mentions CLAUDE_CODE_SUPPRESS_SESSION_ATTRIBUTION=1 - [GAP] not in env-vars (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 with all three fields.

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)

  • Settings reference - Git and attribution - commit / pr / sessionUrl; hide-all recipe; includeCoAuthoredBy deprecated since v2.0.62
  • Cloud environments - Claude-Session (v2.1.179+); omit via sessionUrl: false (v2.1.182+)
  • Settings - cloud sessions - user/local files not read in cloud
  • CHANGELOG.md - 2.1.269 attribution-reminder; head 2.1.276 as of 2026-09-18 (do not conflate with 2.1.270 readonly-git); this page claims stay on attribution keys + 2.1.269 reminder
  • HN Tell 49675094 - discourse (2026-09-12)
  • Supporting: issue #77830 - staff clarification; not primary
  • [GAP] CLI untested · [GAP] CLAUDE_CODE_SUPPRESS_SESSION_ATTRIBUTION undocumented in env-vars

One Claude move in your inbox, every Sunday

Four minutes, tested on a real job, then back to your weekend. Free.