4 Things Quietly Costing You Money in Claude Code
TL;DR
You do not need GitHub repos or add-ons to save tokens. Claude Code already does a lot of it for you. Four habits undo that: using /compact like a diet, letting the cache expire, loading too much before you type, and leaving the defaults on. Fix them, then check one number: /usage today and again in a week.
You do not need add-ons to save tokens in Claude Code
Everybody says you need GitHub repos, extra add-ons, or a long list of hacks to save tokens. You don't. Anthropic already built Claude Code to save you tokens, and each new release cuts your costs a little more.
But four things quietly cost you money, and you are probably doing them right now. This guide covers all four, plus the one number that tells you if the fixes work.
Know what a token is and what cost means
A token is the unit Claude charges you for. It is about the size of a short word.
- On a monthly plan, tokens use up your limit.
- On an API key (you pay per use), tokens are dollars.
So when I say cost in this guide, I mean tokens. The fixes are the same for both.
Start a fresh chat for each new job with /clear
If you learn one idea from this guide, make it this one. The longer your chat runs, the more every new message costs. So start a fresh chat for each new job.
type this/clear/clear wipes your chat so you start at zero. It costs nothing. If you want the old chat back later, name it first, then find it in the sidebar and open it again:
type this first/rename landing pageUnderstand why a long chat costs more
Think of Claude as a brilliant contractor with total amnesia. It does not remember anything between messages. So each time you send a message, you are really sending the whole thread, from your first message to your newest one. Claude reads all of it, answers, and forgets it again.
Everything Claude reads on a message is called the context. That reading is what you pay for. A longer thread means more reading on every message.
One more thing follows from this. A file Claude reads early stays in the thread. You pay for it again on every message after. That is why a new job gets a new chat.
Learn the cache: why re-reading can be cheap
All that reading sounds expensive. Claude Code keeps it cheap with the cache. A cache is short-term memory. Most of your chat has not changed since your last message, so the cache remembers what Claude already read. It only has to read your new message.
Reading from the cache costs a tenth of the normal price, or less.
The catch: the cache only works while nothing changes, and it does not last forever.
- On a monthly plan, it forgets after about an hour.
- On the API, or when you use extra credits you bought, it forgets after five minutes.
- Each message that hits the cache resets the timer.
- If you switch models, you start over. Each model has its own cache.
Anthropic cares about this a lot. In their write-up on building Claude Code, they say they run alerts on their prompt cache hit rate and declare incidents if it gets too low. You can read it at claude.com/blog under "Lessons from building Claude Code: prompt caching is everything."
Claude Code has a few other tricks that keep reading light. You do not have to set them up. MCP connectors (how Claude plugs into apps like Slack or GitHub) load only their names until Claude uses one. Very long results are cut off and saved to a file that Claude can open if it needs it. And subagents (helper chats) do messy work on their own, then send back a short summary. Helpers cost tokens too, so they are worth it only for big jobs.
Habit 1: stop using /compact like a diet
What you do now: your chat is slow. You are 90 minutes into a landing page, at message 60. So you type /compact, because everybody says it shrinks the chat, so it must shrink the bill.
Why it costs you: /compact takes your whole chat, writes a short summary, and replaces the chat with that summary. To write the summary, Claude has to read the entire chat one more time. That read is an extra request. Think of meeting minutes. Somebody has to read the whole transcript to write them. The minutes are short, but the reading already happened.
If the cache is fresh, that extra read is cheap. If the cache expired, you pay full price for it, and the summary starts a new cache from scratch. It can also lose small instructions you gave early on.
What /compact is good for: making room. That is all. Use it in two cases:
- Your chat is almost full and you are in the middle of a job you can't restart.
- You are deep in a long project and about to move to the next part of it.
You can tell it what to keep:
type this/compact keep the plan and the file namesClaude Code also compacts on its own when your chat gets close to full, so you do not need to babysit it.
What to do instead:
- The job is done: type /clear.
- Claude took a wrong turn: do not type "that didn't work, try this." Type /rewind. Claude Code takes the chat back to before the wrong turn. Rewinding keeps your cache.
- The job is not done but the chat is heavy: use a handoff doc.
A handoff doc is my favorite. It costs about as much as /compact, or a little more, because Claude has to read your chat and write the doc. But you get to read the doc and fix it first. You decide exactly what survives, and you can keep it for next week.
type thisWrite a thorough handoff file. Cover my goal, what is done, what is left, the decisions we made, and what did not work.Then run /clear and tell the new chat:
type thisRead handoff.md and pick up where we left off.Habit 2: stop letting the cache expire mid-job
What you do now: you work on your landing page all morning, then go to lunch. You come back and ask one tiny question.
Why it costs you: that tiny question costs more than your last message. The cache expired while you ate. Your next message re-reads the entire chat at full price. After that, the cache is fresh again.
Anthropic added a fix for part of this. In a recent version of Claude Code, a big chat (200K+ tokens) left idle for about 54 minutes gets compacted before the one-hour cache expires. When you come back, Claude reads the short summary and not the whole chat. Anthropic's docs describe this for the terminal, on the one-hour cache of a monthly plan. I have not seen it documented for the desktop app, so do not count on it there. It is still a compact, so Claude still reads the whole chat once, and it can still lose small details.
The other cache breaker is switching models. Claude comes in different models. Opus is the bigger, more expensive one. Sonnet handles most jobs for less. Each model has its own cache. Say you are an hour into a chat on Opus and you switch to Sonnet to save money. Sonnet can't use Opus's cache. It reads your whole chat from scratch at full price. Switching to a cheaper model sounds like saving, and it is a surprise bill.
What to do instead:
- Pick your model before the job starts and stick with it.
- Take your breaks between jobs, not in the middle of one. On the API, the window is only five minutes.
- If you walk away and the job is done, type /clear before you leave.
- To change how hard Claude thinks, use /effort, not /model. On current models, changing effort keeps your cache.
There is also a setting that switches models for you. It uses Opus to make the plan and Sonnet to build:
type this/model opusplanIt is useful, but every plan-mode toggle is a model switch, and each switch starts a fresh cache. You pay that one-time read each time.
Habit 3: stop loading things before you type a word
What you do now: you open a fresh chat and type "hi." You think nothing was read.
Why it costs you: a big file just got loaded into your context. That file is CLAUDE.md, the file Claude reads at the start of every chat. Say yours is 600 lines of rules. Claude Code sends it with every message. While the cache is fresh, that is cheap. Every time the cache expires, Claude pays full price to read all 600 lines again.
What to do instead, step 1: use CLAUDE.md like an index. Anthropic's docs say to aim for under 200 lines. That is a target, not a hard limit. Think of a tree. CLAUDE.md is the trunk, and it holds only your highest-level rules. Each branch is a separate file for one kind of job, and CLAUDE.md tells Claude which branch to climb. Or it can point to one index file that lists where everything else lives. Claude only opens a branch when the job needs it.
type thisMy CLAUDE.md is too long. Keep only the highest-level rules in it. Move the rest into separate files by kind of job, and point to them from CLAUDE.md.Step 2: turn repeat jobs into skills. A skill is a text file of step-by-step instructions that Claude only opens when it needs them. Until then, only a short description is loaded.
A skill can also carry a script, a small program that does one job. Say every Monday you pull last week's numbers out of a spreadsheet. Instead of Claude reading every row and working out the totals from scratch, a script adds them up on your computer. Claude never reads the code. It only sees the result, like "42 sales, up from 38." That beats having Claude write new code and new rules every time.
type thisTurn this process into a skill.You create it once. Next time you use it for almost free.
Step 3: trim what you do not use. It is easy to end up with too many connectors and skills, and each one adds a little to every session. Run these:
- /mcp: turn off the connectors you are not using.
- /context: shows what is taking up space in your chat.
- /doctor: a checkup for your setup. It flags problems and proposes fixes that Claude applies after you confirm. Run it every so often.
Step 4: trim test output. When Claude builds something, it runs tests, which are quick checks that your project still works. A test can print hundreds of lines, and most just say "passed." Claude Code only cuts results that are far longer than that. So the rest goes into your chat and gets re-read on every message after. The fix is a hook, a little filter that trims those results before Claude sees them. You do not have to build it.
type thisWrite me a hook that trims test results down to just the failures.Habit 4: change the defaults that make every chat cost more
What you do now: you leave everything as Claude Code set it. A default is a setting Claude Code chose for you before you opened it. Two of them make every chat cost more.
Why it costs you: on a paid plan, Claude Code starts on Opus, and thinking is on. Thinking is Claude writing out its reasoning before it answers. Everything Claude reads counts as input. Everything Claude writes counts as output, and that includes the thinking. Output costs five times what input does on current models. Running Opus on every job is like sending your best surgeon to take your temperature. It works, but you pay for skills the job did not need.
What to do instead:
- Pick Sonnet for the build. Choose it before the job starts, so you do not break the cache.
- Type /effort and pick low for easy jobs, like renaming a file.
- Use plan mode, so Claude agrees on a plan with you before it touches a file.
- Be specific.
Being specific matters most. If you type "fix the bug," Claude scans files to find it, and every file it reads gets added to your chat. Point it at the place instead:
type thisFix the date bug in the checkout file.The words you type are a tiny part of what Claude reads, so shorter prompts barely matter. What you point Claude at matters far more.
Check the one number: /usage today and in a week
How do you know any of this works? Type /usage. It shows your session cost, your plan limits, and your activity. On a Pro, Max, Team or Enterprise plan, it also shows recent usage by skill, subagent, plugin and individual connector, each as a percent of the total. It is not a count per chat. It also flags things like long context or cache misses when one of them is 10% or more of recent usage.
- 1Type /usage today and look at where your tokens went.
- 2Do the four things in this guide.
- 3A week from now, type /usage again.
On a monthly plan, a lower number means more room before your limit. On an API key, a lower number means a lower bill. That is how you know it worked.
Use the one-page checklist
- New job? Type /clear. Name the old chat first with /rename if you want it back.
- Chat almost full, mid-job? Use /compact with what to keep. Job done? /clear instead.
- Claude took a wrong turn? /rewind.
- Job not done but chat heavy? Write a handoff doc, /clear, then read the doc.
- Pick your model before you start. Do not switch mid-job. Change /effort instead.
- Take breaks between jobs. On the API, the cache lasts five minutes.
- CLAUDE.md: aim for under 200 lines. Use it like an index.
- Turn repeat jobs into skills. Let a script do the math.
- Run /mcp, /context and /doctor now and then.
- Trim long test output with a hook.
- Sonnet for the build. Low effort for easy jobs. Plan mode before big changes.
- Point Claude at the file or place. Do not say fix the bug.
- /usage today. /usage in a week.
Avoid these common mistakes
- Typing /compact because the chat feels slow, when the job is already done. Use /clear.
- Switching to a cheaper model in the middle of a long chat. It re-reads everything at full price.
- Leaving a long chat idle over lunch, then asking a tiny question.
- Keeping a 600-line CLAUDE.md that loads on every chat.
- Leaving every connector and skill on when you use two of them.
- Typing a long, careful prompt but not naming the file or place. The words you type are a tiny part of what Claude reads.
- Adding an add-on before you try the habits above.
👉 https://www.skool.com/claudecodeclub
Common questions
Does /compact save tokens in Claude Code?
Not by itself. To write the summary, Claude has to read your whole chat one more time. If the cache is fresh, that read is cheap. If it expired, you pay full price. Use /compact to make room, and use /clear when a job is done.
How long does the Claude Code cache last?
About an hour on a monthly plan, and five minutes on the API or when you use extra credits you bought. Each message that hits the cache resets the timer. Switching models starts a new cache.
Does switching models with /model cost more?
Yes, once. Each model has its own cache, so the next message reads your whole chat with no cache hits. Pick your model before the job starts.
How long should my CLAUDE.md be?
Anthropic's docs say to aim for under 200 lines. It is a target, not a hard limit. Keep only your highest-level rules in it and point to separate files for the rest.
How do I know if these changes saved me tokens?
Type /usage today, do the four things, and type /usage again in a week. On a monthly plan, a lower number means more room before your limit. On an API key, it means a lower bill.
Keep going
Get the free token-cost guide
Get the other 5 in the cost-cutting stack, plus 8,000+ members - $9/mo, cancel anytime.
Join the Club