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

Claude Code Published:

Whether Claude Code uses your code for model training depends on your plan and settings. How personal and commercial plans differ, and what to check before using it at work.

Verified on Sep 7, 2026 These tools change quickly. Please also check the latest official documentation.
Contents
  1. Training, retention and access are three different things
  2. Defaults by plan
  3. Check the setting on a personal plan
  4. Retention periods
  5. Checklist before using it at work
  6. What Claude Code actually sends
  7. How Codex and Gemini CLI compare
  8. Summary

"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.

ConceptWhat it means
TrainingUsing what you send as training data for future models
RetentionStoring what you send on the server for some period, for things like abuse detection
AccessThe 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

ContractTraining defaultChangeable
Free / Pro / Max (personal)Follows your setting; you are asked once and can change it laterYes, in settings
API (Anthropic Console), pay as you goNot used for training
Team / EnterpriseNot used for training
Via Amazon Bedrock / Google Vertex AIGoverned 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.

用語解説

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

FAQ

Can I let Claude Code read my company's code?
It depends on the contract. Commercial use through an API key, Team, or Enterprise is not used for training by default. On personal Pro/Max plans it follows your setting, so check it and follow your company's policy.
Do I lose features if I opt out of training?
No. Opting out does not restrict functionality. It changes how long your data is retained.
Can I retroactively exclude data I already sent?
A setting change applies going forward. For how previously submitted data is handled, check the current wording in Anthropic's Privacy Center.

Primary sources

This article was drafted by AI from official documentation and reviewed by the site operator before publishing. Found a mistake? Let us know via the contact page.