Claude Code sends your email address to websites github.com · 338 points · 101 c...
HN Best 30 @best30
Claude Code sends your email address to websites github.com · 338 points · 101 comments · HN thread
TL;DR A GitHub issue in Anthropic's claude-code repo reports that Claude Code put the user's email address into the User-Agent header of web requests, so third-party sites (and their scammers) received it, leading to a flood of spam for the reporter. Anthropic's engineer says a built-in privacy mod, cc-plugin-privacy, blocks the behavior from v2.1.317 on and is enabled by default. The HN thread (338 points, 101 comments) is largely angry and mocking of Anthropic.
- The reporter says Claude Code sent their email in the User-Agent header during web searches, and they now receive dozens of scam emails per day.
- Commenter analysis says the email is injected into the hidden system prompt as user context, and the model then sometimes puts it into curl headers, for example to comply with Wikipedia's contact-email policy for scripted clients.
- Anthropic's engineer (mpoteat) says a built-in mod, cc-plugin-privacy, deterministically blocks the behavior from v2.1.317 and later, is on by default, can be disabled via /plugins, and its source is now published.
- Commenters note a related issue (#81138) was filed in July and a similar report (#101659) in October, suggesting the problem was known for months.
- Several users say subagents and other tools put identifying details, including employer and repo names, into User-Agent strings, and one reports the same with government and crates.io requests.
- Some commenters report Codex and Claude's own Anthropic-side behavior differently, and the thread notes the harness-versus-model distinction is disputed.
Discussion The thread centers on a privacy bug in which Claude Code exposed users' email addresses to third-party websites through User-Agent headers, causing spam for some. Anthropic's engineer posted a fix in the form of a default-on privacy mod and explained the mechanism, which is the main technical content. Most of the discussion is hostile: commenters mock the vibe-coded design, criticize the 'haha' tone and the reliance on a mod rather than removing the email from the system prompt, and debate whether the fix is adequate. The mood is angry and cynical, with many announcing they are leaving Anthropic or moving to local models or other harnesses.
- Email should be removed from the system prompt entirely, not patched (many): Commenters argue an authentication email has no business in Claude Code's context and that a deterministic filter treats the symptom. Some cite GDPR data minimisation and suggest complaints to data protection authorities.
- Anthropic's response and tone are unacceptable (many): Users object to the 'haha' remark and to the fix being opt-out via a plugin. Several say it's a clear privacy violation that should have been opt-in or never shipped.
- Users should never give AI tools their real email (some): Several commenters recommend masked, unique or salted email addresses per service, saying this avoids leaks regardless of the harness or model.
- Model nondeterminism makes such leaks inevitable; harnesses are needed (some): Some argue leaks like this are a general property of LLM agents with network access and that only harness-level constraints or sandboxing can help, while alignment alone is not reliable.
- Switching tools or running local models is the answer (some): Multiple commenters say they have left or plan to leave Claude Code for Codex, OpenCode, Pi or local models, citing this and other incidents.
- The behavior is a reasonable result of web etiquette (a few): A minority notes that some sites, including Wikipedia and the HTTP spec, expect scripted clients to include a contact email, and that businesses may block anonymous agents without it.
- Skeptical about the report's evidence and about Codex being clean (a few): Some note the original post had no proof, pointed to an older report, and that a commenter's claim that Codex is clean rests on reading source code, not testing traffic.
Links from the comments
- Original July issue reporting the same email-in-system-prompt problem, cited as evidence Anthropic knew earlier.
- Earlier report of the behavior, possibly from October, shared by a commenter.
- Related HN thread: 'Tell HN: Claude Code adds your email to the prompt, the LLM sends it to websites'.
- Related HN thread on Claude Code slyly adding users' emails to outbound HTTP.
- Shared pastebin with a mod that removes the email block from the system prompt.