Claude Code, Anthropic's agentic coding tool, has been silently including users' email addresses in the User-Agent HTTP request header when making web requests on their behalf. That means every website Claude Code fetches during a coding session receives your email address — a piece of personally identifiable information you almost certainly never agreed to hand over to random third parties.

The bug was filed against version 2.1.318 on macOS and has attracted significant community attention (229 upvotes on Hacker News, 84+ GitHub reactions at time of writing). The reporter states they began receiving large volumes of spam email as a direct consequence, which is the predictable outcome: email addresses harvested from HTTP headers are trivially scraped and sold.

Why this is worse than a typical privacy slip: agentic tools like Claude Code make many automated web requests in the background, often to unfamiliar domains, as part of normal operation. A user has no practical way to monitor or consent to each request. Embedding PII in a header that every server in the chain can log — including CDNs, proxies, and analytics services — multiplies the exposure well beyond what a single browser visit would cause.

Claude Code leaks your email address to third-party websites via User-Agent headers

The reporter's framing is worth noting: this isn't a feature that needs an opt-out toggle. Sending a user's email in a User-Agent string serves no legitimate technical purpose. It doesn't help sites distinguish agentic from human traffic in any useful way, and it actively harms user privacy. The correct fix is removal, not configuration.

If you are currently running Claude Code: check whether your version is 2.1.318 or earlier and monitor for a patch from Anthropic. Until a fix is confirmed, be aware that any web-fetching actions Claude Code performs may be leaking your account email to external servers. If you use Claude Code in professional or enterprise contexts, this has potential compliance implications depending on your jurisdiction and data-handling obligations.

The broader lesson for builders evaluating agentic AI tools: audit what your chosen tool sends in HTTP headers before deploying it in any environment where user PII is involved. Agentic systems make requests at scale and speed that dwarf normal browsing, so the blast radius of a header-level privacy mistake is proportionally larger.