Claude Code puts your email address in the User-Agent header on web searches, GitHub issue draws 179 reactions
- Claude Code adds a User-Agent request header of the form
my-session-slug/1 <my.name@example.com>when it searches the web, so the user's email address reaches third-party sites the user never visited; the issue carries the labelsarea:security,area:tools,bug, andplatform:macosand has drawn 179 thumbs-up reactions. - Reporter taylor-edwards says the header brought dozens of scam and phishing emails per day and is moving their company off Claude Code to Pi with OpenRouter, arguing the header should be removed from the harness rather than left as an opt-in setting.
- Commenters say the address is sent when a site's download or anti-bot policy asks for it, such as Wikipedia and the SEC, and that the behavior was reported earlier in July (issue 81138) and October (issue 101659); one user reproduced it while Claude downloaded from crates.io.
- Users who register a unique address per site, or a custom domain with a salt, report zero spam reaching those addresses, and others argue LinkedIn and GitHub scraping explain most of the reported spam.
- Codex CLI 0.159.0 was checked and its User-Agent contains only client and version, OS and architecture, and terminal, with no email address; commenters note the address sits in the model's context regardless, so it can end up in a header anyway.
Hacker News 의견들
Claude Code appends a User-Agent header like my-session-slug/1 whenever it searches the web. I get dozens of scam and phishing emails a day from properties I've never personally visited, and this isn't something that should be opt-in or opt-out.
Wow, that's insane. A human engineer would almost certainly never ship that. This is exactly what you get when you go all in on the AI software factory.
Was it even a human decision, or one of those subtle Claude choices nobody notices until it bites you? The answer will be a line in AGENTS.md, which isn't the same as having sense.
I genuinely don't understand it from a user perspective. Is this an anti-abuse method or some weird promotion for Claude? It makes no sense.
I think they do it because otherwise the sites block the requests. But if you're publishing an address, use a throwaway one. Anonymity usually only works one way and the businesses aren't going to eat all the cost.
This is why I stick to the chatbots on a website instead of Claude Code or Cursor. I want to see exactly what's being sent. I did use Copilot for a while when it came out.
How is that an argument against an on-host harness? If you own the code and control the supply chain, this isn't a problem, because you can read it.
I asked Astra to verify that Codex does this and it doesn't. Codex CLI 0.159.0 sends client and version, OS and architecture, and terminal. No email address. Thanks for not screwing this up, OpenAI.
You asked a model to verify itself and that allayed your fears? Fire up a little web server locally, have the agent make a request to it, then read the logs. And the email is in the context anyway, so one curl -H 'User-Agent: ...' call is all it takes.
This explains the flood of spam on my work email since I switched to Claude. It's personalized with my first and last name, not just 'dear customer'. I assumed someone had breached our company database.
That's almost certainly coincidence. Claude isn't spraying your address on every request. It supplies it when sites ask as part of a download or anti-bot policy, like Wikipedia and the SEC. Most of that spam traces back to LinkedIn and GitHub scraping.
I use a unique email address for every site I sign up for, so Claude never had my main one. Months of use and not a single spam message to that address.
Same here. Custom domain with a salt and nonce, so it isn't just . The only mail that lands there is Anthropic's own feature announcements.
Fifteen minutes old, no proof, no code, nothing but a random claim, and it's on the front page of HN anyway. It's crazy how easily people upvote that.
It was reported back in October, issue 101659, and again in July, issue 81138. I reproduced it myself: claude added my email address while downloading stuff from crates.io.