DEV Community

aicoding-guide
aicoding-guide

Posted on Originally published at aicoding-guide.com

Is your code used to train Anthropic's models? Claude Code data usage by plan

Originally published at https://aicoding-guide.com.

"Will the code I let Claude Code read end up training Anthropic's models?" This question comes up before any team adopts the tool. The answer is that it depends on your contract and your settings. Personal and commercial plans have different defaults, and on personal plans you have to check the setting yourself.

This article separates the concepts that get conflated, lays out the default per plan, and gives you a checklist to run before using Claude Code on work code. Always confirm the exact terms on Anthropic's own pages, since policy can change after this article's verification date.

Key point
What you will learn

  • How data usage differs between personal plans (Free/Pro/Max) and commercial ones (API/Team/Enterprise)
  • How to check and change the training opt-in
  • What to decide before you use Claude Code at work

Training, retention and access are three different things

These get mixed up constantly, so separate them first.

Concept What it means
Training Using what you send as training data for future models
Retention Storing what you send on the server for some period, for things like abuse detection
Access The conditions under which Anthropic staff can view content, normally limited to investigating policy violations

Opting out of training does not reduce retention to zero. Conversely, data being retained does not mean it is used for training.

Defaults by plan

Contract Training default Changeable
Free / Pro / Max (personal) Follows your setting; you are asked once and can change it later Yes, in settings
API (Anthropic Console), pay as you go Not used for training
Team / Enterprise Not used for training
Via Amazon Bedrock / Google Vertex AI Governed by that cloud provider's terms; training data does not flow to Anthropic

Claude Code follows the contract attached to the account you are logged in as. Log in with a Pro/Max account and personal terms apply; authenticate with an API key and commercial terms apply.

Using a personal plan for work
Pro and Max are personal contracts. If you handle company code, opting out of training is not enough on its own: check whether your organization permits work data on a personal contract at all. For team use, a Team/Enterprise or API contract is the expected starting point.

Check the setting on a personal plan

  1. Log in to claude.ai in your browser.
  2. Open Settings and go to the Privacy section.
  3. Find the toggle equivalent to "Help improve Claude". On means your data can be used for training; off means it is not.
  4. You do not need to log in again in Claude Code afterwards. The setting applies at the account level.

Running /status in a Claude Code session shows the account you are logged in as and the authentication method, which tells you which contract you are actually operating under.

Retention periods

Retention depends on the training setting. Anthropic documents a long period (measured in years) when training is on, and a short one (measured in days) when it is off. The exact number of days is revised from time to time, so read the current wording in the Privacy Center rather than relying on a number quoted elsewhere.

Commercial contracts may qualify for Zero Data Retention depending on the agreement. If your industry requires it, raise it with the sales contact.

Checklist before using it at work

  • [ ] Which contract are you on (personal / API / Team / Enterprise)?
  • [ ] On a personal plan, is the training toggle off?
  • [ ] Does your organization permit sending code to an external AI service?
  • [ ] Do you have settings that keep secrets (credentials, customer data) out of Claude's reach? See Stop AI coding tools from reading your API keys and secrets
  • [ ] Do you know what data your MCP servers forward to external services?
  • [ ] If you go through Bedrock or Vertex AI, have you checked that provider's data terms?

What Claude Code actually sends

Claude Code reads the files it needs for the instruction you gave and sends their contents to the API. It does not ship your whole repository on every turn, but anything it reads with grep or cat is sent. Files you never want read should be blocked explicitly with a deny rule. See Claude Code permissions in settings.json for how to write them.

Usage telemetry is sent separately from conversation content, and the environment variable that disables it is documented in the official docs.

Glossary
Telemetry: statistics such as feature usage counts and error occurrences. It is handled separately from code content, and there is a setting to turn it off.

How Codex and Gemini CLI compare

Codex (OpenAI) and Gemini CLI (Google) follow the same shape: personal and commercial tiers have different defaults. Gemini CLI's free tier, signed in with a personal Google account, carries a notice that input may be used to improve the product. Check each tool on its own terms rather than assuming one policy covers all three.

Summary

  • Training, retention and access are separate; the setting mainly controls training
  • API, Team and Enterprise are not used for training by default; Pro/Max follows your setting
  • On a personal plan, check the toggle in claude.ai settings, and follow your company's policy for work code
  • What gets sent is the content of files Claude reads, so block what you don't want read with deny rules
  • Policy wording changes, so verify against Anthropic's Privacy Center rather than a secondhand summary

Top comments (0)