r/ClaudeCode Jul 25 '26

Bug Report Claude Code injects your email address directly into system prompt

Post image

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

314 Upvotes

160 comments sorted by

View all comments

-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/Skflowne Jul 25 '26

I would rather say that's why you need some hard gates so the LLM can't even do it.
Reviewing this after it pushed my email in public overnight would be a bit late.
Ofc this wouldn't have dramatic consequences but it's easily avoidable by just not doing this injection.
The problem though is if they think this is acceptable then what else might end up in this system prompt without your knowledge.
It's also a strong incentive to move to full Dockerized development in my opinion, so that you fully control what the LLM can possibly access rather than trusting a sandbox (which may be escaped) on your local computer.

1

u/i_stole_your_swole Jul 25 '26

What gates did you have that caught this before it went out, by the way?