· via Hacker News – Front Page (native)
Claude Code quietly adds session URLs to commits, and developers want it opt-in
A feature request on Anthropic's claude-code repo says Claude Code appends a session URL to every commit message and PR description by default, with no prompt and a hidden opt-out setting.
What happened
A feature request filed on Anthropic's claude-code repository, which surfaced on the front page of Hacker News, asks that Claude Code stop appending a session URL to commit messages and pull request descriptions by default. Instead, the reporter argues, the attribution should be something developers consciously choose to enable.
According to the GitHub issue, every commit message and PR description that Claude Code creates automatically gains a claude.ai/code/session_... link at the bottom. There is no prompt, no warning and no mention of the behavior during onboarding. In practice, developers notice the link only after it has already landed in their git history.
The complaint
The issue frames the problem as one of consent and cleanliness rather than functionality. When a developer uses Claude Code to build a feature and opens a pull request, teammates and open source contributors see the session link attached to every commit and PR description. The reporter says the result looks unprofessional and clutters project history, all without the developer ever having been told the link would be added. The request is filed with medium priority under an “Other” category.
Proposed solutions
The preferred fix is to make the session URL opt-in. A one-time prompt during onboarding, asking whether the developer wants a link back to the Claude session included in commit messages, is described as the ideal experience.
Two alternatives are offered. The first keeps the current opt-out behavior but makes it discoverable, for example by showing a “Don't add this again” option the first time a commit is created. The second removes the session URL entirely and relies on the existing Co-Authored-By: Claude trailer for attribution, which is already a recognized convention in git.
Workarounds available today
The issue acknowledges two existing mitigations, both with caveats. Setting attribution.commit to an empty string in .claude/settings. suppresses the link, but the issue notes the setting is effectively hidden from users. A commit-msg git hook can strip the URL after the fact, but hooks do not always fire reliably in remote and cloud environments, leaving gaps in coverage.
Why it matters
The dispute is narrow in scope but points at a broader design question for AI coding tools: who decides what gets written into shared, permanent artifacts? Git history is durable and visible to everyone with repository access, so a default that embeds a tool-specific session link affects teammates, downstream forks and open source audiences, not just the individual who ran the tool. Attribution itself is not the controversial part — the Co-Authored-By trailer already covers that — but a session URL is a different class of metadata, and a default that adds it silently shifts the burden of cleanup onto users who may not know a buried settings key exists. Whether Anthropic moves to an opt-in prompt, a discoverable opt-out or a trailer-only approach, the request underscores a simple principle for tooling defaults: ask before writing attribution into someone's history.
- #claude-code
- #anthropic
- #git
- #developer-tools
- #ai-coding