CodeBurn: Track Claude Code Token Spending by Task
New tool helps developers monitor token consumption in Claude Code agents, solving visibility problems for teams spending $1400+ weekly on AI-powered coding.
April 20, 2026
Claude Code agents are powerful. They're also expensive if you don't know what's eating your token budget. Someone finally built a tool to answer the question developers have been asking for weeks: where exactly are all those tokens going?
CodeBurn is an open-source analyzer that breaks down your Claude Code token consumption at the task level. Instead of watching your API bill climb without understanding why, you get granular visibility into which tasks, which agents, which code generation steps are actually consuming your credits.
The problem CodeBurn solves
Running Claude as a coding agent is like renting a construction crew by the hour without job-site tracking. You know you're spending money. You might even know roughly how much. But when someone asks which project drained the budget, you're guessing.
Developers using Claude Code agents report weekly bills hitting $1400 or higher. That's not unusual for serious usage. What is unusual is the near-total lack of visibility into what generates those costs. API logs tell you tokens consumed. They don't tell you why those tokens mattered or whether that particular task was worth it.
CodeBurn changes that by instrumenting your Claude Code calls to track:
- Token usage per individual task
- Cost breakdown by agent or workflow
- Input vs. output token ratios
- Historical trends to spot patterns
Suddenly you have data. You can see that your code review task uses 3x the tokens of your refactoring task. You can identify which agents are efficient and which are token-hungry. You can make actual decisions about where to optimize.
What the GitHub community is saying
The HN thread shows developers immediately recognizing the gap this fills. Several people mentioned building their own tracking solutions because Anthropic's dashboards don't provide task-level granularity. One comment hit the core frustration:
"We're using Claude Code heavily and our bill is $2000/week. I have no idea if that's reasonable for what we're doing. This solves that problem."
That's the sweet spot CodeBurn occupies. It's not flashy. It's not a competitor to Claude itself. It's the unglamorous but essential tool that sits between you and your cloud bills.
How it actually works
CodeBurn integrates with your Claude Code setup by intercepting API calls and logging detailed metrics. You point it at your Claude interactions, and it aggregates token usage across tasks, time periods, or custom groupings you define.
The output is straightforward: dashboards and reports showing which tasks cost what. Nothing fancy. Nothing you couldn't theoretically build yourself. But that's the point. It's the thing that actually needed to exist in the Claude ecosystem and didn't.
Why this matters right now
Claude Code adoption has been accelerating. More teams are building agents. Budgets are scaling. But cost management tools haven't kept pace. You get high-level API metrics or nothing.
Tools like this typically mean one of two things. Either the platform eventually builds this feature into its own dashboards (good for everyone), or the community tool becomes essential infrastructure. Either way, CodeBurn is filling a real gap.
If you're running Claude agents and your monthly bill is climbing faster than your confidence in its value, this is worth twenty minutes to explore. The GitHub repo is straightforward, and the problem it solves is concrete.
The broader implication
CodeBurn also signals something about how developers interact with AI tools at scale. When the first-party observability isn't there, the community builds it. That's happened with monitoring systems, database tools, and now LLM cost tracking. It suggests Anthropic might want to build better cost visibility into Claude itself before the workarounds become the standard.
For now, if you're spending serious money on Claude Code agents and can't answer "why?", CodeBurn is the answer. Check the GitHub repo for setup details and examples.
Comments
Some links in this article are affiliate links. Learn more.