Skip to navigation

Claude Code Data Retention: Why Zero Retention Is Not the Default

In short: Standard Claude and Claude Code retention is 30 days. Zero data retention exists for qualified Enterprise accounts, with exceptions.

Published 17 min read
On this page

Direct answer

Standard Claude and Claude Code retention is 30 days, not zero. Non-opted-in consumer data also has 30-day retention. Zero Data Retention exists for qualified Enterprise accounts and eligible products, with exceptions. Consumer data retained after a training opt-in may be kept de-identified for up to five years. If a project requires zero retention, ask for written confirmation of account qualification, product scope and exceptions before sending data.

Why zero retention is not the default

Zero retention is a specific contractual and product scope, not a synonym for “the provider does not train on my data.” Training and retention answer different questions. A provider can decline to train on prompts and still keep standard records for a defined period. A provider can offer zero retention to a qualified account while retaining certain exception records.

The default matters because most buyers start with a standard plan. Standard commercial retention is 30 days. That is a real policy with a defined period, but it is not zero. A team that needs zero retention must verify that it qualifies for the relevant Enterprise coverage and that the product it uses is eligible.

The Claude Code privacy and retention rules article maps consumer and commercial training defaults. This article focuses on the retention promise, the ZDR boundary and the questions a buyer should put in writing.

Standard retention is 30 days

Official: Standard commercial retention is 30 days. Non-opted-in consumer data has 30-day retention. Those are the standard periods in the fact pack, not a claim that every related record disappears on the same schedule.

A 30-day period can be acceptable for some projects and unacceptable for others. The decision depends on the data, the client contract, the threat model and the provider’s exception categories. Do not round the policy up to “about zero” or down to “they keep everything.”

Standard retention showing 30 days for commercial data and non-opted-in consumer data
Anthropic’s policies state 30-day standard retention for commercial data and non-opted-in consumer data. The visual does not describe exception records or ZDR scope.
Retention option Published period Who it applies to
Standard commercial retention 30 days Commercial data under standard terms
Non-opted-in consumer retention 30 days Consumer data without training opt-in
Consumer training retention De-identified, up to five years Data retained after a training opt-in
Qualified Enterprise ZDR Zero retention within the agreed scope Qualified accounts and eligible products, with exceptions
Exception records Category-specific periods Flagged, safety or feedback records

The table shows why “Claude Code retention is 30 days” is a useful short answer but an incomplete procurement policy. A buyer still needs the account type, product scope and exception terms.

Qualified Enterprise Zero Data Retention

Official: Zero Data Retention is available for qualified Enterprise accounts and eligible products, with exceptions. The policy does not make ZDR available to every account, and it does not cover every product automatically.

Qualification is the first question. Ask whether the specific account is eligible. Product scope is the second question. Ask whether Claude Code and any related surface are covered. Exceptions are the third question. Ask which records can remain and for how long.

Qualified Enterprise Zero Data Retention showing eligible accounts, eligible products and contract terms
Anthropic describes ZDR for qualified Enterprise accounts and eligible products. The diagram preserves the contract-scope and exception caveats.
ZDR eligibility question Evidence to request Unsafe assumption
Is the account qualified? Written provider confirmation Every Enterprise account qualifies
Is the product eligible? Product list in the agreement Every Claude surface is covered
What exceptions remain? Contract and policy exception terms Zero means no record can exist
Who owns the setting? Named account or procurement owner The setting is universal and permanent
How is scope reviewed? Review process and change notice An old confirmation covers future products

A standard account should not be described as having zero retention. A qualified account should not be described as having unlimited zero retention across every product. Both statements stretch the policy beyond the evidence.

Exceptions are part of the promise

The fact pack identifies longer retention for specific categories. Flagged inputs or outputs may be retained up to two years, safety scores up to seven years and feedback transcripts five years. These periods belong to the relevant records, not to every ordinary prompt.

A buyer should ask how those categories are defined, who can access them and whether the project can accept them. The public fact pack does not provide a complete operational description of every exception workflow. Keep that gap visible rather than assuming the categories never apply.

Retention exceptions showing flagged inputs or outputs, safety scores and feedback transcripts with different periods
Anthropic’s policies describe category-specific exception periods. The visual does not mean every request is flagged or every record is kept for the maximum period.
Exception category Published period Review question
Flagged inputs or outputs Up to two years What triggers flagging and who reviews it?
Safety scores Up to seven years What does the score contain and how long is it useful?
Feedback transcripts Five years What feedback was submitted and under which terms?
Standard data 30 days under standard terms Does the project accept the standard period?
Qualified ZDR scope Zero within scope, with exceptions Which exceptions survive the ZDR commitment?

