Claude Code sends your email address to websites
motoroco
816 points
273 comments
November 05, 2026
Related Discussions
Found 5 related stories in 120.5ms across 11,756 title embeddings via pgvector HNSW
- Claude Code is leaking real email address as a User-Agent string in curl command matada_ · 38 pts · August 11, 2026 · 74% similar
- Tell HN: Claude Code adds your email to the prompt, the LLM sends it to websites TekMol · 27 pts · October 29, 2026 · 70% similar
- Claude Code slyly adding users' emails to outbound HTTP gojomo · 21 pts · October 24, 2026 · 69% similar
- Claude Code from Source pykello · 16 pts · September 18, 2026 · 63% similar
- Claude Code can be tricked simply by asking it to summarize a website galaxyLogic · 11 pts · August 30, 2026 · 61% similar
Discussion Highlights (19 comments)
motoroco
Claude code writes adds a `User-Agent` request header like `my-session-slug/1 <my.name@example.com>` when searching the web and requesting data. This violates the privacy of paying customers and has resulted in me getting dozens of scam and phishing emails per day from properties I have never personally visited. This policy is asinine: it does nothing but harm me, the customer, while providing immense value for scrapers and scammers.
EGreg
This is why I prefer to use the chatbots on a website, instead of Claude Code. I've never used Claude Code or Cursor. All the code I got written this year was without them. I did use Microsoft Copilot a bit when it came out, though. I prefer to see exactly what's being sent, and sorta control the KV cache. These days, these chatbots have great environments where they can install headless browsers, php, your entire thing, run end-to-end tests, and then give you a .patch or .zip file to merge over your code, or even push to github.
matheusmoreira
That is just so disgusting. So happy I switched away from Anthropic. For the record, I just asked Astra to verify that Codex does NOT do this, and it doesn't. Thanks for not screwing this up, OpenAI. > I checked your installed Codex CLI 0.159.0, using your existing configuration. > Its reported User-Agent contains the client/version, OS/architecture, and terminal—no email address. Astra wasn't able to check OpenAI’s "hosted search service" though, whatever that is.
nekusar
This, along with all the other sabotages, is why I run a local abliterated Qwen.
mk89
This explains the amount of spam emails I am receiving in the work email since I switched to Claude. I used to work with copilot which was fine. Now I am getting really a lot of spam emails almost on a daily basis. Absolutely crazy. And they are even personalised with my name and surname, not just "dear customer"... Stupid me, I thought they somehow had hacked my company database or so... (considering all the cves, attacks happening on a daily basis...).
Philip-J-Fry
Don't forget Claude wasn't even gzipping request/responses until recently. This company is pure vibes rediscovering lessons everyone else already learned. How on earth does this sort of thing get thought up? Do they just use the same http client for internal API calls as they do for public web fetches?
teruakohatu
This is insane, and if the org I work for bans Claude as a result I will not be the least surprised. Goodbye Claude Code.
b112
I use a unique email address for each site I sign up for, and thus Claude/Claude Code doesn't have my 'main' email. And yet after months of use? Not a single spam to that unique email. So if this is happening, it doesn't see to be causing even 1 spam email to that address.
canto
15 minutes ago, no proof, no code, no nothing except a random claim, main on hackernews. wtf?
ChrisArchitect
Related recently: Tell HN: Claude Code adds your email to the prompt, the LLM sends it to websites https://news.ycombinator.com/item?id=50286306 Claude Code slyly adding users' emails to outbound HTTP https://news.ycombinator.com/item?id=50219875
rconti
Seems trading autonomy for machine speed means that sometimes the machines guess wrong. I'm often surprised how correctly Claude guesses on my behalf, when my instructions are ambiguous. But it's not 100%.
gastonmorixe
curl -sS https://api.anthropic.com/v1/messages \ -H "authorization: Bearer $(security find-generic-password -s 'Claude Code-credentials' -w | jq -r .claudeAiOauth.accessToken)" \ -H "anthropic-version: 2023-06-01" \ -H "anthropic-beta: oauth-2025-04-20" \ -H "content-type: application/json" \ -d '{ "model":"claude-opus-5-5", "max_tokens":64, "system":"You are Claude Code, Anthropic'\''s official CLI for Claude.", "messages":[{"role":"user","content":"Hello, world!"}] }'
bassie123
Even worse, it used curl with my org emailadress when I was using my private claude account... really strange.
eightysixfour
I just checked mine and the header I see is: Claude-User (claude-code/2.1.318 (cli); +https://support.anthropic.com/) What situation are you seeing this in?
llama052
It looks like subagents will do this with curl requests and stuff whatever identifiers it can into the UA header. For instance some requests I made to our webserver: company-helm-research/1.0 (Claude Code agent run by <my name>, <company> platform team; docs lookup) Claude-Code-research-agent/1.0 (<Company> platform team; on behalf of <my name>; +https://github.com/<company org>/<repo of project>) Not great, it even pulled the repo of the project I was in.
sunaookami
It's because Claude Code inserts a "hidden" (e.g. not visible to the user and very unexpected) info block to the system prompt that shows your email: >The user's email address is xxx@example.com. Use it only to identify the user, such as for authorship, attribution, or filtering their own work. Never send it to an unrelated service, such as in a request header, URL, or payload, unless the user explicitly asks. And Claude doesn't care about what the text says and when it uses cURL it will often "by accident" send your mail in the User-Agent. You can e.g. use a mod to remove that block: https://pastebin.com/ PkWEQCnu
chewchewchew
I noticed claude did it months ago when it interacted with the SEC's API when I was writing something with it, thought it only did it there because it's in their TOS. (It did stop when I told it to). I guess I was wrong.
bix6
How do you test / verify this?
thatonehack
Why can’t AI eliminate spam email? It is so powerful it should pulverize all spam email and spam phone calls! Yet… we get more.