Claude Code deletes session transcripts after 30 days — dev builds open-source claudit dashboard to save them

Nitjsefnie · reddit · 2026-11-09

Claude Code deletes old session JSONLs by default: cleanupPeriodDays in /.claude/settings.json defaults to 30 and pruning happens at startup. With 2,679 of the author's 5,271 sessions about to vanish, they built claudit, a free, self-hosted MIT dashboard.

How it works: sync session JSONLs into R2 or a local file:// mirror; claudit ingests from there so prunes never shrink history. One page shows cost by model, token breakdown, 5m vs 1h cache-write split, context growth per session, reply latency, tool error rate, and an activity heatmap.

Key finding: 64.9% of the author's cache-write tokens were the 1h kind billed at 2x input instead of 1.25x — priced uniformly at 1.25x, those costs come out 37.5% low.

Built mostly in Claude Code (Opus plus GLM-5.3-Flash and others routed through it) with one agent session per issue, review agents before merges, and model names in commit co-author trailers. Parser gotchas: streamed replies logged multiple times under one requestId (keep largest) and subagent files duplicating parent records (dedup by uuid). FastAPI + Postgres + React, boots via docker compose with sample data.

Original post →

More from coding & agent

coding & agent channel →