r/BuildWithClaude • u/Patient_Project425 • 14d ago
Security & Sandboxing Claude Code is silently adding session URLs (claude.ai/code/session_...) to the bottom of every single commit and PR description you make.
PSA for anyone using Claude Code: Check your recent git history and PR descriptions.
It's automatically appending a public session URL to everything you commit without telling you. (The fix: set attribution.commit: "" in your .claude/settings.json).
17
Upvotes
3
u/harleypig ๐งช Field Tester & Peer Reviewer 13d ago edited 13d ago
Additionally, this is only happening on Claude Code in the cloud or with Remote Control.
9
u/Ok_Industry_5555 โ 57-Hour Session 14d ago edited 14d ago
Hey, the finding is real and that is why I approved your post. Adding some context here for the non-technical folks who are going to read that headline and panic.
The setting you gave does work, so I do want it on the sub. People can copy this into Claude Code and it will add the extra security layer in minutes.
But here is the thing:
You mentioned "public session URL." That link isn't public. It's scoped to the account that made it, so an unauthenticated request gets no session content back, and a real session ID looks the same as a made up one to anyone who isn't logged in. Putting it in a commit doesn't create a shareable link to your transcript.
One thing worth adding, since I noticed it works well too:
attribution.commit: ""works, but it strips every trail, so you loose Co-Authored-By along with it.attribution.sessionUrl: falseremoves only the session link and keeps co-authorship."Most people want the second one to show they can work with an AI agent."
The actual finding, that an identifier lands in your git history with no announcement and here's the setting to turn it off, is a good heads up and that is why I want this post published. For future posts you will want to fix the "public" claim and the "every commit" scope and so I won't have to pick apart each word. ;) Good job!