Skip to content

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

Description

@rustyrazorblade

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: "), 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:
    "attribution": { "commit": "", "pr": "" }
  2. Have Claude Code (or a subagent) create a git commit.
  3. 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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdocumentationImprovements or additions to documentationhas reproHas detailed reproduction stepsplatform:macosIssue specifically occurs on macOSreproducedBug reproduced by maintainers on a released build

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions