Per GitHub anthropics/claude-code#107757 and user reports, Claude Code sometimes put the signed-in account email into the User-Agent of networked or shell tool calls. Reporter taylor-edwards (macOS, about 2.1.318) said phishing and scam mail followed. On Hacker News, a Claude Code engineer explained the email was added to model context to reduce @author-style hallucinations; when the model wrote curl, it sometimes used that address as a contact.
Takeaways:
- Upgrade to 2.1.317 or newer now. Per the HN staff reply, the stable channel may still sit on an older build (for example 2.1.311) without the built-in privacy mod.
- Confirm
cc-plugin-privacyis enabled. Per a GitHub contributor, the built-in mod is on by default and can be toggled in/plugins. - Per the official README: the mod only blocks one shape—Bash / PowerShell / Monitor input that holds the account email and names a User-Agent. It does not check WebFetch, WebSearch, or MCP; URL/body/
From:/curl -uwithout a UA word also pass. - Self-check logs: search session transcripts and proxy logs for your email plus
User-Agent/curl -A/wget -U. - If already exposed: rotate related credentials, watch the inbox, and give the agent a public role mailbox instead of a personal address.
- Codex, Cursor, and peers share the same context-hygiene lesson; this post focuses on Claude Code upgrade and self-check without pushing one client.
What happened (per public reports)
| Source | Gist |
|---|---|
| GitHub #107757 | Users reported email in User-Agent during web-related requests, then scam mail |
| Hacker News | Engineer: email will leave model context; until then use 2.1.317+ built-in mod |
| Official mods/privacy README | cc-plugin-privacy: a courtesy, not a boundary; one shell shape |
| DEV write-up | Third-party summary: stable may lag the guarded build—upgrade deliberately |
Per HN: some sites (Wikimedia, SEC EDGAR, and similar) ask scripted clients for a contact in User-Agent; if the only contact in context is your account email, the model may fill it in. Not framed as an intentional leak feature—same outcome for third parties.
Related checks: Claude Code Auto Mode Gateway 403/422, Postman plugin self-check, VS Code extension backdoor check.
Upgrade to 2.1.317+
Check the local build first:
claude --version
# need >= 2.1.317; upgrade if lower
Local version check took about 1 second here (example output: 2.1.316 (Claude Code)—below the floor, so upgrade).
Common upgrade paths (pick your install channel):
# latest channel: pull newest
claude update
# native install pinned version (example)
curl -fsSL https://claude.ai/install.sh | bash -s 2.1.317
# Homebrew: the claude-code cask often tracks stable; switch to latest when you need the guard
brew uninstall --cask claude-code
brew install --cask claude-code@latest
Per HN / third-party notes: claude update may not move a Homebrew install; apt/dnf/apk pinned to stable can lag too. You can set a floor in settings.json (per docs, auto-update / claude update refuse builds below it):
{
"autoUpdatesChannel": "stable",
"minimumVersion": "2.1.317"
}
Run claude --version again and confirm ≥ 2.1.317.
Confirm the privacy plugin cc-plugin-privacy
Per the GitHub contributor: 2.1.317+ ships a built-in mod named cc-plugin-privacy, on by default, switchable via /plugins.
In a Claude Code session:
- Open
/plugins - Find
cc-plugin-privacyunder Installed / builtin - Confirm it is enabled (do not turn it off by mistake)
Per the official README, these turn it off or bypass it:
/plugin disable, or"cc-plugin-privacy@builtin": falseunderenabledPluginsin user /--settings/ managed settings (repo settings cannot)- A server-side switch read once per session
- Another installed plugin’s
tool.checkhook sitting above and overruling the refusal - Sessions where the hooks module never loads /
hooks/register.tsdoes not run
Per official README: what it blocks and what it misses
One line from the README: this is a courtesy, not a boundary, and it covers one shape.
Refused (no prompt): a Bash, PowerShell, or Monitor call whose input holds the session account email and names a User-Agent. Naming includes USER_AGENT_WORD (for example User-Agent, user_agent, --user-agent, -UserAgent, UA=) and CLIENT_FLAGS (for example curl -A, wget -U, plus PowerShell-related -User). Refusal raises no confirm dialog; saved allow rules and auto-mode classifiers do not clear it.
Still passes (per official README):
- The address with no User-Agent named: URL, request body,
curl -u,From:header - WebFetch, WebSearch, and MCP tools are not checked
- Runtime-computed addresses (for example expanding
git config user.email), variables, scripts sent by filename, unnamed clients, other encodings
So: upgrade + plugin is damage control, not “email never leaves.” The lasting fix, per the HN engineer, is removing the account email from model context in a later release.
Log / self-check steps
- Version:
claude --version≥ 2.1.317 - Plugin:
/pluginsshowscc-plugin-privacyenabled - Transcripts: search
~/.claude/projects/**/*.jsonl(path may vary) for your email,User-Agent,curl -A,wget -U - Proxy / egress: filter the same keywords on local HTTPS proxy or company egress logs for recent Claude Code traffic
- Already exposed: rotate tokens/sessions that may be abused; tighten inbox filters; put a public role contact in project instructions so personal mail stays out of outbound context
Per user reports: even when the plugin shows loaded, some environments still let through a documented local echo test—treat the official README boundary as ground truth, keep watching the GitHub thread, and do not rely on a single UI checkbox.
How to read this next to other clients
Privacy tracks what sits in context, not a brand name:
- Claude Code: upgrade to 2.1.317+, confirm
cc-plugin-privacy, self-check logs as above - Codex / Cursor: keep personal email and secrets out of instructions that can trigger network tools; prefer a role mailbox or redacted contact
If you need a third-party Key across clients, register here and follow each client’s docs (Claude Code / Codex / Cursor all work).
FAQ
Still on an old build after upgrading stable?
Per HN: stable can lag by about a week. Switch to latest, pin via the install script, or set minimumVersion, then re-check claude --version.
Changelog says “asks,” README says refuse?
Per the official README source: matching shell calls are refused with no prompt. When changelog wording disagrees with the README, follow the public README / source.
Can I just disable the plugin?
No. Turning off cc-plugin-privacy removes this deterministic layer. Upgrade, keep it on, and wait for the context-removal release.
Can WebSearch still carry the email?
Per the official README: WebFetch / WebSearch / MCP are outside this mod. Do not assume upgrade alone ends outbound email; keep self-checking and minimize personal email in context.
Wrap-up
Per GitHub, HN, and the official privacy README: Claude Code put the login email into model context, and the model sometimes wrote it into User-Agent. Upgrade to 2.1.317+, confirm cc-plugin-privacy in /plugins, learn the README coverage limits, and search transcripts/proxy logs. Local claude --version took about 1 second here. If the email already hit third parties, rotate credentials and switch to a public contact address.
Related: Claude Code Auto Mode 403/422 · Postman plugin check · VS Code extension backdoor check



