Claude Code telemetry and data retention: what is sent and how to turn it off
How do I disable Claude Code telemetry, and how long is my data kept?
Set DISABLE_TELEMETRY=1 to stop usage metrics, DISABLE_ERROR_REPORTING=1 to stop error reports, or CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1 to stop all non-essential traffic. Consumer accounts keep data 30 days, or 5 years if you allow training; commercial accounts keep it 30 days, with zero data retention available for qualified Enterprise customers.
Turn telemetry off
Shell profile or the env block of settings.json
export DISABLE_TELEMETRY=1 export DISABLE_ERROR_REPORTING=1 # or everything non-essential at once: export CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1
- Metrics never include your code, prompts or file paths.
- DISABLE_TELEMETRY and CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC also disable feature-flag evaluation, which can make Remote Control unavailable.
- Metrics, error reports and /feedback are off by default on Amazon Bedrock, Google Cloud and Microsoft Foundry.
Retention
- Free, Pro and Max: 30 days, or 5 years if you allow your data to be used for model improvement. Change it at claude.ai/settings/data-privacy-controls.
- Team, Enterprise and API: 30 days. Zero data retention is available to qualified Enterprise accounts.
- Locally, transcripts are kept under ~/.claude/projects/ for 30 days by default; change it with cleanupPeriodDays.
- /feedback transcripts are kept for 5 years.
Sources
More Claude Code guides
- How to allow Claude Code to run all commands: permission modes, allow rules and skip permissions
- Claude Code permissions: allow, ask and deny rules, rule syntax and allowed tools
- CLAUDE.md: where it goes, how it loads, and how it works with AGENTS.md
- Claude Code hooks: all events, exit codes, PreToolUse and PermissionRequest JSON, examples
- Claude Code subagents: create one, limit its tools, and call it
- Add MCP servers to Claude Code (claude mcp add, .mcp.json, scopes)
- Claude Code custom slash commands and skills (SKILL.md)
- Claude Code settings.json: file locations, precedence, and key settings
- Claude Code plugins and marketplaces: install, create, and share
- Claude Code headless mode: claude -p, --output-format json, --bare and CI flags
- Claude Code statusline: custom status bar in settings.json with context %, cost and git branch
- Claude Code /model: switch models, aliases (opus, sonnet, haiku, opusplan), ANTHROPIC_MODEL and effort
- Claude Code /cost and /usage: check token spend, usage limits and reduce costs
- Claude Code VS Code extension: install, shortcuts, settings and /ide (works in Cursor too)
- MCP 2026-07-28 Migration Guide: Stateless Protocol, No Sessions, server/discover, MRTR, and SDK v2 Upgrade
- Subagents and Custom Agents Compared: Claude Code vs Codex vs Cursor vs Gemini CLI vs GitHub Copilot (2026)
- Allow all commands in any AI coding agent: Cursor, Claude Code, Codex, Gemini CLI, Copilot CLI and 7 more (2026)
- How to deploy a remote MCP server (Streamable HTTP): Cloudflare Workers, Vercel, Railway and more (2026)
- Claude Code sandbox: /sandbox, sandbox.enabled, allowedDomains, excludedCommands and strict mode
Reviewed Oct 18, 2026. Settings change often; the linked vendor docs are the source of truth.
Built an MCP server? Get it listed everywhere →
Shipping an Android app? Google Play needs 12 testers for 14 days first. Get them with Tester Exchange →