Analyze a JSONL session file and return a content breakdown.
Read-only — never modifies the file.
Detects compaction boundaries (type:"summary" lines). When Claude Code
auto-compacts, old messages stay in the JSONL but are no longer in the
active context. We only count content after the last compaction.
Token estimation prefers actual API-reported token counts from the JSONL
(usage.input_tokens on assistant messages). Falls back to a chars/4 heuristic
when no usage data is available.
Analyze a JSONL session file and return a content breakdown. Read-only — never modifies the file.
Detects compaction boundaries (type:"summary" lines). When Claude Code auto-compacts, old messages stay in the JSONL but are no longer in the active context. We only count content after the last compaction.
Token estimation prefers actual API-reported token counts from the JSONL (usage.input_tokens on assistant messages). Falls back to a chars/4 heuristic when no usage data is available.