Coding Agent Privacy: What Your Agent Sends Out

Coding agent privacy audit of outgoing requests

Coding agent privacy became a front-page issue in early November, when a user reported that Claude Code had put their account email into web requests it wrote itself. The report, filed November 5 as issue #107757, said the address was showing up in User-Agent headers on requests to outside sites, followed by dozens of scam emails per day. The Hacker News thread about it passed 1,600 points and 500 comments.

The cause was small, and the lesson applies to every agent that can run curl.

How the email got out

Lydia Hallie of the Claude Code team described how it happened. Users disliked that Claude made up names for items such as @author tags, so the tool began giving the model the signed-in user’s email.

Some sites, Wikipedia being the best known, ask automated clients to include a contact address in their User-Agent. When Claude composed a curl command for such a site, it sometimes filled in the address it already held. Version 2.1.234 added an instruction to use the account email only for identifying the user and not to pass it to unrelated services unprompted. The model still leaked it.

What changed afterward

Hallie also said a release the next week would drop the email from the model’s context altogether. The changelog has since reached 2.1.332 without an entry for that, so it remains unconfirmed.

Anthropic also shipped a check named cc-plugin-privacy, enabled by default. Early testers found holes. One showed the 2.1.317 version failed to block the exact case it described. Another found User-Agent strings carrying project and client names, which an email filter can’t catch. Hallie acknowledged the first release missed scenarios such as Claude writing a script and running it afterward.

Two things to verify if you use Claude Code. The stable channel sat on 2.1.311 when the fix landed, older than every check, so look at your installed version. And the privacy check can be turned off under /plugins, so make sure nobody on your team has.

Why this isn’t a one-off

While it works, an agent usually holds more than its owner remembers:

  • A name and email taken from git config and git log.
  • Client and project names visible in the repo, folder path and README.
  • Internal hostnames, ticket numbers and branch names.
  • The contents of files it opened, such as .env files and customer data in fixtures.
  • The task description, which may cover unreleased plans.

Give that agent a tool for arbitrary HTTP requests and every page it reads becomes input. Some documentation sites already tell agents to call an endpoint with a parameter describing what the user is doing. That’s benign on its face, yet it matches the pattern of a prompt injection. The safe assumption is that data the agent holds can be sent out whenever it has network access. A prompt asking it to keep things private reduces the chance but doesn’t remove it.

How to audit your own agent

A local intercepting proxy such as mitmproxy lets you see the traffic yourself. Try it in a disposable project.

  1. Seed canaries. Create a file containing a unique marker string and set a fake name and email in the local git config.
  2. Start mitmdump on a local port and open the agent from a shell where HTTPS_PROXY points to it and the mitmproxy certificate is trusted for Node. An empty capture may just mean the CLI ignores the proxy variable.
  3. Hand it web chores, including one that makes it write and execute a script, because many reported gaps involved scripts.
  4. Search the saved flows for your markers, looking at headers like User-Agent and From, query strings and POST bodies.

Also look at where requests went. Vendor telemetry is expected. Requests to sites you never mentioned are not.

Safer defaults to set now

Start by keeping personal data out of the context. Use a noreply git identity on repos where agents work, keep real .env files unreadable, and don’t paste customer data into a session that can browse. Next, put rules in hooks instead of prompts. A short check that blocks any outgoing request containing your email or a client name runs every time and doesn’t depend on model behavior. Then separate duties: one session for private repos with no web access or only an allow-list, another for research. Finally, repeat the canary audit after major updates and whenever you add a plugin or MCP server, since these tools change fast.

Source: Stevinator

Written by

Saksham Bhargava

Saksham Bhargava runs Alteroid and has been writing about consumer technology for over five years, covering iPhone, Android, Windows, AI tools and gaming. With an MCA and six years of hands-on web development experience, he tests the features he writes about on his own devices and focuses on clear, practical guides that solve real problems. Away from the screen, he enjoys travelling to places most tourists skip.