Claude Code had already deleted half my history
It keeps transcripts for 30 days. On my machine that was 67 sessions and $7,808 of work — gone from disk, still searchable in Caprock.
Every Claude Code session is written to a file on your disk. Its documentation says how long that file lives: transcripts are stored under ~/.claude/projects/ "for 30 days by default", then deleted.
I had never thought about what that meant for the work itself, so I counted.
Where Claude Code history lives, and why it disappears
Each session is one JSON-lines file at ~/.claude/projects/<folder>/<session-id>.jsonl, where the folder is the project's path with every slash turned into a dash. Claude Code deletes these files after 30 days by default; the cleanupPeriodDays setting changes the number. Nothing warns you: a session you could resume last month is simply not in the list.
More than half my sessions are already gone
- 67 of 114
- Claude Code sessions whose transcript is no longer on disk
- $7,808
- of work in them, at API list prices — 56% of the total
- 51,093
- replies from Claude in them, still searchable
Caprock has recorded 114 Claude Code sessions on this machine since 18 July. For 67 of them the transcript file no longer exists. Ten of those lived in a git worktree I deleted myself; the other 57 were removed by Claude Code's own cleanup.
Transcript deletedStill on disk
Everything from July is gone — and July alone was $6,362 of work, the most expensive month on the chart.
What actually disappears
Code committed to git remains. What goes is everything around it: why a decision was made, the error that took an afternoon, the command that finally worked, the explanation Claude gave that you meant to come back to.
That is the part you cannot reconstruct from a commit.
A month later you remember that you solved it, not how.
How to keep Claude Code history past 30 days
You can raise the limit. In ~/.claude/settings.json:
{ "cleanupPeriodDays": 365 }
That keeps the files. It does not give you one searchable history: they are JSON, organised by project and session, and Claude Code resumes one at a time.
Caprock reads each transcript as it is written and keeps what matters in one database on your machine — every reply, every command, every cost — and puts Codex, OpenCode, Gemini CLI, DeepSeek Harness and Hermes Agent in the same tables, one table for all of them. When Claude Code deletes a file, nothing in Caprock changes. Caprock's Memory screen searches all of it, and opening a folder you worked in hands the next session back where the last one stopped.
The part that cannot be fixed later
History only accumulates from the day something starts keeping it. Install Caprock today and it reads back the last 30 days that are still on disk; it cannot read back what Claude Code has already deleted.
Those 57 sessions on my machine exist only because Caprock was running before the cleanup reached them.
Sources
Figures read on 2026-10-01 by Caprock v0.61.0 on one machine, mine. A reading, not a live feed; yours will differ.
Your turn
Run it on your own history: who is waiting on you, who is stuck, what each pull request cost. Free, open source, local by default.
Notarized by Apple. One file for Apple silicon and Intel, macOS 13 or later.
Or run it yourself:
Paste in Terminal: it installs Caprock and opens it.Or with Homebrew: brew install --cask dspv/tap/caprock-app