The Claude Code harness security boundaries article explains why local permissions and tool access remain part of the review. Provider retention policy does not control every file the agent can read or every command it can execute.

Consumer training changes the retention picture

Consumer training is optional. A consumer who does not opt in falls under the 30-day non-opted-in retention rule. A consumer who opts in accepts a different lifecycle: data retained after the opt-in may be kept de-identified for up to five years.

That does not mean every consumer prompt is kept for five years. It means the training choice changes the applicable retention category. The word “de-identified” also matters, but it is not a reason to send data that the user would not want retained.

Consumer training retention showing opt-in, de-identification and up to five years of retention
Anthropic’s consumer training policy links opt-in with possible de-identified retention up to five years. The visual does not apply that rule to commercial accounts.
Consumer choice Retention reading Practical action
No training opt-in 30-day non-opted-in consumer retention Confirm the setting before sensitive work
Training opt-in Retained data may be de-identified and kept up to five years Reassess the data before sending it
Setting unknown Unknown until confirmed Pause sensitive use
Client data on a personal account Client terms still apply Obtain client approval or use an approved account

The Claude Code privacy and retention rules article provides the full consumer/commercial matrix. Keep the two questions separate: may the data be used for training, and how long is it retained?

How to evaluate a provider’s retention promise

A useful evaluation starts with the data lifecycle, not the marketing phrase. Ask what is submitted, where it is processed, what is logged, which exceptions apply and how deletion works. Then compare the answers with the project’s requirements.

Do not accept “we do not train on your data” as a complete retention answer. Do not accept “zero retention” without account and product scope. Ask for the written policy, the agreement and the exception schedule.

Provider evaluation checklist covering retention, training, exceptions, subprocessors and deletion
The evaluation checklist is an editorial due-diligence tool. It does not certify a provider or replace legal and security review.
Evaluation area Evidence to request Reject or escalate when
Standard retention Written period and data categories The period is vague or contradicts the agreement
Training Default and opt-in terms “No training” is used as a substitute for retention
ZDR Qualification, product list and exceptions Scope is not confirmed in writing
Exception records Categories and periods The provider cannot explain longer-lived records
Upstream providers Names and applicable terms The route is undisclosed
Deletion Request process and confirmation Deletion is promised without a process
Change notice How policy changes reach the customer The team cannot review changes

The Claude Code regional restrictions for teams article adds entity and location questions. A provider can have a clear retention policy and still present an eligibility issue. Keep both reviews in the same vendor file.

Contract questions worth asking

A contract review should turn broad policy language into project-specific answers. Ask whether the commitment covers prompts, outputs, files, logs, metadata and feedback. Ask whether upstream providers have separate terms. Ask what happens when the account type or product changes.

If the provider offers ZDR, ask for the exact scope. If it does not, ask whether standard retention meets the requirement. A buyer who needs zero retention should not accept a 30-day policy as a near match.

Contract question Why it matters
Which data categories are covered? Prompts, outputs, files and logs may have different treatment
Which account and product qualify for ZDR? Prevents a universal claim from a narrow agreement
Which exceptions survive? Defines the records that can outlast standard retention
Which upstream providers are involved? Their terms may differ from the gateway’s terms
How is deletion requested and confirmed? Makes the deletion promise operational
How are policy changes communicated? Allows the team to re-review before a mismatch

The Claude Code lock-in and exit costs article explains why contract dependence belongs in the migration plan. If the provider changes its retention terms, the team needs a practical route to move prompts, configuration and project knowledge.

Build a provider evaluation worksheet

Use one worksheet per provider and account type. Record the evidence, the reviewer and the decision. A worksheet that only says “approved” is not enough for a later audit.

Start with the project’s requirement. If the project requires zero retention, write that explicitly. If it can accept 30-day standard retention, write that too. The requirement should come before the provider comparison.

Worksheet field What to record
Project and data sensitivity Data categories and client restrictions
Account type Consumer, Team, Enterprise, API or Government
Required retention Zero, 30 days or another documented requirement
Provider’s standard period Written policy citation
Training default Setting and opt-in terms
ZDR scope if applicable Qualification, products and exceptions
Upstream terms Providers and applicable policies
Deletion process Request route and confirmation
Decision and approver Accepted, rejected or conditional
Review trigger Policy, account, product or data change

The Claude Code context-portable migration guide explains how to preserve project knowledge if the decision changes. Keep the worksheet with that knowledge so the next reviewer can see why the route was approved.

Make the ZDR decision explicit

A project that requires zero retention should make that requirement visible before comparing providers. Write it in the project brief and the vendor review. If the requirement is conditional, state the condition. “Prefer zero retention” and “require zero retention” lead to different decisions.

