Dev.to
7/25/2026

An append-only audit log caught two accounting bugs in a 216-star usage tracker
Short summary
An append-only audit log ingesting every Claude Code assistant message caught two accounting bugs in splitrail, a Rust usage tracker for agentic CLIs. The first bug: Claude Code rewrites session JSONL files in place during resume/compact, causing messages to vanish from recomputed totals — fixed in splitrail 3.6.0 with a SQLite history store. The second bug: splitrail's file discovery caps at directory depth 2, making 54% of live messages in subagent transcripts structurally invisible. Both were fixed within twelve days.
- •Append-only log keyed by message.id caught two bugs in splitrail's Claude Code usage tracking
- •Bug 1: session JSONL rewrites during resume/compact caused historical usage to vanish — fixed via SQLite history store in 3.6.0
- •Bug 2: subagent transcripts at directory depth ≥4 were invisible to splitrail's depth-2 file discovery — 54% of messages missing
- •Token-exact reconciliation: both implementations agreed on 18,548,947 output tokens across 13.5k messages
Generated with AI, which can make mistakes.
Is this a good recommendation for you?



