Data usage - Claude Code Docs
Documentation Index Fetch the complete documentation index at: /docs/llms.txt Use this file to discover all available pages before exploring further. Skip to main content Assistant Responses are generated using AI and may contain mistakes. Data policies Data training policy Consumer users (Free, Pro, Max, and Ultra plans) : We give you the choice to allow your data to be used to improve future Claude models. We will train new models using data from Free, Pro, Max, and Ultra accounts when this setting is on (including when you use Claude Code from these accounts).
Commercial users : (Team and Enterprise plans, API, 3rd-party platforms, and Claude Gov) maintain existing policies: Anthropic does not train generative models using code or prompts sent to Claude Code under commercial terms, unless the customer has chosen to provide their data to us for model improvement (for example, the Developer Partner Program ). Development Partner Program If you explicitly opt in to methods to provide us with materials to train on, such as via the Development Partner Program , we may use those materials provided to train our models.
An organization admin can expressly opt-in to the Development Partner Program for their organization. Note that this program is available only for Anthropic first-party API, and not for Amazon Bedrock or Google Cloud’s Agent Platform users. Feedback using the /feedback command If you choose to send us feedback about Claude Code using the /feedback command, we may use your feedback to improve our products and services.
Transcripts shared via /feedback , or via /bug and /share , which report through the same path, are retained for 5 years. With Claude-drafted feedback , Claude can also draft a feedback report and queue it on your machine for you to review. Claude Code sends nothing until you choose to send the draft, and a sent draft goes through the same submission path and retention as other /feedback reports. Session quality surveys When you see the “How is Claude doing this session?” prompt in Claude Code, responding to this survey, including selecting “Dismiss”, records only your rating.
We do not collect or store any conversation transcripts, inputs, outputs, or other session data as part of the rating prompt itself. Unlike thumbs up/down feedback or /feedback reports, this session quality survey is a simple product satisfaction metric. After the rating prompt, you may see a separate follow-up asking “Can Anthropic look at your session transcript to help us improve Claude Code?”. This is an optional second step distinct from the rating: Yes : uploads your conversation transcript, any subagent transcripts, and the raw session log file from disk to Anthropic.
Known API key and token patterns are redacted before upload. Source code, file contents, and other conversation content are uploaded as-is. Shared transcripts are retained for up to 6 months. On Amazon Bedrock, Google Cloud’s Agent Platform, Microsoft Foundry, and signed-in Claude apps gateway sessions, Yes writes the same payload to a local archive under ~/.claude/feedback-bundles/ instead of uploading; nothing leaves your machine until you forward that file.
No : declines without sending anything Don’t ask again : declines and stops this follow-up from appearing in future sessions Nothing is uploaded unless you explicitly select Yes . Organizations with zero data retention , or where product feedback is disabled by organization policy, or where CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC is set, never see this follow-up. Your responses to this survey, including session transcripts submitted after the rating prompt, do not impact your data training preferences and cannot be used to train our AI models.
To disable these surveys, set CLAUDE_CODE_DISABLE_FEEDBACK_SURVEY=1 . The survey is also disabled when DISABLE_TELEMETRY , DO_NOT_TRACK , or CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC is set. Organizations that block nonessential traffic but capture survey responses through their own OpenTelemetry collector can opt the survey back in by setting CLAUDE_CODE_ENABLE_FEEDBACK_SURVEY_FOR_OTEL=1 . The survey then logs ratings to the configured collector only.
The transcript-share follow-up and all other Anthropic-bound feedback traffic stay disabled. To control frequency instead of disabling, set feedbackSurveyRate in your settings file to a probability between 0 and 1 . Data retention Anthropic retains Claude Code data based on your account type and preferences. Consumer users (Free, Pro, Max, and Ultra plans) : Users who allow data use for model improvement: 5-year retention period to support model development and safety improvements Users who don’t allow data use for model improvement: 30-day retention period Privacy settings can be changed at any time at claude.ai/settings/data-privacy-controls .
Commercial users (Team, Enterprise, and API) : Standard: 30-day retention period Zero data retention : available to qualified accounts for Claude Code on Claude for Enterprise. ZDR is not included in the standard Enterprise plan; it is enabled on a per-organization basis by your account team after confirming eligibility Local caching: Claude Code clients store session transcripts locally in plaintext under ~/.claude/projects/ for 30 days by default to enable session resumption.
Adjust the period with cleanupPeriodDays . See application data for what’s stored and how to clear it. Transcripts of sessions started or most recently continued in Claude Desktop or Cowork are exempt from that limit by default . You can delete individual cloud sessions at any time. Deleting a session permanently removes the session’s event data. For instructions on how to delete sessions, see Delete sessions . Learn more about data retention practices in our Privacy Center .
For full details, please review our Commercial Terms of Service (for Team, Enterprise, and API users) or Consumer Terms (for Free, Pro, Max, and Ultra users) and Privacy Policy . Data access For all first party users, you can learn more about what data is logged for local Claude Code and remote Claude Code . Remote Control sessions follow the local data flow since all execution happens on your machine; while connected, the session transcript is also stored on Anthropic servers to sync the conversation across devices, as described in Connection and security .
Note for remote Claude Code, Claude accesses the repository where you initiate your Claude Code session. Claude does not access repositories that you have connected but have not started a session in. Local Claude Code: Data flow and dependencies The diagram below shows how Claude Code connects to external services during installation and normal operation. Solid lines indicate required connections, while dashed lines represent optional or user-initiated data flows.
Claude Code runs locally. To interact with the LLM, Claude Code sends data over the network. This data includes all user prompts and model outputs, encrypted in transit via TLS 1.2+. Claude Code is compatible with most popular VPNs and LLM proxies. Encryption at rest depends on your model provider: Provider Encryption at rest Anthropic API Infrastructure-level disk encryption (AES-256). Enable Zero Data Retention for no server-side persistence.
Amazon Bedrock AES-256 with AWS-managed keys. Customer-managed keys available via AWS KMS. Google Cloud’s Agent Platform Google-managed encryption keys. CMEK available. Microsoft Foundry Depends on the deployment’s hosting option . For Hosted on Azure deployments, see where data is processed and stored . For Hosted on Anthropic deployments, requests route to Anthropic infrastructure with AES-256 disk encryption. Claude Code is built on Anthropic’s APIs.
For details on API security controls, including API logging procedures, see the compliance artifacts in the Anthropic Trust Center . Cloud execution: Data flow and dependencies Cloud sessions run in Anthropic-managed v
The rest of this page is on the live site.