CodeBurn: Open-Source AI Coding Cost Tracker That Shows Exactly Where Every Token Dollar Goes

Free open-source tool that tracks and optimizes AI coding costs across 40+ tools locally.
CodeBurn is an open-source, locally-run cost tracking tool that reads session files from40+ AI coding tools including Claude Code, Cursor, and GitHub Copilot. It breaks down token spending by task, model, project, and Pull Request, and features an Optimize tab that automatically identifies waste like cache bloat and retry taxes, applies fixes, and tracks savings—all without uploading any data to the cloud.
When AI Coding Bills Become the New Technical Debt
As AI coding tools like Claude Code, Cursor, and Copilot become part of developers' daily workflows, a previously overlooked problem is surfacing: how much are these tools actually costing, and where exactly is the money going? For token-based AI coding subscriptions, developers often see nothing more than a lump-sum figure at the end of the month, with no way to tell which task, model, or project consumed the budget. To understand this, tokens are the basic unit large language models use to process text—roughly equivalent to 3/4 of an English word or 1-2 Chinese characters. AI coding tools typically charge separately for input and output tokens, and pricing varies dramatically across models—for example, GPT-4o's input token price is roughly tens of times higher than GPT-4o-mini. Every code completion, conversation query, and context injection generates token consumption, and the larger the context window (such as a 200K-token long conversation), the higher the cost per request. This usage-based pricing model means that unmanaged usage habits can quietly produce staggering bills.
As teams scale and AI call frequency rises, this "spending black box" quickly evolves into an uncontrollable cost problem.
The open-source tool CodeBurn, which recently debuted on Product Hunt, targets exactly this pain point. With the tagline "See where your AI coding spend actually goes," it offers developers a complete cost-tracking and optimization solution. The tool has already received 106 upvotes, landing at #11 on the daily leaderboard.

