Commit `Claude-Session:` attribution trailer ignores `attribution: {commit: ""}` setting
Summary
With commit attribution disabled via settings (attribution: { "commit": "", "pr": "" }), Claude Code still appends a Claude-Session: https://claude.ai/code/session_<id> trailer to git commit messages. The trailer is injected into the model's Bash tool description (a # Git section instructing the model to "End git commit messages with: Claude-Session: <url>"), and it does not honor the local attribution config.
The legacy Co-Authored-By / "Generated with Claude Code" footer is correctly suppressed by the setting — only this newer Claude-Session: header ignores it.
Environment
- Claude Code: 2.1.210
- OS: macOS 15.6.1 (24G90)
Steps to reproduce
- In
~/.claude/settings.json, disable attribution:
``json``
"attribution": { "commit": "", "pr": "" }
- Have Claude Code (or a subagent) create a git commit.
- Inspect the commit message.
Expected
With attribution.commit set to empty, no attribution trailer is added to commit messages (no Co-Authored-By, and no Claude-Session:).
Actual
The commit message ends with:
Claude-Session: https://claude.ai/code/session_<session-id>
and PR bodies get the same URL appended. Confirmed across both the main session and spawned subagents (each subagent's Bash tool carries the same directive).
Root cause (as far as I can tell)
No local settings layer enables attribution — all are empty/absent:
| Layer | attribution |
|---|---|
| ~/.claude/settings.json (user) | {"commit":"","pr":""} |
| project .claude/settings.json | absent |
| project .claude/settings.local.json | absent |
| ~/.claude.json | null |
However ~/.claude.json shows a cached server-side gate:
cachedStatsigGates.tengu_ant_attribution_header_new = true
This "new attribution header" feature appears to be what injects the Claude-Session: trailer into the Bash-tool git guidance, and it bypasses the user's attribution setting.
Impact
Users who deliberately disable commit attribution (clean history, org policy, contributing to upstream repos where Claude attribution is unwanted) get Claude attribution on commits anyway, and must strip it manually after every commit. The attribution setting reads as honored (no Co-Authored-By) but silently isn't for the new header.
Request
Have the tengu_ant_attribution_header_new attribution-header feature respect the local attribution: { "commit": "", "pr": "" } configuration (and/or provide a documented way to disable the Claude-Session: trailer).
Showing cached comments. Read the full discussion on GitHub ↗
4 Comments
i'm running into this as well
CLAUDE_CODE_SUPPRESS_SESSION_ATTRIBUTION=1env var or"attribution": { "sessionUrl": false }in~/.claude/settings.jsonshould stop it. Annoying.Can whoever is in charge of whatever please ensure this doesn't happen again. This is the second such attribution that has happened which has caused history rewrites and subsequent friction. Nobody wants this!!!!!
Hit this today with
attribution: {"commit": "", "pr": ""}set since months back — theClaude-Session:trailer still landed in 273 commits (found via commit search), including one merged PR to a third-party repo I can't rewrite. Confirming the workaround for anyone else: adding"sessionUrl": falseto theattributionobject stops it on the next session. Would be good if the existingcommit: ""opt-out covered new attribution channels by default.