Skip to content

attribution setting does not control session URL in commit messages #41873

Description

@danielo515

Problem

The attribution setting in ~/.claude/settings.json allows removing the "Co-authored-by" trailer and "Generated with Claude Code" text from commit messages:

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

However, this does not remove the session deep link URL (e.g. https://claude.ai/code/session_01SBzqph11q7ZSHA5QEGgtu5) that Claude Code appends to commit messages and PR descriptions.

There is no documented setting to control this behavior.

Image

Why this matters

  • Users who set attribution.commit to "" clearly intend to have clean commit messages with no Claude Code metadata. The session URL should respect this intent.
  • The session URL leaks information about the tooling and specific session used to produce the code.
  • For users running Claude Code in the cloud (e.g. via claude.ai/code), a local commit-msg git hook is not a viable workaround since the commit is created server-side.

Expected behavior

When attribution.commit is set to "", all Claude Code metadata should be removed from commit messages, including the session URL. Alternatively, provide a separate setting to control the session URL independently.

Reproduction

  1. Set ~/.claude/settings.json to:
    {
      "attribution": {
        "commit": "",
        "pr": ""
      }
    }
  2. Use Claude Code (cloud) to make a commit.
  3. Observe that the session URL is still appended to the commit message.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions