Claude Code keeps your session data locally for 30 days

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.
Up next
Anthropic’s automated reviews now flag 54% of PRs
Anthropic’s security team writes rules straight into CLAUDE.md and runs /security-review before every PR, feeding each new bug class back into the file. The share of PRs with substantive comments climbed from 16% to 54%.
Related stories
- Researcher identifies hidden tracking in Claude Code
- You own Claude’s outputs. You still can’t train a competitor on them.
- Apiiro finds Claude Code secrets in 1,122 GitHub files
- Email leak stopgap in Claude Code checks only shell calls
- Claude Code agent sat on a Pentagon network for two months
- Backdoored Claude Code builds were limited to Cursor
Comments
No comments yet. Be the first.
Join the conversation
Sign in to leave a comment. It appears after moderation.

