News

Claude Code Email Leak: What the Fix Misses

Claude Code put users' account emails in web request headers. Here's what Anthropic's 2.1.317 fix covers, what it misses, and what to check today.

Claude Code has been putting its users’ account email addresses into the User-Agent header of web requests it makes on their behalf. A GitHub bug report filed on November 5 says one developer now gets “dozens of scam emails per day” because of it. Anthropic says it didn’t build this as a feature and shipped a guardrail in version 2.1.317. Independent testing says that guardrail is narrow.

If you run a coding agent on a machine that holds your real identity, this one is worth ten minutes today. Here’s what is confirmed, what isn’t, and what to check.

What happened

The new report, issue #107757 in the public anthropics/claude-code repository, was opened late on November 5 against version 2.1.318 on macOS. The reporter says Claude Code sent his email to third-party sites in a User-Agent header “while conducting web searches without my permission,” and wants the behavior removed from the harness entirely rather than made a setting. The thread passed 650 points on Hacker News within hours.

The mechanism, as the Claude Code team explained it in that thread, is simple. Claude Code puts your signed-in account email into the model’s context. Some sites, Wikipedia being the example given, ask automated clients to identify themselves with a contact address in the User-Agent. When you ask Claude to research something there, the model follows the site’s policy and writes your address into its curl call. A team member (GitHub user poteat) wrote that “nobody implemented this ‘share email addresses to websites’ as a feature” and that “models can be highly unpredictable.”

None of this is new. Issue #81138, filed July 25, complained that the account email is injected into the system prompt without consent or an off switch. That thread documents the model writing the address into Git commits, overriding the user’s configured identity. It also has reports of a subagent and the web version sending it to outside services. Roughly 100 days passed between that report and the fix.

What Anthropic shipped

The fix is a built-in module called cc-plugin-privacy, in Claude Code 2.1.317 and later. Per the maintainer’s comment, it is on by default and can be turned off in /plugins. Anthropic has also published its source in the repository’s mods/privacy folder.

Developer Frank Chu ran the published code against 23 test commands on November 6. His findings, which I haven’t re-run myself:

  • It blocks the exact pattern in the bug report: your literal address next to a User-Agent flag in a shell command.
  • It misses variations: the address in a From: header, in basic auth, in a shell variable or a git config lookup, or double-encoded.
  • By his reading of the README, it only watches shell tools, not WebFetch, WebSearch or MCP tools. One changelog tracker describes broader coverage, so read the README for your version before you rely on either description.
  • The README itself calls the check “a courtesy, not a boundary,” according to his quote.

Users in the thread also report problems. Two people on 2.1.318 said they couldn’t find the module in /plugins, and another posted a test in which a command that should have been refused ran anyway. Those are single-user reports, and Anthropic hadn’t responded to them when I checked on the morning of November 6.

What isn’t proven

The scam-email claim is the viral part, and it is the weakest. Commenters noted that spam has many sources, and some people who use unique Claude addresses saw nothing. No one has shown a chain from a specific request to a specific spam message. The privacy problem doesn’t depend on spam, though: an agent that holds your identity and leaks it anyway is the failure.

Why it matters beyond one email address

I’d argue the email is the least interesting part. The real lesson is that an instruction in the prompt, like “never send this to an outside service,” is a request, not a control. The text Claude Code injects reportedly includes exactly that warning, and the model still sent the address when a site’s rules made sending it look helpful. A guardrail that checks one spelling of one pattern is the same category of fix.

This is the same shape as the Postman plugin story we covered this week: a tool with real access doing something its user didn’t expect, with the fix arriving after the public noise. Our guide to safe AI agent workflows puts permissions and logging ahead of prompt wording for the same reason.

There’s a second point for professionals. Your email, repo names, employer and Git identity are all things an agent can pick up from context and repeat. If you use an agent with client or employer data, it’s worth reading our piece on using AI at work without leaking company data alongside this one.

What to do

This is a news report with practical steps, not formal security, legal or privacy advice. For regulatory questions in your jurisdiction, talk to your counsel or privacy officer.

  1. Update Claude Code to 2.1.317 or later, then open /plugins and confirm the privacy module is listed and enabled. If it isn’t there on your build, say so in the GitHub thread.
  2. Check your own logs. If you run a site or API, search your access logs for User-Agent strings containing email addresses and agent names. If you use Claude Code, review recent transcripts for curl or wget commands with -A, --user-agent or From: headers.
  3. Use an alias, not your main address. Sign in with a forwarding alias or a dedicated address if your plan allows it. One commenter reported that Anthropic doesn’t let you change the account email on an existing account, so check before you rely on this.
  4. Add your own rule, and don’t trust it alone. A line in CLAUDE.md that limits which sites may receive a contact address helps, but a model can ignore it. Pair it with a permission prompt on network commands.
  5. Control the network, not just the prompt. For sensitive work, run the agent in a container or VM with an egress allowlist, and keep personal and client data out of the workspace.

What to watch next

By late Friday, that first question had a clearer answer. On the Hacker News thread, Lydia Hallie of the Claude Code team wrote that Anthropic is removing the account email from the context the product gives the model, with the change due in a release early next week. She also apologized and said the privacy mod still does not catch every path, including when Claude writes a script and runs it. The stable channel was still on 2.1.311 when she posted, so users who want the current guardrail need 2.1.317 or later.

Two things are still open. First, whether the module’s coverage widens beyond the shell patterns it checks today, and whether the reports that it fails to refuse even those patterns get a reply. Second, whether anyone publishes evidence tying a real spam wave to these headers. We’ll update this post when the context-removal release lands or when Anthropic answers the gap reports.

Written November 6, 2026. The threads were still active, so details may change.

Kabeer Ahmed

Kabeer Ahmed is the founder and editor of The AI Year, where he explains AI tools, models, agents and AI security in plain English. He works on AI automations for businesses and is the founder of Runnex Logistics and of Aurel Digitals, a web design and automation agency. He writes practical guides for people using AI at work, covers selected news with links to primary sources, and reviews every post before it's published. Reach him at hello@theaiyear.com or on LinkedIn: https://www.linkedin.com/in/kabeerahmed09

Keep reading