I Tracked Every AI Coding Dollar I Spent — Less Than Half Went to Writing Code

I Tracked Every AI Coding Dollar I Spent — Less Than Half Went to Writing Code

May 30, 2026 ai coding developer tools cost optimization cli tools productivity tech spending

Most developers assume their AI coding assistant spend is going toward, you know, coding.

I assumed the same thing. Then I built a tool to audit my own usage and got a very different picture.

Over 30 days, I spent $7,890 across 105,718 AI coding API calls. About $3,781 — just under half — actually produced code. The other $4,109 was absorbed by exploration, debugging, delegation, and conversation. A collaborator that thinks more than it types.

This is not a problem. It is a data point.

The Full Breakdown

When I classified every API call into task categories, the numbers told a clear story:

Coding accounted for 47.9% of spend — the largest bucket, but still a minority. Exploration ate 11.1%, delegation 9.7%, and debugging 8.8%. Feature development added another 8.3%. The remaining categories — conversation, brainstorming, testing, refactoring, git operations, build/deploy, planning, and general chat — made up the rest.

If you group everything that produces working code — coding, feature development, refactoring, and testing — you land at roughly 60% of total spend. That means 40% of every dollar was spent on tasks that did not output a single line of production code.

Why Exploration Is Not Waste

Here is the part I want to be clear about: this is not a story about inefficiency.

Exploration is real work. When you point an AI at a new codebase and ask it to understand the architecture, you are paying for comprehension. When you debug a tricky edge case, you are buying reasoning cycles, not just syntax. Delegation to subagents is a workflow pattern — not a bug.

The point is not that you are overspending. The point is that you are paying for something different than you might have assumed. You are not buying a code generator. You are buying a collaborator that spends most of its budget understanding the problem before it writes a line.

That reframing matters when you evaluate ROI, set budgets, or choose between tools.

How to Actually Measure This

I built CodeBurn specifically to answer this question. It is a CLI tool that reads your AI coding session data directly from your local disk. No API keys, no external services, no data leaving your machine. Every call gets classified into one of 13 task categories using deterministic rules — based on tool-usage patterns and message content, not a separate LLM inference pass.

Run it without arguments and you get an interactive dashboard showing cost, call volume, sessions, cache hit rates, daily trends, and category breakdowns. Filter by model, provider, or task. Export to markdown for team reports. The optimize command scans for fixable waste patterns — context-heavy sessions, high retry counts, expensive sessions with weak output signals.

The installation is a single command. If you use Claude Code, Cursor, or any coding assistant that stores session data locally, you can run it today.

What This Changes

The most useful frame for thinking about AI coding costs is not "cost per line of code produced." It is "cost per working session."

If a $100 session produces 300 lines of production code in an area you would have spent two days debugging yourself, that is a good deal — even if only $48 of it was coding. If a $4 session produces zero code but you now understand a dependency you were stuck on for a week, that is probably worth it too.

The trap is treating these tools as pure code generators and then being surprised when they do not behave like compilers. They behave like collaborators. And collaborators think before they type.

The Takeaway

After running this analysis, I adjusted how I set budgets and evaluate tools. I care less about raw output tokens and more about session efficiency. I look at the ratio between thinking tasks and producing tasks. I flag sessions with high cost and low delivery as candidates for review — not because they are bad, but because patterns compound.

If you are spending significantly on AI coding tools and do not have visibility into where the money goes, you are flying blind. The numbers might surprise you. They surprised me.

But surprise is better than a guess.

Read in other languages: