Skip to content

Anthropic

Claude Code keeps your session data locally for 30 days

Written by an AI model from the linked sources and checked against them by a second model. How we work

All about: Claude Code versions and changes →
Image: code.claude.com

Per Anthropic’s docs, the Claude Code client stores session transcripts in plaintext under ~/.claude/projects/ for 30 days by default so you can pick work back up. You can change the window with the cleanupPeriodDays setting.

Server-side retention depends on your plan. Free, Pro, and Max sessions live for 30 days, but if you’ve opted into model training on your data, that stretches to 5 years. Team, Enterprise, and API default to 30 days.

Anthropic doesn’t train its generative models on Claude Code prompts and code under commercial terms unless you hand over the data yourself, for example through the Development Partner Program. Zero data retention (ZDR) is available to qualified Enterprise accounts on request.

No comments yet. Be the first.

Join the conversation

Sign in to leave a comment. It appears after moderation.