Core Features and How CodeBurn Works
Zero-Intrusion Session File Reading
CodeBurn's most elegant design choice is that it doesn't need to intrude on your workflow. It directly reads the session files that AI coding tools already write locally—no extra configuration or proxy interception required.
From a technical standpoint, AI coding tools like Claude Code and Cursor write conversation history, model call parameters, token usage, and other metadata in JSON or similar formats to the local file system during runtime. For example, Claude Code stores session records in the .claude/ folder under the user directory, while Cursor maintains context caches in project-level .cursor/ directories. These files are essentially byproducts generated by tools to support session recovery and context continuity, but they contain complete API call information—including which model was used, how many tokens were consumed, and whether requests succeeded. CodeBurn leverages these existing data sources, avoiding invasive operations like setting up proxy servers or modifying API key configurations.
According to its documentation, CodeBurn already supports over 40 AI coding tools including Claude Code, Cursor, Codex, and GitHub Copilot. This means regardless of which combination your team uses, everything can be unified under one monitoring umbrella.
Multi-Dimensional Breakdown of Every Token Dollar
Traditional bills give you only a total, but CodeBurn breaks down consumption across four dimensions: task, model, project, and Pull Request. You can clearly see:
- Which specific task consumed the most tokens
- The cost proportion across different models (e.g., premium vs. budget models)
- Which project is the biggest "money pit"
- How much a single PR actually burned through
Attributing AI coding costs to the Pull Request level carries significant engineering management implications: teams can calculate the "AI-assisted cost" of each feature and incorporate it into project budgets and ROI assessments. For example, if a complex refactoring PR consumed $50 in AI tokens but saved a developer 8 hours of work, managers can intuitively judge whether the investment was worthwhile. This granularity of cost tracking also helps identify inefficient AI usage patterns—such as developers habitually having AI repeatedly generate and discard code, causing a single PR's AI cost to far exceed the team average.
This fine-grained attribution analysis transforms costs from a vague monthly number into traceable, manageable data assets.
The Optimize Tab: Automatically Identifying Waste and Optimizing Bills
Where CodeBurn differentiates itself from ordinary cost dashboards is its Optimize tab. Rather than just displaying data, it proactively finds waste and provides solutions.
The team highlights two typical categories of cost waste:
-
Cache bloat: In AI coding scenarios, cache bloat refers to extra charges caused by improper context caching strategies. Modern AI APIs (such as Anthropic's Prompt Caching) allow developers to cache frequently used context prefixes to reduce repeated charges, but if cached content is repeatedly rebuilt after expiration, or caching granularity is set unreasonably (e.g., caching unnecessarily large numbers of code files each time), it actually generates additional cache write fees. Additionally, some AI coding tools inject entire codebase indexes as context even when the actual task involves only a few files—this excessive context padding is a classic manifestation of cache bloat.
-
Retry tax: This is an easily overlooked cost trap in AI API calls. When APIs return rate limits (429 errors), timeouts, or server errors, clients typically retry automatically. The problem is: for requests that have already been partially processed (such as streaming responses interrupted midway), providers may have already charged for generated tokens, and retrying means paying again from scratch. In high-concurrency teams, especially during provider peak loads, retry rates can reach 10-20%, and this hidden cost adds up significantly. What's worse, many retries happen internally within SDKs or tools, making it impossible for developers to distinguish retry-generated charges from their bills.
Going further, Optimize doesn't just identify problems—it applies fixes and tracks how much the fixes actually saved. This creates a closed loop of "discover waste → apply optimization → verify results," making the optimization itself quantifiable. For teams spending hundreds or thousands of dollars monthly on AI bills, this actionable cost-saving mechanism is far more valuable than data display alone.
Privacy First: All Data Processed Locally
In an era where AI tools commonly require cloud accounts and data uploads, CodeBurn takes a path that puts developers at ease: all processing happens on your local machine.
The team explicitly promises:
- No account registration required
- No data uploaded to the cloud
- Runs entirely on your machine
For enterprises and individual developers handling sensitive codebases, this is crucial. Session files often contain code snippets, prompt content, and other sensitive information—local processing completely eliminates data breach concerns and avoids compliance risks.
MIT Open-Source License: Truly Free with No Paywall
CodeBurn uses the MIT License, making it a "truly free" open-source tool—where "truly" means no hidden paywalls or feature restrictions.
The MIT License is one of the most permissive open-source licenses, allowing anyone to use, modify, and distribute the software for free, including for commercial purposes, with the only requirement being retention of the copyright notice. By contrast, many "open-source" developer tools use restrictive licenses like BSL (Business Source License) or SSPL that still require payment in certain commercial scenarios. In the AI tools space, many products attract users under the open-source banner while imposing feature restrictions or usage caps in their cloud-hosted versions. CodeBurn's choice of MIT means enterprises can freely integrate it into their internal toolchains or even build customized cost management platforms on top of it without worrying about license compliance.
According to official data, the tool is already used by over 150,000 developers worldwide. This adoption scale is quite impressive for an open-source developer tool and indirectly confirms that AI coding cost management is a widespread, genuine need.
Why AI Coding Cost Tracking Is Becoming Important
CodeBurn's emergence actually reflects the AI coding industry's transition from "wild growth" to "refined operations."
When AI coding tools first emerged, developers focused on whether they worked and how well they worked; once these tools became team staples, the question naturally evolved to whether they're affordable and worth it. This shift closely mirrors the trajectory of the cloud computing industry—early on, enterprises rushed to the cloud for agility, and years later FinOps (cloud financial management) became an independent engineering practice. AI coding spend is following the same path: from unmanaged free usage to requiring dedicated tools and processes for cost visibility and optimization. CodeBurn is a product of this maturation process.
From a product logic perspective, several design decisions are commendable: first, zero-intrusion integration that reads existing session files rather than restructuring workflows; second, PR-level attribution granularity that directly links costs to specific outputs; and third, an optimization closed loop that turns "saving money" into a verifiable action rather than empty advice.
Of course, the tool's real-world value still needs validation in actual scenarios. The coverage of 40+ tools, accuracy of session file parsing, and reliability of Optimize's automatic fixes are all key points users need to verify firsthand. But as a free, open-source, locally-run cost tracker, CodeBurn undeniably provides a worthwhile management entry point for ever-growing AI coding expenses.
For any developer or team puzzled by their monthly AI coding bills, CodeBurn might be the first tool that lets you truly "see" where that money is going.
Related articles

LangChain4j No AI Agent in Practice: Agent Architecture Without Accessing LLMs
Deep dive into LangChain4j No AI Agent implementation: inline tool methods as plain Java methods to avoid costly, slow high-frequency LLM calls in Agent systems.

AI Novel Writing: The Dual Countdown Method for Solving the Sagging Middle Problem
Struggling with a sagging middle in your novel? The Dual Countdown Method uses conflicting public and private deadlines, four-item cards, and a pause test to systematically solve mid-section pacing problems in long-form fiction.

CHAP Protocol Explained: The Core Solution for Standardizing Human-AI Agent Collaboration
Deep dive into CHAP (Collaborative Human Agent Protocol): its design philosophy, core architecture, and application scenarios. Analysis of its relationship with MCP and A2A protocols.