Original Reddit post

this is #2 on hacker news right now (~1,300 points) and i haven’t seen it here yet, so: claude code sometimes puts your account email in the User-Agent header when it fetches stuff from the web. something like my-session/1 you@yourcompany.com . every site it hits can log that. github issue: https://github.com/anthropics/claude-code/issues/107757 (500+ thumbs up). the reporter says he gets dozens of scam emails a day from sites he never visited, and a few people on HN said the same about their work inbox, personalized with their full name. the likely why, from what i can tell: some sites actually ask for a contact email in the User-Agent. SEC EDGAR requires one, wikimedia’s bot policy asks for one. so the model learned “polite scraper = put an email in the UA” and fills in the one it has, which is yours. not malicious, still bad. the part i’d pay attention to: advice going around says update past 2.1.317. the reporter on the issue is on 2.1.318. so updating alone doesn’t seem to close it. what you can actually do today: - read the curl / fetch commands before you approve them, the email is right there in the -A or User-Agent flag - a PreToolUse hook on Bash that blocks any command containing your email. it runs before the command, so the model can’t talk its way around it. test it with a harmless curl that should get blocked - if you’re in auto-approve mode for web stuff, this is a good reason to stop for a bit anyone checked whether WebFetch / WebSearch do it too, or is it only bash curl? submitted by /u/michaelTM_ai

Originally posted by u/michaelTM_ai on r/ClaudeCode