> ## Content Index
> Fetch the complete content index at: https://claudefox.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# Claude Code was putting user emails in User-Agent headers
- URL: https://claudefox.com/claude-code-was-putting-user-emails-in-user-agent-headers/
- Published: 2026-11-07T08:57:00.000Z
- Updated: 2026-11-20T02:41:21.000Z
- Description: A November 5 GitHub issue showed Claude Code sometimes put the signed-in account email in the User-Agent of requests it wrote. Why it happened, what versions 2.1.317 to 2.1.325 changed, what is still open, and how to check your own setup.
- Author: hupicake
- Tags: News

*Updated November 20, 2026: Expanded with Anthropic's explanation, the changelog fixes through 2.1.325, remaining gaps and how to check.*

On November 5, 2026, a Claude Code user opened issue #107757 on the anthropics/claude-code repo, reporting version 2.1.318 on macOS. They said the tool had sent their account email to third parties in the User-Agent header while doing web searches, without their permission, and that they now get dozens of scam emails a day; the issue does not show how much of that spam traces back to the header. It drew more than 800 thumbs-up and over 100 comments. The user said they were migrating their company to Pi with OpenRouter.

## Why the email was there

Lydia Hallie of the Claude Code team explained the cause in a Hacker News comment the next day. Users had complained that Claude made up names for things like @author tags because it knew nothing about the account. So Claude Code began putting the signed-in user's email into the model's context. An older changelog entry confirms Claude was told to use the address only to identify the user.

The trouble came when Claude wrote its own network commands, such as a curl call. Some sites ask automated clients to include a contact address, and Claude sometimes filled that in with the email it had been given. A commenter later quoted the injected instruction, which already told the model to treat the address as private and never share it with external services without approval. Hallie apologised and said the behaviour should have been caught earlier.

## What Anthropic changed

- 2.1.317 added a check that asks before a web or shell tool call sends your account email to the network. An Anthropic contributor on the issue described it as a built-in mod called cc-plugin-privacy that deterministically blocks the behaviour, on by default and visible under /plugins. He said he would try to publish its source like Anthropic's other built-in mods.
- 2.1.321 narrowed it: shell commands that hold your email and name a User-Agent are refused without a prompt, so other commands and scheduled runs no longer stall at the question.
- 2.1.325 widened it again: the check also refuses your email as a client identity in scripts a command runs, file writes, web fetches and MCP calls.

Hallie also said Anthropic was removing the email from the context Claude Code gives the model, in a release expected early the following week. In the changelog as of November 20, covering versions 2.1.317 through 2.1.329, we found no entry for that change. On November 18 one commenter reported that 2.1.327 still puts the email in the model's context, and another quoted the instruction the desktop app injects.

## Gaps users reported

The first version of the check was not airtight, and Hallie said as much: it did not cover every case, such as Claude writing a script and running it. One commenter ran a probe on 2.1.319, a curl command to a closed local port with the email in the User-Agent. Claude Code asked for approval, and once approved the command ran; the privacy mod, listed as enabled, did not block it. He noted it was unknown whether the mod skips loopback addresses, and that in one run the model filled a placeholder for the account email with the real address on its own.

Another commenter found that User-Agent strings Claude wrote also included project, client or task names, tying the user's identity to what they were working on. He pointed out that the email check matches only the account address, so a name with no email passes, and so did a script the model wrote with Edit and then ran. 2.1.325 extended the check to scripts, file writes, web fetches and MCP calls, but nothing in the changelog addresses the naming part. In the comments we reviewed, no one had published a full audit.

## What to do now

- Update. Hallie noted that the stable channel was still on 2.1.311 at the time, which predates every fix, so check which version and channel you are on.
- Leave the privacy mod on. It is enabled by default and can be switched off under /plugins, so confirm nobody on your team has disabled it.
- Watch your own traffic if you need certainty. A commenter suggested running the CLI through a local intercepting proxy such as mitmproxy, with a throwaway project that has a canary string in a file and in your git config, then searching captured requests for both the canary and your email.

That commenter's setup, for Node-based CLIs that honour the proxy variable, looks like this. It needs no system-wide trust change; if captures stay empty, check the CLI's proxy docs before concluding nothing leaked. Use it only on the throwaway project, not real work:

```
mitmdump -p 8080
# in the shell that launches Claude Code:
export HTTPS_PROXY=http://127.0.0.1:8080
export NODE_EXTRA_CA_CERTS=~/.mitmproxy/mitmproxy-ca-cert.pem
```

For the email still in context, one commenter published a third-party mod, email-guard, that removes the address from the context, asks before any command that contains or reads it, and redacts it from tool output. He tested it on 2.1.327 with the built-in mod on, and it covers only the Claude account email, not your git email. It is third-party code with access to your session, so review it before installing:

```
claude plugin marketplace add anthonylau/claude-code-email-guard
claude plugin install email-guard@email-guard
```

## Our take

A detail was added to the prompt for a harmless reason, and despite an instruction to keep it private, the model put it into requests to the open web. In our view, the lesson is that a prompt rule is a weak guard for anything in an agent's context. Checks enforced by the harness, which Anthropic's contributor describes as deterministic, are the sturdier kind of fix. But the cleaner fix it promised, not giving the model the address at all, had not shown up in the changelog when we checked on November 20; nor had anything addressing the project-name leak.

Source: [Bug Report: Privacy violation in User-Agent header, issue #107757 (anthropics/claude-code on GitHub)](https://github.com/anthropics/claude-code/issues/107757?ref=claudefox.com), [Claude Code changelog (GitHub)](https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md?ref=claudefox.com), [Lydia Hallie of the Claude Code team on the cause and fix (Hacker News)](https://news.ycombinator.com/item?id=50388176&ref=claudefox.com)

This story first appeared in the [claudefox daily briefing for November 7, 2026](https://claudefox.com/daily-2026-11-07/).