# PSA: Claude Code deletes your local session history after 30 days by default — retained record

> Retained reddit record from reddit:ClaudeCode.

Canonical: https://highsignal.app/data/records/14277d168d9173f1

[← sources](https://highsignal.app/data)


source: [reddit](https://highsignal.app/data/reddit) (reddit:ClaudeCode)  published 2026-10-20 01:01 ingested 2026-10-21 02:40

[original source ↗](https://www.reddit.com/r/ClaudeCode/comments/1xaejai/psa_claude_code_deletes_your_local_session/)

## 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
