Claude Session URL appended to commit messages and PR descriptions by default
TL;DR Highlight
Claude Code adds session URLs to commits and PRs by default, and users want it opt-in
Who Should Read
A developer surprised to find claude.ai session links in git commits and PRs created with Claude Code
Core Mechanics
- Session links land at the bottom of commits and PRs
- Claude Code automatically appends a https://claude.ai/code/session_... link to commit messages and PR descriptions.
- The issue author says there was no onboarding prompt or warning.
- The ask was to make it opt-in
- Proposals include a one-time onboarding prompt or a first-commit prompt with a "don't add this again" option.
- Another alternative was to drop the link and keep only the Co-Authored-By trailer.
- There is a setting to turn it off
- Put "sessionUrl": false under attribution in ~/.claude/settings.json to drop the link.
- This keeps the Co-Authored-By trailer intact.
- attribution.commit set to empty did not work
- The issue and one commenter reported that attribution.commit = "" alone did not remove the link.
- A commenter suggested the CLAUDE_CODE_SUPPRESS_SESSION_ATTRIBUTION=1 environment variable.
- Web and Remote Control sessions are the hard case
- A maintainer reply said the link is only added in web and Remote Control sessions.
- The issue author notes web sessions start in a fresh container, so ~/.claude/settings.json does not persist.
- So the setting must be committed per repo, and any new repo starts with the link on.
- Asking in chat does not stick
- The issue author says they asked many times across sessions to leave the link out, and it kept returning.
- They ask whether the instruction is re-injected per commit and say that should be documented.
Community Reactions
- Some want the link on by default
- One commenter sees coworkers' PRs with session links and says they can still control who can view the session.
- Another wrote a script early on to append session IDs to commits, and says it helps when debugging old commits.
- Linkrot worries
- One commenter doubts these links will still work in 30 years.
- Another prefers linking to an open format stored in the repo, since git should be self-contained.
- The problem is the rollout, not the feature
- One commenter says it's a good default for new users but should not have been turned on for existing users without a prompt.
- Another says Anthropic often ships default-on features via auto-update, so they are considering switching harnesses.
- A concrete way to turn it off
- One commenter says the env variable was added in CC 2.1.202 on July 8, 2026.
- They also added a rule to ~/.claude/CLAUDE.md saying never to add Co-Authored-By or any reference to Claude in commits, and it works.
- Define attribution in CLAUDE.md
- One commenter says to spell out in CLAUDE.md how AI contributions should be documented rather than rely on vendor conventions.
- Another suggests committing the session or prompt, or using a git note, for session context.
How to Apply
- Add sessionUrl false to settings.json
- Open ~/.claude/settings.json today and add "sessionUrl": false under attribution.
- Set commit and pr to empty strings too if you want those texts gone.
- If it still appears, set CLAUDE_CODE_SUPPRESS_SESSION_ATTRIBUTION to "1" under env.
- Commit the setting in repos used via web or Remote Control
- Web sessions don't keep your home settings, so commit the same attribution block in the repo's .claude/settings.json.
- Add this file to your new-repo template.
- Review the commit message before pushing
- Tell Claude to draft a commit message and not commit until you review it.
- Before pushing, run git log -1 --format=%B and check the last lines for a Claude-Session trailer.
- Write your attribution rules in CLAUDE.md
- Spell out in the project CLAUDE.md how AI involvement should be marked, such as whether links are allowed or an Assisted-by line.
- Include the exact format for anything you want recorded instead of the session link.
Try It
# Paste into the Claude Code terminal (settings check prompt)
Read ~/.claude/settings.json and this repo's .claude/settings.json.
Check whether attribution.sessionUrl is set to false in both.
If not, propose merging the block below without deleting existing settings. Do not modify any file until I approve.
{ "attribution": { "commit": "", "pr": "", "sessionUrl": false } }
Also use git log to check whether the last 5 commit messages end with a Claude-Session trailer or a claude.ai/code/session_ link, and tell me.
Next to try: after changing settings, make a test commit and verify the link is gone. If not, add CLAUDE_CODE_SUPPRESS_SESSION_ATTRIBUTION=1 under env and retry.Terminology
Related Papers
Frostbite: A new CPU architecture discovered, designed and verified by AI
AI agents designed a CPU from scratch, claiming 4.59x perf/W over a traditional core
Restricting AI agents in mobile operating systems platforms from capturing data
Signal now blocks OS-level AI agents from reading its screen on iOS 27 and Android
Actions Speak Louder than Words: Stateful Privacy Sniffing of LLM Agents via Behavioral Covert Channels in Web Interactions
Agents' link choices alone let attackers rebuild user queries at F1 0.89; SOR cuts it to 0.39.
Tracking and Limiting Unsupported Claim Propagation in Multi-Agent LLM Systems: A Provenance-Aware Framework
Passing claims with source, evidence and history kept equivalence at 5 agent stages at 96% versus 31%.
LLM assisted reverse engineering
Pointing an agent at binaries with skills and MD notes made years-long hacks feasible
Metrics-in-the-Loop: Complexity Feedback Reshapes Agent-Written Code
Injecting per-turn complexity reports into coding agents cut code erosion without changing correctness
Why is Gemini 4 Carbon taking so long?
Carbon took nearly an hour on bug fixes that Astra and Opus finished in minutes, mostly from extra unrequested work.
Weight-Space Programming builds neural networks like a 1990s researcher
LLM hand-wrote MNIST weights to 91.3%, using 1990s-style techniques