Claude Session URL appended to commit messages and PR descriptions by default
GitHub Issue Report: Claude Code Attribution Defaults
Repository: anthropics/claude-code
Issue Number: #66504
Status: Open Closed
Date Opened: June 9, 2026
Author: joka-7
📌 Overview
The user joka-7 has raised a feature request regarding the way Claude Code handles attribution in version control. Currently, the tool automatically appends a session URL to every pull request (PR) description and commit message. The core argument is that this behavior should be mandatory opt-in rather than the default.
🛠 Preflight Checklist
- Existing requests searched; no duplicate found.
- Request is limited to a single feature.
🚨 The Problem Statement
When utilizing Claude Code, the system silently attaches a session link (e.g., https://claude.ai/code/session...) to the end of git metadata.
"Users only discover it after it's already polluting their git history."
Key Pain Points:
- Lack of Transparency: No warning is given during the onboarding process.
- No Consent: There is no initial prompt asking the user if they want this feature.
- Professionalism: In a collaborative or open-source environment, these URLs can appear cluttered and unprofessional to teammates.
📉 Impact Analysis
We can represent the "History Noise" () as a function of the number of commits () and the length of the appended URL ():
As increases, the total noise grows linearly, leading to a degraded developer experience.
💡 Proposed Solutions
The author suggests several paths forward to resolve this UX friction:
Primary Recommendation
Implement a one-time onboarding prompt.
- Example:
"Would you like to include a link back to this Claude session in commit messages?"
Alternative Approaches
| Option | Description | Pros/Cons |
|---|---|---|
| Discoverable Opt-out | Show a "Don't add this again" toggle during the first commit. | |
| Full Removal | Delete the URL entirely; keep only the Co-Authored-By: Claude trailer. |
🔄 Workflow Visualization
🔍 Additional Technical Context
Current Workarounds
While the feature is currently enabled by default, there are two ways to stop it, though both are suboptimal:
- Configuration File: Users can modify the
.claude/settings.jsonfile by adding:attribution.commit: ""(Note: This setting is largely undiscovered by the general user base). - Git Hooks: A
commit-msghook can be written to strip the URL.- Issue: These hooks are often unreliable in cloud-based or remote development environments.
Use Case Example
Imagine a developer building a new feature. They commit their work and open a PR. Their colleagues see:
Fixed the memory leak in the auth module. https://claude.ai/code/session_xyz123
The developer was unaware the link was being added, and the team now views the commit history as cluttered.
📋 Metadata Summary
- Priority:
Medium(Would be very helpful) - Category:
Other/User-Experience - Labels:
enhancement,New feature or request,user-experience - Assignees: None
Related Assets: