Guide
How to check whether Claude Code sent your email
Published
Claude Code keeps a transcript of each session on your computer. You can search those transcripts for your email address and see whether it ever appeared in a command next to a User-Agent. Background: the Claude Code User-Agent email incident.
These commands only read files on your own computer. Nothing is sent anywhere.
Where the transcripts are
Claude Code stores transcripts in ~/.claude/projects/, with one folder per project and one .jsonl file per session. On Windows, ~ is your user folder (%USERPROFILE%, usually C:\Users\YourName).
Older sessions may already have been deleted: By default Claude Code keeps local transcripts for 30 days. You can change this with the cleanupPeriodDays setting.
macOS and Linux
Open Terminal and replace you@example.com with your email address in each command.
1. Which sessions mention your email at all?
grep -rl "you@example.com" ~/.claude/projects/
No output means your email doesn’t appear in any saved transcript.
2. Did it appear next to a User-Agent?
grep -rhoE ".{0,120}you@example\.com.{0,120}" ~/.claude/projects/ | grep -iE "user-agent|curl[^\"]* -A|wget[^\"]* -U|--user-agent"
In this command, put a backslash before each dot in your email (for example jane\.doe@gmail\.com).
Each line of output shows a snippet around a match. If you see your address inside a curl or wget command with -A, -U, --user-agent or a User-Agent: header, Claude Code wrote a command that included it.
Windows (PowerShell)
Get-ChildItem -Recurse "$HOME\.claude\projects" -Filter *.jsonl | Select-String -SimpleMatch "you@example.com" | Where-Object { $_.Line -match "user-agent|curl.* -A|wget.* -U" } | Select-Object Path, LineNumber
How to read the results
- A match inside a command that Claude proposed doesn’t always mean it ran. You may have denied it. Look at the lines around it in the transcript to see whether the command ran and what came back.
- A match in your own message or in a file Claude read is not a leak to a website.
- Transcripts only show what happened on this computer. Sessions on other machines have their own transcripts.
What to do next
- Update Claude Code and keep permission prompts on. See how to reduce what your AI coding agent can access.
- Run the Claude Code leak test to check your current version.
Find out in about a minute. Free, no sign-up, results deleted after 1 hour.
Run the Agent Leak Test