Commit `Claude-Session:` attribution trailer ignores `attribution: {commit: ""}` setting

Status Fixed / completed
Reported on v2.1.210
Maintainer reply None cached
Activity 11 comments · opened Jul 15, 2026 · closed Aug 19, 2026

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

  1. In ~/.claude/settings.json, disable attribution:

``json
"attribution": { "commit": "", "pr": "" }
``

  1. Have Claude Code (or a subagent) create a git commit.
  2. 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).

View original on GitHub ↗

4 Comments

xdannyrobertsx · 1 month ago

i'm running into this as well

elidickinson · 1 month ago

CLAUDE_CODE_SUPPRESS_SESSION_ATTRIBUTION=1 env var or "attribution": { "sessionUrl": false } in ~/.claude/settings.json should stop it. Annoying.

mannewalis · 1 month ago

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!!!!!

dergachoff · 1 month ago

Hit this today with attribution: {"commit": "", "pr": ""} set since months back — the Claude-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": false to the attribution object stops it on the next session. Would be good if the existing commit: "" opt-out covered new attribution channels by default.

Showing cached comments. Read the full discussion on GitHub ↗