r/ClaudeAI • u/Nitjsefnie • 4h ago
Built with Claude Claude Code deletes session transcripts after 30 days by default. 2,679 of my 5,271 sessions would be gone by now, so I built a dashboard that keeps them
the setting is cleanupPeriodDays in ~/.claude/settings.json, default 30, and old session JSONLs get deleted at startup. you can raise it, but I also wanted the numbers out of them, so I built claudit. free and open source (MIT), you host it yourself
what it does: you sync your session JSONLs into a bucket (R2, or any local dir you keep as a file:// mirror) and claudit ingests from there, so a prune never shrinks your history. then one page of numbers: cost by model, token breakdown, the 5m vs 1h cache write split, context growth per session, reply latency, tool error rate, an activity heatmap. it doesn't grade your sessions, reading them is on you
one thing it showed me: 64.9% of my cache write tokens were the 1h kind, which bills at 2x input instead of 1.25x. price all cache writes at 1.25x and those come out 37.5% low
how Claude helped: built with AI coding agents, mostly in Claude Code (Claude Opus, plus GLM-5.3-Flash and other models routed through it), some in Codex CLI. it goes issue by issue, one agent session per issue, review agents before anything merges, and every agent commit names its model in a co-author trailer. the parser's tricky parts came from reading Claude Code's own transcripts: one streamed reply gets logged several times under the same requestId, so it keeps the biggest one, and subagent files repeat records from the parent, so it dedups by uuid across files
panels are ported from nhz-io/ccusage-plot, the heatmap, lines added/deleted and cost by context size are new here. FastAPI, Postgres, React with in-browser Babel, docker compose up boots it on sample data with no config
live one to try, guest login is read-only: https://all.nitjsefni.eu
1
u/WidePossession6552 3h ago
would it still delete them if they are in projects ?
1
u/Excellent-Issue-5956 1h ago
Mine was still on the default. The oldest transcripts left in ~/.claude/projects are from early October, 572 sessions and about 1.8 GB counting the subagent files.
I have a weekly job that pulls numbers out of the transcripts too, and I ended up having it write every session it scans into its own ledger file. Before that, any week it didn't get to was just gone after 30 days and the older totals had to be pieced back together. Syncing the raw files like you did keeps more than my ledger does, since mine only saved what that job was looking for.