Last month I decided to track every cent I spent on AI coding tools. Claude Code, Cursor, Copilot, API calls — all of it. The results surprised me, changed how I work, and honestly saved my indie hacker budget.
Here's the full breakdown.
The Setup
I'm a solo Mac developer building two apps: a menu bar token cost tracker and a distraction blocker. My AI stack at the start of the experiment:
- Claude Code (API-based, pay-per-token)
- Cursor Pro ($20/month)
- GitHub Copilot ($10/month)
- Misc API calls (OpenAI, Anthropic direct)
Total expected spend: ~$80-100/month. Actual spend? Keep reading.
Week 1: The Shock
Total: $127.43
I was hemorrhaging tokens and didn't even know it. The biggest offender? Late-night coding sessions where I'd send vague prompts like "fix this" or "make it better" and let Claude Code retry 4-5 times. Each retry was burning through context windows I was paying for.
The worst single session: $47.12 in one evening on retry loops for a SwiftUI layout bug that I eventually fixed manually in 10 minutes.
Week 2: Tracking Changes Behavior
Once I started watching costs in real time (I built TokenBar for exactly this — it sits in your Mac menu bar and shows live per-request costs), everything changed:
- I stopped using Opus for routine tasks and switched to Sonnet for ~70% of work
- I wrote clearer, more specific prompts instead of "fix everything" messages
- I batched related questions instead of sending 15 separate messages
Total: $64.21 — nearly half of Week 1.
Week 3: The Focus Problem
Here's what nobody talks about: the cost isn't just money — it's attention.
I realized a huge chunk of my "AI coding time" was actually me bouncing between Twitter, YouTube, and Reddit between prompts. I'd send a message to Claude, wait 8 seconds, open Twitter "just to check," and suddenly 20 minutes had vanished.
My actual coding time per day? About 3.5 hours. Time I thought I was coding? 8 hours.
The fix was blocking algorithmic feeds on my Mac during work hours. Not the whole apps — I still needed YouTube for tutorials and Twitter for announcements. Just the infinite-scroll feeds that were designed to trap me. I use Monk Mode for this — it blocks feeds at the URL level so you keep the useful parts of each app but lose the doomscroll.
Week 3 total: $51.88 — and I shipped more features than the previous two weeks combined.
Week 4: The System
By week 4, I had a system:
- Morning: Start TokenBar, set a mental budget for the day (~$8-12)
- Before each prompt: Glance at the running total. Ask "is Opus worth 5x for this, or will Sonnet do?"
- Block feeds: Monk Mode on from 9am-5pm. Feeds come back in the evening
- Session reviews: At end of day, check which sessions burned the most and why
Week 4 total: $38.67
The Numbers
| Week | Spend | Features Shipped | Wasted Retry Loops |
|---|---|---|---|
| 1 | $127 | 2 | 14 |
| 2 | $64 | 3 | 6 |
| 3 | $52 | 5 | 3 |
| 4 | $39 | 4 | 1 |
30-day total: $282 (down from what would have been ~$500+ at Week 1 pace)
7 Lessons Learned
1. You Can't Optimize What You Can't See
Token costs are invisible by default. You get a bill at the end of the month and go "how??" Put the number in front of your face in real time and behavior changes automatically.
2. Model Selection is the Biggest Lever
Switching from Opus to Sonnet for routine tasks (boilerplate, simple refactors, test writing) cut my costs by 50-60% with almost no quality difference for those tasks.
3. Vague Prompts Are Expensive Prompts
"Fix this bug" → 3 retries, 4000 tokens burned. "The SwiftUI NavigationStack is pushing twice on iOS 17.4, here's the relevant code and the expected behavior" → 1 shot, 800 tokens.
4. Late-Night Coding Is Token Arson
My worst cost days were always after 11pm. Tired brain = lazy prompts = retry loops = burning money. Set a cutoff time.
5. Context Windows Have a Price
Sending your entire codebase as context for a CSS question? That's like hiring a lawyer to pick your lunch. Scope your context.
6. The Feed Is the Enemy, Not the App
I tried deleting Twitter and YouTube. Reinstalled within 3 days because I actually needed them. Blocking just the algorithmic feed was the move — keeps the tool, removes the trap.
7. Compound Savings Are Real
Small improvements stack. Better prompts + right model + fewer retries + focused work time = dramatic cost reduction without sacrificing output quality.
Tools That Helped
- TokenBar ($5, Mac) — Real-time LLM token cost tracking in your menu bar. See per-request and cumulative costs as you work. This is the thing that made the whole experiment possible.
- Monk Mode ($15, Mac) — Blocks algorithmic feeds (YouTube homepage, Twitter timeline, Reddit front page) without blocking the apps themselves. The "block the feed, keep the tool" approach.
The Meta-Lesson
AI coding tools are incredibly powerful. They're also incredibly easy to waste money on. The developers who will win in the AI era aren't the ones spending the most — they're the ones spending intentionally.
Track your costs. Block your feeds. Ship more with less.
What's your monthly AI tool spend? Have you tracked it? I'm genuinely curious — drop your numbers in the comments.
Top comments (0)