What Causes This Issue
Users in the Apple Support Community have reported that Claude Code, Anthropic’s command-line coding agent, transmits the authenticated user’s email address to external websites during normal operation. This behavior occurs when the tool makes API calls to Anthropic’s backend, which then includes the account email in request headers or payloads forwarded to third-party destinations.
The root cause appears to be how Claude Code handles authentication tokens. When you sign in via claude auth login, the CLI stores an OAuth token linked to your Anthropic account. Subsequent requests carry this identity, and certain proxy or telemetry endpoints echo the associated email to downstream services. This is not a macOS vulnerability — it is a design choice in the Claude Code client’s network stack.
Community testing confirms the email appears in outbound requests even when no explicit user action triggers a third-party call. The issue affects all supported platforms, but macOS users are most vocal due to the prevalence of Homebrew and shell profile configurations that auto-load credentials.
Step-by-Step Fixes
- Revoke and regenerate your Anthropic API key — Log into the Anthropic Console, delete the existing key used by Claude Code, and create a new one. Run
claude auth logoutfollowed byclaude auth loginto re-authenticate with the fresh credential. This severs the link between the old token and your email in Anthropic’s systems. - Set the ANONYMIZE_TELEMETRY environment variable — Add
export ANONYMIZE_TELEMETRY=1to your shell profile (~/.zshrc,~/.bash_profile, or~/.config/fish/config.fish). Restart your terminal. Users in the Apple Support Community report this flag strips identifying fields from telemetry payloads, though it may not affect all request paths. - Block outbound telemetry at the network level — Use Little Snitch, LuLu, or
/etc/hoststo deny connections totelemetry.anthropic.comandapi.anthropic.comon non-essential ports. This prevents the client from sending any data outside the core API loop. Test withclaude --versionto ensure basic functionality remains. - Run Claude Code in a dedicated, isolated user account — Create a macOS user with no Apple ID linkage. Install Claude Code there, authenticate with a burner Anthropic account, and use
su - claudeuser -c "claude ..."from your main session. This contains the email exposure to a disposable identity. - Switch to API-only usage without the CLI auth flow — Generate a long-lived API key in the Anthropic Console. Set
export ANTHROPIC_API_KEY=sk-...in your environment and invoke the REST endpoints directly viacurlor a thin wrapper script. This bypasses the OAuth client entirely, eliminating the email leak vector.
Additional Solutions
Audit your shell configuration for hardcoded credentials. Search grep -r "anthropic\|claude" ~/.zshrc ~/.bashrc ~/.profile ~/.*rc 2>/dev/null. Remove any lines exporting tokens or emails. Store secrets in macOS Keychain instead, accessed via security find-generic-password -a "$USER" -s "anthropic" -w.
Enable macOS App Sandbox for the CLI — Codesign a wrapper binary with com.apple.security.network.client only, denying com.apple.security.network.server and com.apple.security.personal-information entitlements. This requires Xcode Command Line Tools and codesign --entitlements. The sandboxed process cannot read your Keychain or address book, limiting data exfiltration.
Monitor outbound traffic with Wireshark or nettop. Filter for dst port 443 and ip.dst == $(dig +short api.anthropic.com). Inspect HTTP/2 frames for x-user-email or authorization headers containing your address. This verifies whether fixes are effective.
Use a privacy-focused proxy like Proxyman or mitmproxy to rewrite request headers. Configure a rule: if request.headers["x-user-email"]: request.headers["x-user-email"] = "redacted@local". Point Claude Code at http://127.0.0.1:8080 via export HTTP_PROXY=http://127.0.0.1:8080.
File a feedback report with Anthropic via their support portal. Reference the community thread and request a no-telemetry build flag or an --anonymous CLI argument. Vendor pressure accelerates official remediation.
When to Contact Apple Support
Contact Apple Support only if the issue manifests as a macOS system failure — for example, Claude Code triggers a kernel panic, corrupts your Keychain, or causes loginwindow crashes. Apple does not support third-party CLI tools, and their advisors cannot modify Anthropic’s server behavior.
Before opening a case, collect a sysdiagnose (sudo sysdiagnose) and the Console.app logs filtered to process:claude. Attach these if Apple Engineering requests them. Otherwise, direct all privacy concerns to Anthropic’s security team at security@anthropic.com.
FAQ
Does this affect the Claude web or desktop apps? No. The email leak is specific to the Claude Code CLI’s OAuth implementation. The browser and Electron apps use separate authentication flows.
Can I use Claude Code without an Anthropic account? Not officially. The CLI requires authentication. The API-key workaround (Fix #5) is the closest alternative, but it still ties usage to a key associated with an account.
Will setting ANONYMIZE_TELEMETRY break features? Community reports indicate no loss of core coding assistance. Some usage analytics and crash reporting may be disabled, which is the intended effect.
Is my email exposed to every website I visit? Only to destinations that receive forwarded requests from Anthropic’s backend — typically telemetry collectors, not arbitrary sites. However, the header propagation means any downstream processor in that chain sees it.
Has Anthropic acknowledged the issue? As of this writing, no public statement exists. Users in the Apple Support Community recommend treating the current behavior as intentional until a changelog notes otherwise.






































