Claude Code leaked user emails in User-Agent headers of web requests
Claude Code users found their Anthropic account email in the User-Agent of curl requests to sites like Wikipedia, SEC and crates.io.

Several Claude Code users have found that the email address tied to their Anthropic account was sent to third-party websites inside the User-Agent header of curl requests. Affected destinations reported by users include Wikipedia, the SEC and crates.io. Anthropic has added a partial safeguard and says the next release will remove the email from the model’s context entirely.
How the leak happens
Claude Code places the user’s account email in the model’s internal context. Some websites ask automated clients to identify themselves with contact information. When the model runs into such a request, it sometimes takes the email it already has in context and puts it into the User-Agent string of the outgoing request.
The result is that the user’s address is disclosed to whatever site the agent contacts, without the user explicitly approving it. The behavior is documented across several separate GitHub issues on the Claude Code repository.
Fix attempts so far
The bug has been reported since September. In version 2.1.317, Anthropic added a check meant to stop requests of this kind and ask the user for approval before they go out. Users say the protection does not catch every case and that there are still paths where the email leaves the machine without a prompt.
Anthropic has now said that in the upcoming version it will simply remove the email from the model’s context. If the model never sees the address, it cannot copy it into a header.
One user’s complaint
One of the issues was filed by a user running version 2.1.318 on macOS. The reporter says they receive dozens of scam emails per day and blames Claude Code for disclosing their address to arbitrary third parties during web searches without permission.
The reporter argues this should not be an opt-in or opt-out setting and should be removed from the harness entirely. In their view, including the email does nothing for services that dislike agentic traffic, removes the user’s anonymity on the web and gives scammers a ready supply of addresses. They also wrote that they are moving their company to Pi with OpenRouter because they no longer trust Anthropic to protect their privacy.
The issue drew hundreds of reactions from other GitHub users.
The link between the leak and the spike in scam emails cannot be proven at this point. The leak itself, however, is documented by multiple users in multiple reports.
Why it matters
AI coding agents increasingly make network requests on the user’s behalf, often fetching documentation, package metadata or public records. Any personal data placed in the model’s context can end up in those requests if the model decides it is relevant. In this case, a reasonable-looking response to a site’s request for contact details turned into an unintended disclosure of personal information.
Until the fix ships, users who are concerned can review the network requests their agent makes and watch for approval prompts on outgoing web fetches.
Key takeaways
- Claude Code sometimes inserted the user’s Anthropic account email into User-Agent headers sent to sites such as Wikipedia, SEC and crates.io.
- A check added in version 2.1.317 was supposed to block these requests, but users report it can still be bypassed.
- Anthropic says the next version will remove the email from the model’s context.
- One user links the leak to dozens of daily scam emails, a claim that cannot currently be verified.


