Guide
Recover deleted Claude Code sessions
You’re looking for a session from a few weeks ago, but claude --resume no longer shows it. Usually Claude Code deleted it itself: it cleans up history files that are older than the cleanupPeriodDays period. The default is 30 days.
Where Claude Code stores sessions
Each session is a file in JSON Lines format:
~/.claude/projects/<project>/<session-id>.jsonl
The project folder is the path of your working directory, with slashes replaced by hyphens. If the file is there, Claude Code can resume the session. If it’s missing, the session is gone as far as Claude Code is concerned.
Is the file still somewhere?
- Time Machine: The
~/.claudefolder is hidden, but it is backed up unless you excluded it. In Finder, press ⇧⌘. to show hidden files, open the project folder and start Time Machine. - Other backups: Anything that backs up your home folder may contain old
.jsonlfiles.
Put the session back and resume it
If you find the file, put it back into the same project folder under the same name. Then, in the project’s working directory:
cd ~/path/to/project
claude --resume <session-id>
Don’t overwrite an existing file when you do this. According to its own documentation, Claude Code changes the file format between versions; very old sessions may therefore still be readable but no longer resume without errors.
Stop losing sessions
Two approaches that complement each other:
- Extend the period: Raise
"cleanupPeriodDays"in~/.claude/settings.json. More in cleanupPeriodDays explained. - Your own archive: Recallnor reads every session as soon as it is created and keeps it, even when Claude Code deletes it. With Pro, you restore a deleted session to its place with one click. Recallnor then shows you the matching
claude --resumecommand and never overwrites an existing file.
Recallnor saves every Claude Code session on your Mac before Claude Code deletes it, makes it searchable and lets Claude Code look things up in it via MCP. Free for the last 30 days; Pro is a one-time $29, or $19 until 31 January 2027. Same amounts in euros.
As of December 2026. Sources: Anthropic: Explore the .claude directory, Anthropic: Sessions.