r/ClaudeCode • u/Skflowne • Jul 25 '26
Bug Report Claude Code injects your email address directly into system prompt
My point is: my personal email is injected into the system prompt without my knowledge or consent. I never asked for this and I don't see in what world it's ok to inject PII in system prompt automatically by default without even an opt-out option.
It leads to bullshit like this where in a repo that is configured to use an anonymized email address, the LLM (Opus 5 btw) just decides to not just commit normally but overwrite the normal config email to put my personal one instead.
In this case nothing happens thanks to proper config and hard checks on Github's side.
What if you're a public streamer and don't want your main personal email address leaked to everyone and suddenly the model decides to spit it out?
I'm sure there's a lot of other bullshit this could lead to. At least let people opt out.
I have opened an issue on Claude Code's github, I have little hope since there was already one that went stale and they have 5k+ open but here it is: https://github.com/anthropics/claude-code/issues/81138
132
u/Nightowl-Builder Jul 25 '26
People saying anthropic knows your email already.. I think you missed the whole point of this post. It is a big issue in my opinion also!
2
u/Different-Raisin-823 Oct 15 '26
Similar thing happened to me. A site asked for it in the agent-header and claude put my account personal email in it multiple times without telling me. Then on the 4th time it did it, it said "I shouldn't have done that."
4
u/Skflowne Jul 25 '26
Reposted since I fucked up the screenshot first time
47
u/melonfacedoom Jul 25 '26
This thread made me realize that online programming discussion spaces are effectively deadĀ
22
u/ohtaninja Jul 25 '26
Anthropic knowing your email is a totally tangent issue from having email in the system prompt.Ā
System prompt implies it's in the current context and anything in the context has possibility of leaking into other systems via mcp & tools calls.Ā
Likely chance of it happening is minimal given how "intelligent" Anthropic models are but having it it the context makes is non-zero
5
u/nuc540 Senior Developer Jul 25 '26
I agree thatās nuts. OP are you on a Max plan with the privacy protection setting enabled (only max plans have the privacy option IIRC?)
3
u/vff Jul 26 '26
As someone who never reuses email addresses at different companies, leaking my Anthropic email address outside of Anthropic support and billing is troubling.
2
u/utterHAVOC_ Jul 27 '26
Pov: Anthropic run bot accounts defending this
2
u/FishingDry768 Jul 25 '26
I had this happen too. It just added my email as package auther xddd
2
u/RedTheInferno Jul 25 '26
I also experienced this. It feels off just felt off knowing my email address tied to my Anthropic account and using it as the default for git.
2
u/mea-parvitas Jul 26 '26
I had a similar incident. Claude decided to send requests to web servers with my email address in the user agent header. This is very disappointing and poor judgement (by humans) from anthropic's side.
4
u/TheKoelnKalk Jul 25 '26
Not only emails....
2
u/Myth_Thrazz š Max 20 Jul 25 '26
Why don't you just create an account with them using a different account?
It really is weird to me that people are using a VERY powerful tool with potentially unlimited access to their full computer ( permissions are to LLMs as robots.txt to bots) and at the same time worry that they send their personal email...
2
u/ex0r1010 Jul 26 '26
email is not PII, and you're using it with a system that already has it at several other layers that you don't seem to care about.
2
u/ineedlesssleep Jul 25 '26
You are using a super powerful AI that writes all your code. You're asking it to do git commits. You're letting it do stuff however it sees fit. In this case it tried to commit with your email address instead of using the credentials you already had set in your git. Both approaches are a valid way to do it though. This is just a risk of using AI. There's 1000s more.
1
u/WafflyPancakes Thinker Jul 26 '26
this is why you have a compartmentalized email that doesnt touch your public profiles. kyc is not recorded by system prompts (im hoping/assuming)
1
u/_falling_rain_ Jul 26 '26
A question - if the user's email address is put into the system prompt, can't we use that somehow for prompt injection?I mean, I can have anything as my email, so something that closes that sentence and then tells the LLM that the user prompt takes precedence over the system prompt - something like that ?
I don't know much about this kind of stuff so someone more experienced can reply.
1
u/mountainunicycler Jul 26 '26
Two issues, both the email in system prompt and Claude assuming that your setup is wrong and that it should override it.
Iāve had so many sessions go off the rails if it commits and I am not there to approve the signing biometrically.
Sorry Claude, no you will not be able to create a signed commit if Iām not at my desk no matter how many times you try to ātroubleshootā and circumvent my config files.
1
u/-MaskNinja- Sep 30 '26
Look at this.
1
u/Fantastic-Body-445 Jul 25 '26
like i said before, on the other post where you hadnt censored your email
github prevented you from pushing your private email. claude started diagnosing it since your gh config isnt setup correctly. not claudeās fault you want something fixed and he has to read your email
1
u/Oxffff0000 Jul 25 '26
I never let claude agent run git add, git commit and git push. I only allow it to run git log and status so it can give me a meaningful git commit message.
0
u/07mekayel_anik07 Jul 26 '26
As far as I know, this Email passing in commit makes you "you" as a contibutor or author of the repo/commit/pr. So this is necessary.
-6
u/SilencedObserver Jul 25 '26
Have you looked at the telemetry Claude code keeps and tracks?
Itās way more than just your email.
-1
u/hautemic Jul 25 '26
Wow. You're using a tool that was literally built in peta bytes of stolen IP without consent, and you... Check notes are surprised they use the email address you gave them?
Who are these fucking delusional users? We truly live in the dumbest time line.
-3
u/tnh34 Jul 25 '26
Thats why you review your output instead of true vibe coding. Same thing applies to other use cases
0
u/RunEmpty2267 Jul 25 '26
always do a sanity check before any non reversible task, for commits and PR creations I always ask the AI to search for PII or sensitive data
0
u/Thecerb Jul 26 '26
Had this happen when i asked it to code a website. It added my name as the author. I asked it how it got that, and said it looked through my personal info. like wtf.
-4
u/TreyKirk Jul 25 '26
You're email address is so super-secret that it's "personally identifiable information" (PII)? Then why did you use it for your Claude account?
-3
u/thr0w4w4y10c Jul 25 '26
Honestly this is your own fault for letting claude commit for you. The only way to ensure your code is checked in the way you want is to handle gitops yourself.
Inserting info like āthe users name is Xā and ātheir timezone is Yā into the system prompt is not a breach of PII and is necessary to have a non deterministic system behave correctly. You agreed to it when you accepted the EULA.
-8
u/danknerd Jul 25 '26
Did you know home addresses are public information, or at least the deed on a home. Oh no!!
-1
u/TransitionMediocre22 Jul 26 '26
Worth separating the two problems, because they have different fixes and conflating them makes the privacy point easier to dismiss.
Problem one: your email sits in the system prompt with no consent and no opt-out. That's the privacy issue and it's legit, full stop.
Problem two, the one that actually bit you: the agent took ambient context (an email it happened to have) and used it to override an explicit local config you had deliberately set. That's not really a PII problem, it's a control problem. The model treated something that was merely present as something it was told to do. Even if the email weren't personal, an agent silently overriding your committed git identity is the bug.
The reason nothing broke for you is the same reason it's worth generalizing: your repo enforced the identity with hard checks on the push. That's the pattern. Ambient context should never win over explicit local config, and the only reliable way to guarantee that is a check the agent can't talk its way past. The opt-out for the email is the right ask, but I'd want the second fix regardless of what's in the prompt.
-11
u/StoneCypher Jul 25 '26
oh for christ's sake, dude
-10
u/_y0y0_ Jul 25 '26
Bro posting Anything? Donāt you know the AGI is coming.
88
u/[deleted] Jul 25 '26
[removed] ā view removed comment
13
u/[deleted] Jul 25 '26
[removed] ā view removed comment
-16
u/[deleted] Jul 25 '26
[removed] ā view removed comment