Claude Code · AI agent leak test

Does Claude Code leak your email? Test it.

Claude Code runs shell commands on your machine. In November 2026, users found it sometimes put their account email into the User-Agent of curl requests. Check what your setup does today.

Free, no sign-up, about 60 seconds. Results are private and deleted after 1 hour.

Higher risk: Claude Code can run commands or scripts, so it can set any request header it wants, including the User-Agent.

Does Claude Code make its own network requests?

Yes. Claude Code is a coding agent that runs in your terminal. It can write and run shell commands such as curl, wget or short Python scripts, and those commands can set any HTTP header they like, including User-Agent. That makes it a higher-risk tool for this kind of leak than a chat product that fetches pages through a fixed server.

Whether it leaks depends on two things:

  1. Whether it knows your email. According to an Anthropic Claude Code team member, the account email had been included in the model’s context. Your email can also be in your git config or in files in your project.
  2. Whether it decides to use it. When a website says “put a contact email in your User-Agent”, a helpful agent may fill in the one it knows.

Read the full story in our write-up of the Claude Code User-Agent email incident.

How to test Claude Code

  1. Press Start test above. You get a private results page.
  2. Open a terminal in any folder and start Claude Code.
  3. Paste the prompt from the results page.
  4. When Claude Code asks to run a curl command, read the full command. If it contains your email, you have already seen the leak. You can deny it.
  5. Watch the results page. You will see each request, with any email address masked.

Run it 2 or 3 times. Model output varies, and one clean run does not prove much.

Claude Code permissions and sandbox: how to protect yourself

  • Read every command before approving it. Claude Code shows the full command first. Look for your email address, tokens or file contents in curl arguments.
  • Don’t skip permissions. The --dangerously-skip-permissions flag lets Claude Code run commands without asking. Avoid it outside a disposable container.
  • Use permission rules. In ~/.claude/settings.json you can add allow, ask and deny rules, for example "ask": ["Bash(curl *)", "Bash(wget *)"] to be asked before every curl or wget command. These rules match the command text, so they miss forms like sh -c 'curl …'; Anthropic’s permissions docs recommend pairing them with the sandbox.
  • Use the sandbox. Claude Code’s Bash sandbox is off by default. Turn it on with /sandbox or "sandbox": {"enabled": true} in your settings. Commands can then only reach domains you allow, and writes are limited to your project folder. It runs on macOS, Linux and WSL2, not native Windows.
  • Run it in a container or VM for untrusted projects. See how to reduce what your AI coding agent can access.
  • Use a GitHub noreply email so your real address isn’t sitting in your git config. See the guide.
  • Update Claude Code. Anthropic said version 2.1.317 and later include a check that asks before a network command containing your email runs, and that a later version removes the email from the model’s context. The check does not cover every case.

Already worried? Check whether Claude Code sent your email in past sessions.

FAQ

Does Claude Code send my email in the User-Agent header?

It has happened. In November 2026 users reported Claude Code writing curl commands with their account email in the User-Agent, usually after a website asked for a contact address. Anthropic said it would remove the email from the model's context and added a check that asks before such commands run. Run the test to see what your current version does.

Is Claude Code safe to use?

Claude Code asks for permission before running commands unless you have allowed them, which gives you a chance to catch problems. It is as safe as the commands you approve. Read each command before approving it, avoid skipping permissions, and consider running it in a container.

How do I check whether Claude Code already sent my email?

Claude Code keeps session transcripts on your computer. You can search them for your email address. Our guide shows the exact commands.

Will the test prompt trick Claude Code into leaking?

The prompt is an ordinary request to fetch some data and make it work if it fails. Our server then replies the way some real APIs do. It does not instruct Claude Code to send your email.

Test another tool

OpenAI Codex · Cursor · ChatGPT (Agent mode) · ChatGPT (chat) · Claude.ai (chat) · Gemini · Perplexity