PSA: Claude Code deletes your local session history after 30 days by default
retained text
PSA: Claude Code deletes your chat history after 30 days Heads up folks, Claude Code only keeps your local sessions for 30 days by default. I went back to look at some work from earlier this year and everything before August was gone. To keep it, add this to \~/.claude/settings.json: "cleanupPeriodDays": 36500 That's 100 years, so pretty much forever. I'd avoid 0, not sure it means what you'd think. If you already lost some, two places to check: \- \~/.claude/history.jsonl still had all my prompts back to January, just not Claude's replies \- Time Machine, if it was actually running (mine wasn't, haha)
document fetched 2026-10-21 00:40 · canonical https://reddit.com/r/ClaudeCode/comments/1xaejai/psa_claude_code_deletes_your_local_session