Original Reddit post

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) submitted by /u/M5_Maxxx

Originally posted by u/M5_Maxxx on r/ClaudeCode