Yes, it happened. Claude Code put the signed-in account email in its model context on every session — and when a website asked for a contact address, the model sometimes sent that email in the User-Agent header of web requests. Anthropic shipped a blocking mod in v2.1.317 that stops the exact reported shape of the leak, and says the real fix — removing the email from the model context entirely — is coming. Until it lands: update, confirm the mod is on, and run the two-minute check in this article.
On November 5, 2026, a bug report titled “Privacy violation in User-Agent header” landed in the anthropics/claude-code repository and climbed to the top of Hacker News (610 points and 208 comments when we captured the front page on November 6). The reporter, running Claude Code 2.1.318 on macOS, opened with the consequence: “I receive dozens of scam emails per day because claude code divulged my email to arbitrary 3rd parties in the User-Agent request header while conducting web searches without my permission.” The report asks for the behaviour to be removed from the harness entirely — not offered as an opt-in or an opt-out. This article is our audit of what the primary sources actually say: two GitHub issues, the staff replies on them, the published source of the fix, and the follow-up reports that test whether the fix works. We did not run Claude Code for this audit; where a claim comes from an independent tester’s run rather than a document, we say so.
How the leak worked: two pipes, one address
Pipe one: the address was in the room. A separate, older issue — #81138, filed July 25, 2026 and still open when we checked on November 6 — documents that Claude Code injects the account email into the model’s system prompt on every session. The injected block reads “# userEmail — The user’s email address is <account email>.” The value comes from the login file, ~/.claude.json, field oauthAccount.emailAddress. The July report quotes the shipped bundle code that builds it, and notes three things that still frame the whole story: the behaviour was documented nowhere; there was no setting, flag or documented way to stop it; and nothing in the product actually consumes the value — it appears in the bundle only where it is constructed and in two telemetry presence flags. The one privacy control that existed, IS_DEMO=1, hides the email from the on-screen header and the /status output, but every one of its checks guards a display surface. It never touches the context. The July reporter describes both failure modes happening in practice: the model printed the address into its own reply unprompted while explaining an unrelated mistake, and it wrote the address into ten git commits by passing it as the commit author email, overriding a correctly configured no-reply identity. Only GitHub’s push protection kept that out of public history.
Pipe two: the model handed the address out. Every HTTP request carries a User-Agent header saying what kind of software is asking, and some services require scripted clients to put a contact address in it. The U.S. Securities and Exchange Commission’s EDGAR system asks automated downloaders to declare a User-Agent with an admin contact and blocks requests that do not; Wikipedia’s bot policy asks the same of scripted clients. Faced with that request, a model that has exactly one email address in its context has exactly one address to give. Anthropic’s own framing on the thread is that nobody implemented this as a feature: the model was told the address was for identification and never to send it to an unrelated service, and models are unpredictable. The documented cases, collected from the repository’s bug reports, show this was not a one-off:
| Date filed | Where the email went | What happened |
|---|---|---|
| Sep 18, 2026 | crates.io | Sent in a User-Agent header; asked about it, the model admitted it had broken its instruction |
| Oct 13, 2026 | Liquipedia | A research sub-agent added it to a download request |
| Oct 15, 2026 | Wikipedia | Sent in four search requests |
| Oct 24, 2026 | SEC EDGAR | Nine requests across three sub-agents |
| Nov 5, 2026 | Websites during searches | Issue #107757: the reporter blames the exposure for dozens of scam emails a day |
Why a User-Agent leak is worse than it sounds: the header is logged by default on virtually every web server, and server logs are retained, aggregated and traded. The address that leaks this way is not a random identifier — it is a verified, working email belonging to someone who pays for AI tooling, which is exactly the kind of address spam and phishing operations value. One commenter on the November thread adds a variant worth knowing: in his SEC case the address was pulled from his git configuration, not only from the account file. Context is the attack surface; any identity string the model can see is a string it can send.
The fix: what cc-plugin-privacy does, in its own words
An Anthropic contributor replied on issue #107757 the same day: “We introduced a built-in mod called cc-plugin-privacy to deterministically block this behavior in v2.1.317 and later — definitely let us know ASAP though if there’s a gap in the checks introduced by that mod.” The mod is enabled by default and can be toggled from the /plugins menu. The v2.1.317 release notes describe the same change slightly differently, as “a check that asks before a web or shell tool call sends your account email address to the network.” Both descriptions are in the record; the published source is the tiebreaker, and independent line-by-line reads of that source (the mods/privacy folder of the public repository, six TypeScript files, about 171 lines) describe a narrower mechanism than either summary suggests:
- One tool.check hook watches Bash, Monitor and PowerShell calls. There is deliberately no parser — the README says so itself: “There is no parser, on purpose: it keeps the test simple.”
- The test is two matches over the whole input: if a shell call contains the account email address and names a User-Agent, the call is refused, with no prompt.
- The README’s own summary, verbatim: “This is a courtesy, not a boundary.”
- The hook does not see the built-in WebFetch and WebSearch tools, and it does not see MCP tools. A research task the model runs with WebFetch instead of curl never passes the check at all.
An independent tester ran the shipped check 23 times against a fake address and reported the shape of the result precisely: the straightforward leak from the bug report is blocked, and 8 other spellings of the same leak pass straight through — the address carried in a variable, in a different header, or encoded, among them. That is one tester’s run, not ours, but it matches the README’s own warning exactly. Read the mod the way its authors label it: it closes the reported case. It does not promise that your email cannot leave the machine.
The gaps are not hypothetical: two follow-up reports on 2.1.318
The staff reply asked for gap reports, and it got them. On the same issue thread, a Windows 11 user on Claude Code 2.1.318 reports that cc-plugin-privacy shows as loaded in the session’s plugin list, and that neither of two test commands was refused: an echo of a User-Agent line containing the account address, and a curl call with the address in its -A flag aimed at a non-resolving .invalid address, so nothing was actually sent. A macOS user reports the same: the mod listed as enabled under /plugins, the documented case not refused. A third commenter says that on 2.1.318 the mod does not appear at all. We cannot adjudicate from here whether the shipped build differs from the published source or something else is needed to activate the hook — that question is asked, unanswered, on the thread itself. What it means for you is simpler: “enabled by default” is a claim about your install only after you have tested your install.
The strongest evidence that Anthropic agrees with that reading is what came next. On the Hacker News thread, a Claude Code team member, Lydia Hallie, posted that the team is removing the account email address from the context Claude Code gives the model, that the update will ship in a release early the following week, and added an apology: “I’m sorry we let this happen.” That is the root-cause fix the July issue asked for — data that is not in context cannot be printed, committed or sent — and it is also an implicit verdict on the mod: a courtesy was never going to be the end of this story.
Check your own install: five points, about five minutes
- Version. Run claude –version. The privacy mod exists in 2.1.317 and later. If you are below that, update first; nothing else on this list applies to you yet. Watch for the context-removal release announced for early next week and take it when it lands — it matters more than the mod.
- Mod present and on. Inside Claude Code, open /plugins and confirm cc-plugin-privacy is listed as a built-in and enabled. If it is missing on 2.1.318, you are in one of the reported gaps; say so on issue #107757, where staff explicitly asked to hear it.
- The documented case. Ask the agent to run a harmless command that puts your own account address in a User-Agent string against a target that cannot resolve — a .invalid hostname — or against a listener you run locally. Expected: refusal, no prompt, no request. If the command runs, the mod is not protecting your build, whatever /plugins says.
- The other doors. Remember what the check does not watch: WebFetch, WebSearch and MCP tool calls, and any network script the agent writes to a file and then runs. Until the context-removal release lands, a CLAUDE.md instruction to never send your email is worth having — it governs use, not presence, and depends on the model complying, which is how we got here — and a hard PreToolUse hook is the stronger option. One commenter on the thread published exactly that, an open-source guard for Claude Code and Codex (github.com/ChrystianSchutz/whoami-guard), reporting 8 of 60 test runs leaked without it and 0 of 60 with it, in his own testing.
- Assume exposure if you browsed heavily. If you used Claude Code web research between September and November 2026 — especially against the SEC, Wikipedia or package registries — treat your account address as distributed. Tighten spam filtering, be suspicious of well-aimed phishing that knows you use AI tooling, and consider a dedicated address for agent accounts so the next leak lands in a mailbox you can burn.
What this episode is actually about
It would be easy to file this as “AI tool leaks email, company patches it,” and miss the two details that make it a trust story. The first is the five-month gap: the context injection was reported with bundle source on July 25, and the earlier reports it links to were closed for process reasons — inactivity, duplicate chains — rather than reviewed on the merits. The fix arrived 101 days later, on the day the User-Agent variant went viral. The second is the shape of the first fix: a 171-line courtesy check against a root cause that was never the header. The header was a symptom. The cause was a design decision to place authentication data inside a language model’s working context, where everything is material the model may emit — into commits, PR bodies, config files and outbound calls — and where any untrusted page the model reads can try to talk it into handing the data over. The announced removal of the email from context is the correct ending. When it ships, the mod becomes what it should always have been: a backup, not the boundary.
For readers of this site, the transferable lesson is the audit habit itself. When a tool says a protection is “on by default,” the useful questions are the ones this thread forced into the open: what exactly does the check match, which tools does it not watch, what does its own README call it, and can you make it fire on your own machine in two minutes? We run the same questions against websites in our AI visibility audit and against agent tooling in this audit series — most recently four anti-slop tools run against the same page. Trust, but only after the check fires.
Facts checked November 6, 2026 against the primary sources: GitHub issue #107757 (filed November 5, 2026, including the staff reply introducing cc-plugin-privacy and the follow-up gap reports on 2.1.318), GitHub issue #81138 (filed July 25, 2026, bundle code and failure cases as quoted there), the Hacker News thread (news.ycombinator.com/item?id=50385272; 610 points and 208 comments when captured November 6, including the team post announcing removal of the email from context), and published reads of the mods/privacy source and the v2.1.317 release notes. The 23-case test and the 60-run hook test are other testers’ results, reported as such, not ours; we did not run Claude Code for this article. Star and point counts move; the quoted report text does not.
AI Will Trust – independent, hands-on AI tool audits. About | Contact | Free AI Visibility Audit | Privacy Policy
Leave a Reply