Skip to content
HN On Hacker News ↗

Data usage - Claude Code Docs

▲ 15 points 1 comments by espeed 4w ago HN discussion ↗

Pangram verdict · v3.3

We believe that this document is fully human-written

11 %

AI likelihood · overall

Human
100% human-written 0% AI-generated
SEGMENTS · HUMAN 4 of 4
SEGMENTS · AI 0 of 4
WORD COUNT 1,287
PEAK AI % 22% · §2
Analyzed
Jul 26
backend: pangram/v3.3
Segments scanned
4 windows
avg 322 words each
Distribution
100 / 0%
human / AI fraction
Verdict
Human
Pangram v3.3

Article text · 1,287 words · 4 segments analyzed

Human AI-generated
§1 Human · 4%

Data policies Data training policy Consumer users (Free, Pro, and Max 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, and Max 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.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.

§2 Human · 22%

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.

§3 Human · 6%

Consumer users (Free, Pro, and Max 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.

You can delete individual Claude Code on the web 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, and Max 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.

§4 Human · 14%

Encryption at rest depends on your model provider:ProviderEncryption at restAnthropic APIInfrastructure-level disk encryption (AES-256). Enable Zero Data Retention for no server-side persistence.Amazon BedrockAES-256 with AWS-managed keys. Customer-managed keys available via AWS KMS.Google Cloud’s Agent PlatformGoogle-managed encryption keys. CMEK available.Microsoft FoundryDepends on the deployment’s hosting option. For Hosted on Azure deployments, prompts and completions remain within Azure; only usage metadata and content flagged by Anthropic’s safety systems egress to Anthropic. 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 When using Claude Code on the web, sessions run in Anthropic-managed virtual machines instead of locally. In cloud environments: Code and data storage: Your repository is cloned to an isolated VM. Code and session data are subject to the retention and usage policies for your account type (see Data retention section above) Credentials: GitHub authentication is handled through a secure proxy; your GitHub credentials never enter the sandbox Network traffic: All outbound traffic goes through a security proxy for audit logging and abuse prevention Session data: Prompts, code changes, and outputs follow the same data policies as local Claude Code usage

For security details about cloud execution, see Security.Telemetry services Claude Code sends two kinds of operational telemetry: usage metrics and error reports. You can turn each off individually with the environment variables below, or disable all non-essential traffic at once by setting CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC. Metrics: latency, reliability, and usage patterns, sent to Anthropic and to third-party logging infrastructure over TLS. Metrics never include your code, prompts, or file paths. Set DISABLE_TELEMETRY=1 to opt out. Error reports: error messages and stack traces from Claude Code’s own internals, sent to a third-party error tracking service over TLS. Claude Code redacts known patterns of secrets, file paths, email addresses, and other personal information before anything leaves your machine.