Software · Open source · 2026
Claude Session Guard
A Claude Code plugin that keeps every session transcript for good, repairs the corruption that breaks resuming a session without ever deleting good data, and turns token usage into a queryable database.
# Claude Session Guard
/plugin marketplace add FiredMosquito831/claude-session-guard
/plugin install claude-session-guard@claude-session-guard
- 0
- dependencies: Python standard library only
- 2×
- de-duplication, by line and by message
Claude Code deletes session transcripts once they are older than 30 days by default, and any tool that rewrites a transcript in place can truncate it. When that happens you lose the conversation and its token accounting, and nothing tells you.
What we built
- An append-only mirror of every transcript, subagent and workflow transcripts included, that only ever grows
- Two repair passes, one for malformed lines and one for transcripts the API rejects on resume, with a backup before every write, a dry-run mode, live sessions skipped and atomic replacement
- A SQLite store of every token-usage event, de-duplicated by line and by message so streamed responses are not counted twice
- CSV rollups by hour, day, week and month, each broken down by model
- Search across old prompts in every project
Pure Python standard library: no pip install, no dependencies. MIT licensed.