Show HN: CodeBurn – Analyze Claude Code token usage by task (github.com)
Built this after realizing I was spending ~$1400/week on Claude Code with almost no visibility into what was actually consuming tokens.
Tools like ccusage give a cost breakdown per model and per day, but I wanted to understand usage at the task level.
CodeBurn reads the JSONL session transcripts that Claude Code stores locally (~/.claude/projects/) and classifies each turn into 13 categories based on tool usage patterns (no LLM calls involved).
One surprising result: about 56% of my spend was on conversation turns with no tool usage. Actual coding (edits/writes) was only ~21%.
The interface is an interactive terminal UI built with Ink (React for terminals), with gradient bar charts, responsive panels, and keyboard navigation. There’s also a SwiftBar menu bar integration for macOS.
Happy to hear feedback or ideas.
22 comments
[ 0.24 ms ] story [ 53.1 ms ] threadJust like Claude Code btw.
I'm working on a custom harness because I don't like or trust some of the ones out there, so I'm going to build one purely for myself and my own needs to see just how they work, and figure out some of what you've learned by looking at how Claude works, so I might add your project to my list of tooling to look at.
[1] https://github.com/cordwainersmith/Claudoscope
holy slop. the $200/month plan has NEVER hit rate limits for me and I often run 5+ tabs of concurrent agents in a large 300k LoC codebase
I do find the activities a little suspect - it has 1 turn of planning for me in the last 30 days. I have claude write plans first before every coding session, often using one agent session to plan and then output a plan file, and then others to execute on it. I also have several repos dedicated to 'planning' in the sense of what should I do next based on what emails/tickets/bugs etc. I have. In other words - I do all kinds of planning!
The JSONL transcript parsing is clever. I've been reading those same files for a different purpose (rendering conversation history in a menu bar app) and the format is more reliable than I expected. Each tool call has enough metadata to reconstruct what happened without needing to re-parse the full conversation.
One thing that would be interesting to see: cost broken down by session when you're running multiple sessions in parallel. Right now I have no idea which of my 4 running sessions is burning the most tokens.
Cache hit rate is another metric I wouldn't have looked at otherwise. 98.2% on Opus 4.6 here. Apparently that's the difference between a $2k month and something much worse.
Activity classification is the actually useful feature though. Most token trackers just tell you total spend. This tells you what kind of work the spend went to.
Nice work!