Listen to today's AI briefing

Daily podcast — 5 min, AI-narrated summary of top stories

Codeburn: The TUI That Shows Exactly Where Your Claude Code Tokens Are Going

Codeburn: The TUI That Shows Exactly Where Your Claude Code Tokens Are Going

A new open-source TUI, Codeburn, analyzes Claude Code session transcripts to show token spend by task type, helping developers optimize their usage and costs.

GAla Smith & AI Research Desk·1d ago·3 min read·2 views·AI-Generated
Share:
Source: reddit.comvia reddit_claude, devto_claudecode, hn_claude_codeMulti-Source

The Problem: Blind Spending

Developers using Claude Code heavily, like the creator spending $200+ daily, have had zero visibility into what consumes their tokens. While tools like ccusage show aggregate cost, they don't answer critical questions: Is debugging the budget killer? Which project is the most expensive? Is most of the spend just on conversation?

The Solution: Codeburn

codeburn is a new, open-source Terminal User Interface (TUI) that solves this. It reads the session transcripts Claude Code already stores locally (~/.claude/projects/) and classifies every interaction into 13 deterministic categories based on tool usage patterns—no additional LLM calls required.

What It Shows You

  • Cost by Task Type: Coding (edits, writes), Debugging, Exploration, Brainstorming, and—crucially—Conversation (turns with no tool use).
  • Cost by Project, Model, Tool, and MCP Server: Pinpoint exactly which part of your workflow is driving costs.
  • Daily Activity Chart: Visual timeline with gradient bars showing activity peaks.
  • Interactive Views: Use arrow keys to switch between Today, Week, and Month summaries.
  • Swiftbar Widget (macOS): A menu bar widget for at-a-glance daily spend.

The Eye-Opening Insight

For its creator, the data was revealing: 56% of total spend was on "Conversation"—turns where Claude responded without using any tools. The actual act of coding (file edits and writes) accounted for only 21%. This insight is a direct lever for optimizing prompts and workflow to reduce waste.

How To Use It Right Now

Installation and use is straightforward:

npx codeburn

That's it. It works with any existing Claude Code installation and requires no configuration. It parses your local session history on the fly.

Actionable Takeaways from the Data

  1. Audit Your "Conversation" Spend: High conversation costs often mean you're not giving Claude enough context or clear instructions upfront, leading to back-and-forth clarification. Be more specific in your initial prompt.
  2. Compare Project Costs: Identify if one legacy codebase or experimental project is disproportionately expensive. This can justify refactoring or changing your approach.
  3. Evaluate MCP Servers: See if a particular MCP server (like a database connector or API tool) is token-heavy. You might need to optimize its prompts or seek an alternative.
  4. Model Selection Validation: Confirm if using a more capable (and expensive) model like Claude Opus 4.6 is justified for a given task type, or if Sonnet would suffice.

This tool transforms Claude Code from a black-box expense into an instrumented, optimizable development environment.

Following this story?

Get a weekly digest with AI predictions, trends, and analysis — free.

AI Analysis

Run `npx codeburn` today. Don't just look at the total cost; drill into the "Conversation" category. If it's over 30%, you have a prompt clarity problem. Start your next session by writing a more detailed `CLAUDE.md` or initial prompt that includes explicit constraints and desired output format to reduce clarifications. Use the project breakdown to justify technical debt work. If "Project X" has a high "Debugging" cost, that's quantitative evidence for allocating time to improve its test coverage or documentation. Finally, pair this with the `--compact` flag (if available in your version) for file outputs and other known token-saving practices. Codeburn gives you the metrics to prove which optimizations actually work.
Enjoyed this article?
Share:

Related Articles

More in Products & Launches

View all