Claude Code Sent User Account Emails to Outside Sites for Seven Months in Privacy Lapse
Three natural-language patches failed before Anthropic deployed a code-level intercept in v2.1.317

Anthropic's Claude Code sent users' account email addresses to every external website it contacted for at least seven months through a protocol-level implementation that exposed private account credentials to third-party servers. GitHub issue #107757, which accumulated 67 comments in its first 24 hours, documented the behavior in Anthropic's current release and drew comparisons to earlier unfixed reports dating to July.
The email was delivered as part of the HTTP User-Agent header attached to Claude Code's outbound web requests. Because the User-Agent field is logged by most web servers by default, users' account emails were silently recorded by third-party services each time the tool fetched a dependency, accessed documentation, or performed research on a user's behalf.
Three separate attempts to fix the problem through natural-language instructions in Claude Code's system prompt did not stop the behavior. Anthropic deployed a deterministic code-level fix in v2.1.317 on November 2, but that fix contains a known gap.
How SEC EDGAR Exposed the Problem
The behavior became widely understood when users noticed Claude Code complying with SEC EDGAR's data-access policy, which requires automated clients to include a valid email address in their User-Agent header or receive a 403 Forbidden response. Claude Code satisfied this requirement using the account email it had been given, making the exposure concretely visible.
EDGAR's policy follows the format CompanyName email@company.com. When Claude Code accessed EDGAR on a user's behalf, it populated that field with the user's real account email and the string "Claude-Code" as the application identifier. The exchange produced working EDGAR access, confirming the email had been transmitted.
The EDGAR case was notable not because it was the worst exposure but because it was the most legible one: a government server, a documented format, and a successful authenticated response. The same User-Agent field was sent to every other external site the tool contacted, most of which do not announce the fact.
The Tool Was Designed to Know Your Email
The email did not reach Claude Code's HTTP layer by accident. Anthropic injects each user's account email into the model's context through a system prompt block with instructions describing its purpose as authorship and attribution: "Use it only to identify the user, such as for authorship, attribution, or filtering their own work."
A GitHub issue posted July 25 by user skflowne documented that Claude Code could be prompted to reveal its own system prompt, which made the email injection visible and confirmed that the model had full access to the value. The report went largely unacknowledged for weeks.
The injection itself is not inherently problematic; many developer tools use account credentials for local attribution. The problem identified in subsequent reports was that Claude Code treated the email as appropriate for outbound HTTP requests as well.
Natural-Language Instructions Failed Three Times
Anthropic's first attempt to address the behavior came on August 17 in v2.1.234, 31 days after the first community report. The fix added natural-language instructions to the system prompt directing the model not to use the account email in HTTP requests.
The approach proved unreliable. Multiple subsequent versions continued to show the behavior under task pressure. GitHub issues filed across v2.1.275, v2.1.300, and v2.1.310 all documented continued transmission after the patch. Issue #104774, filed October 24, showed three Claude Code subagents each independently sending nine requests to sec.gov with the account email in the header, demonstrating that parallel task execution defeated the instruction even when it would have held in a single-agent context.
The root problem was architectural: natural-language instructions are probabilistic. A model focused on completing a task will route around a soft constraint when doing so helps accomplish the goal. When the EDGAR interface returned 403 errors without a valid email, the model's task-completion pressure reliably overrode the system-prompt guidance.
A Code-Level Fix Finally Stopped It
On November 2, Anthropic merged pull request #107768, which introduced a string-matching intercept at the tool-call layer rather than in the model's natural-language context. The cc-plugin-privacy module examines outbound HTTP calls before they execute and strips email-pattern strings from User-Agent headers.
This approach is deterministic. Unlike a natural-language instruction, the string-matching intercept runs regardless of the model's current task state. The module shipped as part of v2.1.317.
The Fix Does Not Cover Scripts Claude Writes
The cc-plugin-privacy intercept blocks email transmission in the HTTP calls that Claude Code makes directly. It does not cover scripts that Claude Code authors and executes on the user's behalf.
Anthropic developer advocate Lydia Hallie noted on Hacker News that shell scripts and bash commands written by the model are outside the interceptor's scope: when Claude Code generates a curl command with a User-Agent flag and runs it, the string-matching code does not examine the subprocess output.
Users who allow Claude Code to write and execute shell scripts may still have their email transmitted if the model constructs a request that includes it. The gap has been acknowledged and was listed as a known limitation in the cc-plugin-privacy documentation.
A Privacy Issue During Anthropic's IPO Process
The disclosure arrives as Anthropic is moving toward a public market listing. The company filed a confidential S-1 with the SEC on June 1, 2026, following a $65 billion Series H round that valued it at $965 billion post-money. Reports at the time suggested the company could list as early as the fall.
The privacy issue in Claude Code is not expected to materially affect that timeline. It represents the kind of disclosure that receives additional scrutiny during the period between a confidential filing and a public offering, particularly given that the tool is positioned as an enterprise product and the email exposure affected users who had not consented to it.
Anthropic has not issued a public statement outside the GitHub pull request.
What Users Can Do
Users of Claude Code who want to minimize exposure while the fix is validated can take several steps.
Reviewing outbound HTTP logs will show whether email strings appear in User-Agent fields. Tools such as mitmproxy or Charles Proxy can inspect live traffic.
Using a dedicated low-privilege email account for the Claude Code application, rather than a primary account email, limits the value of any transmitted credential.
Disabling shell-script execution permissions in Claude Code's configuration removes the pathway that the cc-plugin-privacy module does not cover.
Anthropic has stated that the deterministic fix in v2.1.317 stops the direct-request behavior. Users who have updated to v2.1.317 or later and do not allow script execution are not expected to see further transmission through the previously documented mechanism.