If you pay for Claude Pro or Max and use Claude Code from that account, your coding sessions can end up in Claude's training data. Paying for the plan doesn't opt you out. There's a toggle for that, on a settings page plenty of people have never opened.
This week two Anthropic stories hit the Hacker News front page on the same day. One was Anthropic's own privacy article, Is my data used for model training? (219 points). The other was the Stanford Daily report that books by Stanford professors, Tobias Wolff and Abraham Verghese among them, were pulled from shadow libraries like LibGen and PiLiMi to train Claude (525 points). Anthropic already agreed to a $1.5 billion settlement in Bartz v. Anthropic covering nearly 500,000 works. Wolff and Chang-Rae Lee opted out of it and filed their own suit in May 2026.
I'm not going to argue the copyright case here. The practical question for developers is simpler: which of the places you type into Claude can feed the next model, and how do you turn that off? Below I go through the official docs plan by plan and list the exact settings.
Which Claude plans train on your data
There are two sets of terms, and which one you're under decides most of this.
| Surface | Trains on your chats/code by default? | How to stop it | Retention |
|---|---|---|---|
| Claude Free, Pro, Max (web, desktop, mobile) | Yes, if the "Help Improve our AI models" toggle is on | Turn the toggle off | 5 years if on, 30 days if off |
| Claude Code signed in with Free/Pro/Max | Same toggle as above | Same toggle, or /privacy-settings | Same as above |
| Team and Enterprise (Claude for Work) | No | Owners can disable "Rate chats" | 30 days standard |
| Anthropic API / Console keys | No | Don't join the Development Partner Program | 30 days standard, ZDR for qualified orgs |
| Bedrock, Google Cloud, Microsoft Foundry | No | Nothing to do | See your cloud provider's terms |
The consumer row comes from Anthropic's consumer terms update (August 28, 2025), which explicitly covers "Claude Code when used from accounts tied to those plans." The commercial rows come from the privacy article and the Claude Code data usage docs, which say Anthropic "does not train generative models using code or prompts sent to Claude Code under commercial terms" unless the customer opts in.
So the dividing line is the terms you signed up under, and price has nothing to do with it. A pay-as-you-go API key gets commercial terms. A Max subscription gets consumer terms. If you run Claude Code all day on a Max plan and assumed you were covered like the API, you weren't.
How to opt out of Claude model training (Free, Pro, Max)
From Anthropic's settings article:
On mobile it's the same path: your name → Settings → Privacy.
In Claude Code, Pro and Max users can run:
/privacy-settingsThat opens the same setting from the terminal. Per the commands reference, it's "only available for Pro and Max plan subscribers."
Two catches the toggle doesn't fix:
- It doesn't reach back. Turning it off excludes new chats and stored chats from future training runs. Per the settings article, "your data will still be included in model training that has already started," and models already trained keep what they learned.
- Safety-flagged chats are a separate case. Conversations flagged by safety classifiers can still be used to train trust and safety models, toggle or not.
Deleted conversations aren't used for future training either, per the terms update. If there's a chat you regret, delete it now rather than just flipping the switch.
The thumbs-down loophole
This is what the HN thread was fighting about, and I think it's the part most people get wrong.
Hitting thumbs up or thumbs down on a response counts as explicitly handing Anthropic material. On commercial plans the privacy article says a thumbs rating means Anthropic keeps the "entire related conversation," including content, custom styles, conversation preferences and model settings, for up to 5 years, de-linked from your user and customer IDs. On consumer plans, Anthropic's personal data article lists thumbs feedback as its own basis for using a chat, separate from the toggle.
So your Enterprise contract says "no training," and then someone on your team clicks thumbs-down on a bad answer that contained half your auth module. That whole thread is now feedback, and Anthropic can keep it for five years.
Team and Enterprise Owners can shut this off under Organization settings → Data and Privacy → "Rate chats". If you administer a Claude org and haven't looked at that switch, go look now.
One commenter claimed dismissing Claude Code's "How is Claude doing this session?" prompt also counts as sharing. Per the docs, it doesn't: the rating, including "Dismiss", "records only your rating." The risky bit is the follow-up question, "Can Anthropic look at your session transcript?" Answering Yes uploads the transcript, subagent transcripts and the raw session log. API keys get redacted. "Source code, file contents, and other conversation content are uploaded as-is." Anthropic keeps those for up to 6 months and, per the docs, can't use them for training, but your source code has still left your machine.
Lock down Claude Code with settings.json
Even under commercial terms, Claude Code has a few ways for code to leave your laptop beyond the model call itself. The /feedback command (plus /bug and /share, which use the same path) sends your conversation history, code included, and keeps it for 5 years. You can choose to attach other sessions from the same project from the last 24 hours or 7 days.
All of this is controlled by env vars that the docs say can go in settings.json. For a project you care about, I'd commit this to .claude/settings.json:
{
"env": {
"DISABLE_FEEDBACK_COMMAND": "1",
"CLAUDE_CODE_DISABLE_FEEDBACK_SURVEY": "1",
"DISABLE_TELEMETRY": "1",
"DISABLE_ERROR_REPORTING": "1"
},
"cleanupPeriodDays": 7
}What each does:
DISABLE_FEEDBACK_COMMAND=1stops/feedbackfrom sending transcripts to Anthropic.CLAUDE_CODE_DISABLE_FEEDBACK_SURVEY=1kills the session survey and its transcript-share follow-up.DISABLE_TELEMETRY=1turns off usage metrics. These "never include your code, prompts, or file paths," but there's no reason to send them. Heads up: per the docs it also disables feature-flag evaluation, which can make Remote Control unavailable.DISABLE_ERROR_REPORTING=1turns off error reports, which are on for Pro and Max sign-ins on v2.1.198+.cleanupPeriodDayscontrols how long plaintext transcripts sit in~/.claude/projects/on your own disk. The default is 30 days. That's a local exposure, but if your laptop gets imaged or backed up somewhere you don't trust, it matters.
The blunt option is CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1, which covers most of the above at once. Same Remote Control caveat as DISABLE_TELEMETRY. It also doesn't stop the WebFetch domain check, which sends the hostname (only the hostname) to api.anthropic.com. That one is controlled by skipWebFetchPreflight: true.
If you're on Bedrock, Google Cloud or Foundry, telemetry, error reporting and /feedback uploads are already off by default. /feedback writes to ~/.claude/feedback-bundles/ locally instead. Session surveys still run on every provider unless you disable them.
What I'd actually do
- Solo dev on Pro/Max: flip the toggle off today, never click thumbs on anything with real code in it, add the env block above.
- Company code on a personal Max plan: stop. That's consumer terms covering your employer's code. Move to a Team plan or an API key, or at minimum get the toggle confirmed off.
- Team/Enterprise admin: disable "Rate chats" and push the env block through managed settings. Ask your account team about ZDR if you need no server-side persistence; it's enabled per organization, not included by default.
- API user: you're in the best spot already. Just don't opt into the Development Partner Program by accident.
My take: the consumer policy is at least written down clearly, and the toggle works. What bothers me is how much you have to know to be fully out. You need to find the settings page, know that the thumbs button is a separate door, and know that Claude Code has its own feedback paths. And the opt-out only covers future runs, from a company that just agreed to pay $1.5 billion over books pulled from pirate libraries. I'd rather not have to trust the default.
Did you know your Claude Code sessions on a Pro or Max plan could be training data? And now that you do, does it change which plan you'd pay for, or do you assume everything you send to any model provider gets trained on anyway?
Sources
- Is my data used for model training? (Anthropic Privacy Center)
- How do I change my model improvement privacy settings?
- How do you use personal data in model training?
- Updates to our consumer terms (Anthropic, Aug 28, 2025)
- Claude Code docs: Data usage
- Claude Code docs: Commands
- Stanford Daily: Professors' books pirated to train Claude
- HN discussions: privacy article, Stanford books
