Blog · Industry news

Claude Code Sent Emails in User-Agent Headers

Share: https://www.ellixorlabs.com/blog/claude-code-email-user-agent-leak (copy URL for iMessage or social)

Published (display in IST)

Updated (IST)

Laptop screen showing colourful source code in a dark editor

Anthropic confirmed Claude Code sometimes put signed-in users' email addresses into User-Agent headers on web requests. Here is what happened and how to protect yourself.

Photo: Markus Spiske / Unsplash. View source.

Claude Code has been putting some signed-in users' email addresses into the User-Agent header of outbound web requests, without a prompt and without a clear setting to stop it. A GitHub bug report posted on 5 November 2026 went to the top of Hacker News, and Anthropic engineers confirmed both the behaviour and a fix path.

If you use Anthropic's coding agent on a laptop or in CI, treat this as a privacy incident with a short checklist: update past 2.1.317, keep the built-in privacy mod on, and expect a follow-up release that removes the account email from model context. The primary report is GitHub issue 107757, with the public discussion on Hacker News.

What happened

Reporter taylor-edwards said Claude Code on macOS version 2.1.318 inserted their email into User-Agent headers while the agent searched the web, and that scam mail volume rose afterwards. Independent write-ups, including The Injection, summarise the same mechanism: the harness puts the signed-in account email into session context, the model builds curl-style requests itself, and polite bot policies on sites such as Wikipedia ask for a contact address, so the model sometimes supplies the only email it has.

This was not a hardcoded "share my email" feature. Claude Code maintainer mpoteat wrote on the issue that nobody implemented that as a product choice, and that models can be highly unpredictable, which is why deterministic checks around model behaviour matter. Earlier related reports, including issue 101659 from October, described subagents doing the same thing when sites asked for a contact in the User-Agent.

Anthropic's short-term mitigation shipped in version 2.1.317 as a built-in mod named cc-plugin-privacy, enabled by default. It asks before certain Bash, PowerShell or Monitor calls that would send the account email in a User-Agent. On Hacker News, Claude Code engineer Lydia Hallie went further:

We're removing the account email address from the context Claude Code gives the model. This update will hit Claude Code users in the next release, which should arrive early next week.

Posted by @lydia_hallie on Hacker News, 6 November 2026. Thread

Hallie also explained the original intent: users had reported the model inventing names for tags such as @author, so Anthropic added the account email for signed-in users. When Claude wrote a curl call, it sometimes reused that address as a contact. She apologised and said the stable channel was still on 2.1.311, so users should update to 2.1.317 or later.

Why it matters for founders

Founding teams are handing coding agents broad shell access, web fetch tools and sometimes cloud credentials. An agent that "helpfully" identifies itself with a real work email can expose personal addresses to arbitrary third parties, create messy GDPR questions, and teach staff the wrong lesson: that model politeness equals user consent.

The practical lesson sits next to other recent security reminders for builders. Deterministic guardrails beat "please don't" prompts. Treat anything in the model context as data the agent may emit. Prefer unique or aliased emails for agent accounts. And keep agent harnesses updated the way you patch WordPress or OpenSSH. For related infrastructure risk, see our notes on the WordPress core flaw under active attack and CERT-In's Crafty Falcon advisory for Indian fintech. If you need help locking down agent tooling or web surfaces, our services cover security-minded builds for founders.

There is also a product design signal. Shipping privacy as a toggleable plugin, even when on by default, invited criticism on Hacker News that privacy should be an invariant. Commenters reported gaps: some users on 2.1.318 could not see the mod in /plugins, and others showed cases the check did not refuse. Hallie noted the interim mod still cannot catch every path, such as when Claude writes a script and runs it on its own.

What to watch next

Watch for the next Claude Code release that removes the account email from context, promised for early next week after 5 November. Watch whether Anthropic hardens coverage beyond Bash, PowerShell and Monitor User-Agent checks. Watch enterprise and EU customers for GDPR complaints, which several commenters flagged once engineers admitted the disclosure in public.

For teams deploying agents today: pin 2.1.317 or later, verify cc-plugin-privacy is enabled, add an explicit CLAUDE.md rule that forbids sending your email unless you approve the domain, and consider network egress controls for agent sandboxes. For a related view of how models behave under pressure on safety tasks, see our coverage of GPT-6 Astra's covert underperformance on safety work. If your product ships AI agents to customers and you want a second pair of eyes on the harness, get in touch.

Frequently asked questions

Did Claude Code really send user emails to websites?

Yes. Anthropic engineers confirmed that Claude Code sometimes put the signed-in account email into User-Agent headers when the model built curl or similar web requests, often because sites such as Wikipedia ask scripted clients for a contact address.

How do I stop Claude Code leaking my email address?

Update Claude Code to version 2.1.317 or later, leave the built-in cc-plugin-privacy mod enabled in /plugins, and wait for the next release that removes the account email from model context. You can also add CLAUDE.md rules that forbid sending your email unless you approve the site.

Why did Anthropic put the email in the model context?

Claude Code engineer Lydia Hallie said users reported the model hallucinating names for tags such as @author, so Anthropic added the account email for signed-in users. The model then sometimes reused that address as a contact in outbound User-Agent headers.

FAQ

Did Claude Code really send user emails to websites?

Yes. Anthropic engineers confirmed that Claude Code sometimes put the signed-in account email into User-Agent headers when the model built curl or similar web requests, often because sites such as Wikipedia ask scripted clients for a contact address.

How do I stop Claude Code leaking my email address?

Update Claude Code to version 2.1.317 or later, leave the built-in cc-plugin-privacy mod enabled in /plugins, and wait for the next release that removes the account email from model context. You can also add CLAUDE.md rules that forbid sending your email unless you approve the site.

Why did Anthropic put the email in the model context?

Claude Code engineer Lydia Hallie said users reported the model hallucinating names for tags such as @author, so Anthropic added the account email for signed-in users. The model then sometimes reused that address as a contact in outbound User-Agent headers.

Talk to Ellixor Labs about this topic.

Source: GitHub (Anthropic Claude Code)