Blog / Claude Code
10 Tips to Stop Burning Your Tokens in Claude Code
Token waste in Claude Code isn't an abstract number — it's a dollar figure. Ten ways to see exactly where that money goes and stop paying for it.
Published July 6, 2026
My Anthropic invoice used to read like a stranger’s spending history. I knew roughly what I was doing in Claude Code each week, but the number at the end never quite matched the mental model — until I stopped treating “tokens” as an abstract context-window metric and started treating them as what they actually are: a per-token price tag, charged the moment something enters or leaves the model.
Once I started reading my usage the way I’d read a bank statement instead of a progress bar, the leaks got obvious fast. None of them needed a workflow overhaul — just knowing which habits were quietly the expensive ones.
1. Match the model to the job’s price tag
Claude Code will happily run everything through whatever model you last selected, and if that’s Opus for a rename-this-variable task, you’re paying Opus rates for Haiku work. As of writing, Claude Haiku 4.5 runs $1/$5 per million input/output tokens, Claude Sonnet 5 runs $2/$10 (introductory pricing through August 31, 2026), and Claude Opus 4.8 runs $5/$25 — a 5x spread from cheapest to most expensive on the same request. Use /model to drop to Sonnet or Haiku for mechanical edits and file-by-file work, and save Opus for the planning and architecture decisions that actually benefit from it. The full breakdown is on Anthropic’s pricing page if you want to check current rates before picking.
2. Every /clear pays a re-caching tax
Claude Code automatically caches the stable prefix of your session — system prompt, tool definitions, CLAUDE.md — and a cache read costs about 10% of the standard input price. That’s the good news. The catch: writing a fresh cache costs more than an uncached request (a 1.25x premium for a 5-minute cache, 2x for a 1-hour one), and /clear throws the existing cache away entirely. Clear between genuinely unrelated tasks like the context-hygiene habit it is — just don’t reach for it out of tidiness mid-task, because the next few requests after a clear are rebuilding a cache you just paid to discard.
3. Do the pixel math before you paste a screenshot
Claude prices images at ⌈width / 28⌉ × ⌈height / 28⌉ visual tokens — a real formula, not a rough estimate. A 1000×1000 screenshot costs about 1,296 tokens. A full 1920×1080 capture costs up to roughly 2,691 tokens on Claude’s high-resolution tier. Compare that to the actual information you wanted out of it — a selector, a hex value, a class name — which is maybe 30 tokens as text. You’re paying 40-90x markup for the model to guess at pixels what you could’ve just told it directly.
This is the exact waste UICuts exists to cut: point at any element on a live page and it copies out the real selector, computed styles, and DOM structure as text, ready to paste into Claude Code instead of a screenshot. No image tokens, no guessing, no “which button did you mean” round trip re-billing the whole conversation again.
4. Extended thinking is an output-token bill, not a free upgrade
Thinking tokens get charged at the output rate, which runs roughly 5x the input rate on most Claude models. That’s a reasonable price for a task that genuinely needs deep reasoning — a gnarly bug, a multi-file refactor plan — and a bad one for “rename this function,” where thinking mode just burns output-priced tokens deliberating over a decision that didn’t need deliberation. Reserve it for tasks where you’d actually want a human to stop and think first.
5. Idle MCP tool schemas are a line item on every single request
Every MCP server you connect registers its tools’ names, descriptions, and parameter schemas into your input tokens before you’ve called a single one — and that’s not a one-time setup cost, it’s resent on every request in the session. A handful of heavyweight servers can add hundreds to low-thousands of tokens per turn in pure schema overhead, priced at whatever your current model charges for input. Disconnect servers you’re not using for the project at hand; the bill doesn’t care that you meant to use them eventually.
6. Move repeatable, scriptable work off interactive sessions
If part of your workflow is genuinely batchable — bulk code review comments, generating docs for fifty similar functions, anything non-interactive and non-urgent — that work doesn’t belong in a live Claude Code session at standard rates. The Batch API processes asynchronous requests at a flat 50% discount on both input and output tokens. It won’t replace your actual coding session, but scripted, bulk-shaped work sitting inside your interactive loop is money left on the table.
7. Pick a billing model on purpose
A Claude Pro or Max subscription bundles Claude Code usage into a flat monthly fee with a usage ceiling; a pay-as-you-go API key bills every token with no ceiling at all, ever. Neither is universally cheaper — heavy, spiky usage can blow past a subscription’s included capacity and make the overage (or a plan upgrade) worse than metered API pricing would’ve been, while light, occasional use can make a subscription’s flat fee more expensive than what you’d actually rack up per-token. Know which one you’re on and whether your actual usage pattern still matches the choice you made when you signed up.
8. A bigger context window doesn’t mean a cheaper token
It’s tempting to assume that models with huge context windows must charge less per token to make the math work at scale. They don’t: a 900,000-token request bills at the exact same per-token rate as a 9,000-token one. There’s no volume discount built into the token price itself — which means a context window padded with files you’re not using costs precisely as much as one that’s lean, just multiplied by more tokens.
9. Treat /cost like a budget checkpoint, not a curiosity
/cost
Checking this after the fact tells you what already happened. Checking it before an operation that’s about to read a dozen files or run a long agentic loop tells you whether you’re about to blow past what the task is worth. Set yourself an informal ceiling per task — “this cleanup shouldn’t cost more than a cup of coffee” — and let /cost be the thing that tells you when you’ve crossed it, not a surprise at the end of the week.
10. Default to structured text over screenshots and raw file dumps, everywhere
The screenshot problem in tip 3 is really a specific case of a bigger one: any time you hand Claude Code a wall of raw material — a full log file, an entire config directory, a rendered PDF — and ask it to extract the three lines that matter, you’re paying full price for it to do parsing work you could’ve done with a grep or a head -n 20 yourself. Text beats images, and targeted text beats a text dump. Both are cheaper than making the model figure out which 2% of what you sent was the part you actually needed.
Key lessons learned
- Tokens aren’t an abstract context-window meter — every one is a line item at that model’s per-token rate, and the model, the mode (thinking or not), and the request type (cached, batched, interactive) all change that rate.
- The biggest markups hide in conversions: pixels converted to visual tokens, raw files converted to parsed answers. Send the model what it needs, not the raw material it’d have to extract that need from.
/costand/modelare the two levers most people check least often and would benefit from checking most.
Related reading
This post is the cost-accounting companion to 9 Ways to Reduce Token Usage in Claude Code, which covers the context-window mechanics — /compact, CLAUDE.md scope, sub-agent delegation — that this one assumes and builds the dollar math on top of. If you’re writing your own Claude Skills, the same conditional-loading principle that saves context also saves money, for the same reason. And if you’re calling Claude through the raw API rather than Claude Code, prompt-engineering-level tactics like caching and lean tool schemas pick up exactly where tips 2 and 5 leave off, with more knobs to turn. The same discipline shows up under different names in Cursor, GitHub Copilot, and Windsurf if Claude Code isn’t your only tool.
Install UICuts free if screenshots are still how UI context gets into your Claude Code sessions — thirty seconds to install, no account required, and it’s the one line item on this list you fix once and never think about again.
Frequently asked
Does Claude Code cost money separately from my Claude subscription? +
It depends on how you're paying. Pro and Max subscribers get Claude Code usage bundled into their plan's included capacity — you can hit a usage ceiling but you're not charged per token. If you've connected Claude Code to a pay-as-you-go API key instead, every input and output token bills at that model's per-token rate, and there's no monthly ceiling — just a bill.
How many tokens does a screenshot cost in Claude Code? +
Claude charges ⌈width / 28⌉ × ⌈height / 28⌉ visual tokens per image. A 1000×1000 screenshot costs about 1,296 tokens; a full 1920×1080 screen capture costs up to roughly 2,691 tokens on high-resolution-tier models — and that's before the model has extracted a single selector or CSS value from it.
Is prompt caching automatic in Claude Code, or do I have to turn it on? +
Claude Code applies caching automatically to the stable parts of a session — system prompt, tool definitions, CLAUDE.md. You don't set cache_control flags yourself the way raw API users do. What you control is whether your session's structure lets that cache actually get reused, or whether you're invalidating it by clearing constantly (see tip 2).
Does turning off extended thinking save money? +
Yes, when the task doesn't need it. Thinking tokens are billed as output tokens, which cost roughly 5x the input rate on most Claude models — a habit of deep reasoning on simple lookups adds up fast at that multiplier.
Can I use the Batch API from inside Claude Code? +
Not directly — Claude Code is an interactive session, and the Batch API is for asynchronous, non-interactive requests. It matters if you're also scripting bulk Claude usage outside your terminal (batch code reviews, bulk doc generation): route that through the Batch API for the 50% discount instead of firing off individual interactive-priced calls.
Does a bigger context window cost more per token? +
No — Claude's long-context models bill a 900,000-token request at the same per-token rate as a 9,000-token one. That's good news in one sense and bad in another: there's no scale discount, so a context window full of dead weight costs exactly as much per token as one full of things you actually needed.