Next, separate account qualification from product coverage. An Enterprise agreement does not automatically answer whether a specific coding surface is eligible. Ask for the product list and the exception terms. If the provider cannot confirm the scope, record the answer as unknown rather than approved.

Requirement Acceptable evidence Decision
Zero retention required Written qualification, eligible product list and exceptions Approve only within the confirmed scope
30-day retention acceptable Standard policy and project approval Approve with the period recorded
Training prohibited Current setting and contract terms Approve only if the setting is enforced
Sensitive client data Client approval and provider terms Escalate before use
Scope unclear No written confirmation Pause or use an approved alternative

The Claude Code account-ban and suspension overview is relevant because access loss can complicate deletion and evidence preservation. A retention review should ask who can export records and respond if the account becomes unavailable.

Review retention during a migration

A migration changes the request path. Prompts, files and outputs that stayed within one provider’s documented scope may pass through a different provider after the move. Re-run the retention review before cutover.

Inventory the data that will move. Separate reusable prompts from customer data, secrets and logs. Preserve the privacy decision with the migrated context. A team that moves the files but loses the approval record has not completed the review.

Migration stage Retention action
Inventory Identify data categories and current provider scope
Select route Obtain the new provider’s written terms
Test Use sanitized tasks and verify the request path
Cut over Move only approved data
Verify Confirm logs, outputs and deletion behavior
Retire old route Follow the old provider’s deletion process

The Claude Code context-portable migration guide explains how to preserve prompts, hooks and project rules. The Claude Code exit-plan checklist adds rollback triggers. Retention scope should be one of those triggers: stop the cutover if the new route cannot meet the requirement.

A worked provider comparison

Consider a team with two requirements: no training on project data and a documented retention period. The first requirement is met only if the account and route have the right training terms. The second requires a specific period and a clear exception policy.

Provider A offers a standard 30-day retention policy and says commercial data are not used for training by default. That can satisfy the stated requirements if the team accepts 30 days and confirms the account type. It does not satisfy a zero-retention requirement.

Provider B offers zero retention for a qualified account and eligible product, with exception records. That can satisfy a zero-retention requirement only within the confirmed scope. The team must review the exceptions rather than treating the phrase as universal.

Neither comparison is a recommendation for a real provider. It shows why the requirement must come first. A provider with the shorter standard period can still be the wrong fit, and a provider with a zero-retention option can still be the wrong fit if the account does not qualify.

Comparison point Question Evidence
Training Is training off by default for this account? Policy and setting record
Standard retention What period applies to ordinary data? Retention schedule
ZDR Does the account and product qualify? Written scope
Exceptions Which records last longer? Exception terms
Upstream route Who else processes the request? Provider list and terms
Deletion How is deletion requested and confirmed? Documented process

The multi-model OpenAI-agent setup can support a measured comparison. Use non-sensitive tasks and record the route, model, result and policy evidence. The Claude Code proof-of-work packet article explains how to keep verification separate from the provider’s summary.

Questions for the security review

Security review should test the whole path, not only the policy page. Ask whether the agent can read files outside the project, whether tool output can introduce instructions and whether local settings can store secrets. Provider retention is one layer of the system.

The Claude Code harness security boundaries article explains the trust boundary between model, harness, tools and host. A zero-retention agreement does not grant least privilege. A permission mode does not answer the retention question.

Security question Why it belongs in the review
What can the agent read? Defines the data exposed to the request path
What tools can it call? Determines possible side effects
Where are approvals stored? Settings files can contain sensitive text
What is logged locally? Local records may outlive provider retention
Who can revoke access? Supports incident response and offboarding
How is output verified? Prevents a plausible summary from hiding a data leak

Keep the security and retention decisions linked but distinct. A route can be secure at the host layer and still have an unacceptable retention policy. It can also have a strong retention policy and an unsafe harness.

When standard retention is acceptable

Standard retention is not automatically a failure. A project with non-sensitive tasks, a clear client approval and no zero-retention requirement may accept a documented 30-day period. The important word is “documented.”

The decision should name the data, the account type and the approver. If the project later adds customer records or a stricter client, revisit the decision. Do not let a one-time approval expand silently to a different data class.

The Claude Code single points of failure article adds a resilience question: what happens if the provider changes the policy or the account loses access? A retention review should include an exit route, not only a current promise.

The win, the loss and the practical implication

The win is that zero retention exists. Qualified Enterprise accounts can have a defined ZDR scope for eligible products. The policy also gives buyers a standard 30-day period and category-specific exception periods to evaluate.

The loss is that ZDR is not the default and not universal. Qualification, product scope and exceptions require written review. The public fact pack does not provide an independent audit of every implementation or a complete product-by-product eligibility matrix.

The practical implication is to buy against a written requirement. If zero retention is mandatory, confirm it before sending data. If 30-day standard retention is acceptable, record that decision and its limits. The Claude Code exit-plan checklist helps keep a tested alternative ready if the terms change.

After approval: monitor the promise

A retention approval is not permanent. Review it when the provider changes its policy, the account type changes, a new product is enabled or the project handles a new data class. Store the review date with the vendor record.

Monitor the operational signals too. If a new log category appears, ask what it contains and how long it remains. If a deletion request receives no confirmation, follow the documented process. If an upstream provider changes, re-check the route.

The goal is to keep the written promise and the real request path aligned. A policy page can be correct while the team’s configuration has drifted. A short review at each change catches that drift before sensitive work depends on it.

Final pre-send check

Before sending a new data class, confirm that the approval still matches the route. Check the account type, training setting, retention category, ZDR scope and upstream providers. If any field has changed, pause and update the review.

Make the check short enough to use. A developer should be able to find the approved route and the data it covers without reading the entire agreement. The detailed evidence can stay in the vendor file, but the operational answer must be easy to reach.

Make the approval easy to find. A developer should not need to search through contracts to learn which route is approved for the current data class. Store a short operational summary with the project and link it to the full evidence.

Data gaps and future updates

The policies are first-party statements. The fact pack does not provide a complete operational description of every exception workflow, an independent audit of retention implementation or a full ZDR product matrix. Those gaps should remain visible in a procurement decision.

This article should be updated if Anthropic changes the standard period, ZDR qualification, product scope or exception categories. A future update should preserve the difference between training and retention. They are related policy questions, but they are not interchangeable.

Practical response: test the live OpenAI-agent lane

One AI API Key is not a Claude Code replacement interface. Its active route is an OpenAI-format agent such as OpenCode, Cline or Cursor using https://api.oneaiapikey.com/v1, one gateway key and the 46 live free model IDs. Verify the free model list before sending a non-sensitive test task.

The documented Claude Code route uses https://api.oneaiapikey.com without a trailing /v1 and the Anthropic Messages format. All four Claude IDs were unavailable on 2026-11-27: claude-sonnet-5-5, claude-sonnet-5, claude-opus-5-5 and claude-haiku-4-5. Free IDs are OpenAI-format only and do not work in Claude Code. The coding-agent compatibility guide and OpenAI versus Anthropic format guide explain the boundary.

First-party policy claim: The gateway’s privacy and retention policy says it does not train on prompts, files or outputs and does not sell them. Prompt and response bodies are not written to usage logs by default. Troubleshooting captures can last up to 30 days, opt-in prompt logs seven days, usage metadata up to 12 months and security logs up to 90 days. Account data is deleted or anonymised within 30 days after a deletion request. Upstream providers receive requests under their own terms. These are provider policy statements, not an independent audit or a promise of zero retention.

For a measured pilot, use the endpoint quickstart, check the current model catalogue, review prepaid pricing and create an account through the sign-up page. Use the LLM cost calculator for paid work and check gateway status before relying on the route.

FAQ

Is Claude Code zero retention by default?

No. Standard commercial retention is 30 days, and non-opted-in consumer data also has 30-day retention. Zero Data Retention is a separate qualified Enterprise option.

Who qualifies for Zero Data Retention?

Qualified Enterprise accounts for eligible products, with exceptions. Confirm the specific account and product scope in writing.

Does no training mean no retention?

No. Training and retention are separate policy questions. A provider can decline to train on data and still retain standard records for a defined period.

Can consumer training affect retention?

Yes. Data retained after a consumer training opt-in may be kept de-identified for up to five years.

What should a buyer request before approval?

Request the account type, standard retention period, training terms, ZDR scope if required, exception categories, upstream provider terms and deletion process.

Sources

More in Blog

Try it

One API key for GPT, Grok, DeepSeek, Kimi, GLM, MiniMax, Qwen, Step, Beam, Nemotron, ERNIE, Hunyuan, Gemma, Laguna, LFM, LongCat, Llama, Solar, Jais, Mistral, K2 and Roleplay.

One AI API Key speaks the OpenAI and Anthropic formats, so you change the base URL and the key, not your code. Credit packs start at $10, and every model has a published per-token rate.

New accounts$10 credit on sign-up
  • 100requests
    per day
  • 3Mtokens
    per day
  • 47free
    models
  • $0per
    token
  • No card
  • No end date
Claim $10 credit →