GenovaFlow GenovaFlow Services Blog Get my price in one call Get my price
Claude Code

11 Fixes That Cut Our Claude Code Token Usage by 70 Percent

Eleven changes took our session from 100 percent used to 20

Eleven changes cut our Claude Code usage by about 70 percent: two free installs, rtk and caveman, and nine habits that are already built into Claude Code. In our video on it, the usage screen goes from 100 percent used with 3 hours 30 minutes left before the reset to 20 percent used with 30 minutes left.

Claude Code usage screen before and after: 100 percent used with 3 hours 30 minutes to the reset, then 20 percent used with 30 minutes to go
Before: 100 percent used with 3 hr 30 min left. After: 20 percent used with 30 min left. Frames from the video.

We assumed the model was the expensive part. Mostly it was not. What filled the window was noise: command output nobody needed to read, a CLAUDE.md file that rides along in every request, and long chats that get sent again in full on every turn. Anthropic says the same thing in plainer words on its cost management page: token costs scale with context size, so the more context Claude processes, the more tokens you use.

Below are all eleven, in the order we would do them, each with the exact command and the reason it saves tokens. We checked every one against Anthropic's current Claude Code docs while writing this, and where the docs have moved on since we recorded, we say so.

If your team is burning Claude Code limits every week, we can look at where the tokens go with you. Book a call with GenovaFlow AI

Run /context before you change anything

The first habit is measuring. /context draws your current context window as a grid and breaks it down by category: system prompt, system tools, custom agents, skills, messages and free space. Anthropic's command reference adds that it also suggests optimisations for heavy tools and memory bloat, which is exactly the point of running it first.

Claude Code
/context
Output of /context in Claude Code: usage by category, with system tools at 13.3k tokens, skills 10k, messages 20.7k and 419.2k tokens free
/context breaks the window down by category. This is the run from the video.

On the run in the video the window held 47k of 500k tokens, about 9 percent. System tools took 13.3k, our 91 skills took 10k and the conversation itself 20.7k. The expensive thing is rarely the one you would guess, so two minutes here tells you which of the changes below is worth your time on your setup.

If you are on a Pro, Max, Team or Enterprise plan, /usage is the other half of the picture. Per the costs page, it shows plan usage bars plus a breakdown that attributes recent usage to skills, subagents, plugins and individual MCP servers, with recommendations for anything behind at least 10 percent of it.

Install rtk so command output arrives clean

rtk sits between Claude Code and your terminal. Its README describes it in one line: it "filters and compresses command outputs before they reach your LLM context." A git status or a test run normally lands in the window in full, and then gets sent again with every later turn, because Claude Code sends the full context again on each message.

bash
brew install rtk        # macOS / Linux
rtk init -g             # hook it into Claude Code
# restart Claude Code, then:
git status              # now rewritten to rtk git status
rtk gain                # the savings dashboard

The install and hook commands above are the ones in the rtk README today, which also lists winget install rtk-ai.rtk for Windows and a curl install script. Run rtk gain afterwards to confirm you got the right package, because the README warns that another project called rtk exists on crates.io.

The rtk README on GitHub showing its token savings table for a 30 minute Claude Code session: ls and tree drop from 2,000 tokens to 400, an 80 percent saving
rtk's savings table as the README showed it when we recorded. The ls / tree row is the 2,000 to 400 example.

In the video we point at the README's savings table from that time: an ls or tree that cost 2,000 tokens came back as 400 through rtk, about 80 percent less. On its own rtk can save 60 to 90 percent of your token usage, and how much depends on your use case, because noisy commands save the most and not every command is noisy. It removes noise rather than signal, so the answer Claude gives does not get worse.

Two honest limits from the current README. The hook only fires on Bash tool calls, so Claude Code's built in Read, Grep and Glob tools do not pass through it. And rtk estimates tokens as bytes divided by four, so its percentages are reliable while its absolute counts are approximate. The README today promises output "up to 90% smaller" on its front page.

Install caveman so replies stop being walls of text

caveman does the same job from the other side. Instead of shrinking what goes into the window, it makes Claude Code answer with only the important parts. The README sums it up as "say less and read less. Code stay exact", and its voice rules keep code, commands, paths and error messages untouched, character for character.

bash
claude plugin marketplace add JuliusBrussee/caveman && claude plugin install caveman@caveman
The caveman benchmarks table: the first task goes from 1180 output tokens to 159, saved 87 percent, while other tasks save between 22 and 84 percent
caveman's benchmark table as it read when we recorded: 87 percent on the first task, 41 and 30 percent on others.

This one deserves an honest number rather than the best one. In the table we show in the video, one task went from 1180 output tokens without caveman to 159 with it, around 87 percent. Other tasks only saved 41 or 30 percent. It helps, and how much it helps depends on what you ask for.

The caveman README has been rewritten since we recorded and now reports different benchmarks, including a JetBrains test it quotes as finding no measurable quality loss. Treat our 87 percent as one task on one day, not a promise.

Compact at 60 percent and hand off long sessions

The next two habits deal with the conversation itself, which is the part of the window that grows every turn.

Run /compact yourself at a clean stop

/compact summarises the conversation so far and keeps going with the summary, and you can tell it what to keep. We run it ourselves at about 60 percent, at a point where a task is finished. Left alone, Claude Code compacts on its own when the conversation reaches the model's context limit (or at about 967K tokens on the 1M models, per the model configuration docs), which tends to happen in the middle of a task, after quality has already started to slide.

Claude Code
/compact Focus on code samples and API usage
Bar chart from the video: context at 60 percent before /compact and 13 percent after, a 47 percent drop
One manual /compact took the window from 60 percent to 13.

In the video one compact took the window from 60 percent to 13. Anthropic's prompt caching page gives the same advice: run /compact at a natural break between tasks instead of waiting for auto compaction to trigger mid task. It also notes that the summary is a separate request that reads the history being summarised, so a smaller history makes a cheaper summary.

Hand a long session over to a fresh one

Every message you send makes Claude Code read the whole chat again. The costs page puts it bluntly: a one line question in a session that has been open all day still draws usage for the whole conversation. So when a session gets long, we ask Claude to write a handoff prompt, start fresh, and paste it in.

prompt
Write a handoff prompt for a fresh session: the decisions we made,
the current state of the code, and the next steps.

/clear

(paste the handoff prompt)

You keep the context that matters and drop the weight. /clear starts a new conversation with an empty window, and the costs page notes that when you want a fresh start instead of continuity, /clear costs nothing.

Stay on one model and keep what loads every turn small

Four habits make the context that rides along in every request cheaper or smaller.

Pick one model at the start and stay on it

Reused context is cached, and a cache read costs a fraction of normal input: 0.1 times the base input price on most models and 0.05 times on Opus 5.5 and Sonnet 5.5, according to Anthropic's prompt caching pricing. Each model has its own cache, though, so switching with /model in the middle of a session means the next request reads the entire conversation with no cache hits. Choose with /model before you start working.

Keep CLAUDE.md under 200 lines

CLAUDE.md loads at the start of every session and stays in the context that every request carries, so each line is a cost you pay again and again. Anthropic's memory docs set the same target: under 200 lines per file, because longer files consume more context and reduce adherence. Move instructions for one workflow into a skill, which loads only when it is used.

Feed it markdown, not PDF

Large noisy files like PDFs cost far more than the same content as plain markdown, so we convert documents before handing them to Claude Code. It is the eighth change in the video, and the cheapest one to adopt: one conversion, then every later read is lighter.

Disconnect the MCP servers you never use

When we recorded, we said every connected MCP server injects its tool definitions into every message. That is no longer the default. Anthropic's costs page now says MCP tool definitions are deferred, so only tool names and server instructions enter context until Claude uses a tool. You can see it in our own /context above: 317 MCP tools, loaded on demand, 0 tokens.

Disconnecting dead servers still pays. Their names and instructions still load, and where tool search is off or unavailable, the prompt caching page notes that tool definitions load up front again. Open /mcp to see what is connected and switch off what you do not use; the MCP docs confirm a server toggled off keeps its configuration for later.

Claude Code
/mcp
/mcp disable <server>

Plan before it writes, then let Sonnet build

The last two habits stop tokens being spent on the wrong attempt, and stop Opus prices being paid for every line of code.

Start with /plan

/plan enters plan mode straight from the prompt, and you can pass the task with it. Claude explores and proposes an approach, and you accept it or ask for changes before any code is written. Anthropic's costs page lists plan mode as a way to prevent expensive rework when the first direction is wrong, which in our sessions meant fewer of the wrong tries Claude Code makes in auto mode.

Claude Code
/plan fix the auth bug

Set /model opusplan

opusplan uses Opus while you are in plan mode and switches to Sonnet for execution, per the model configuration docs. Once the plan is mapped, the gap between the two models on the writing itself is small, so you stop paying Opus prices for every line. In the video Claude Code confirms the setting and saves it as the default for new sessions.

Claude Code
/model opusplan

One trade off is worth knowing. The prompt caching docs point out that with opusplan, each plan mode toggle is a model switch and starts a fresh cache. You pay one rebuild each time you go from planning to building, in exchange for Sonnet prices on the code. For how the two models differ in general, see how large language models differ.

Where to start: /context today, rtk next

If you only do one thing today, run /context. If you do two, install rtk. Everything else can wait for your next session, because none of it needs anything new, and stacked together they are what took our usage screen from 100 percent used to 20 in the video.

The CLAUDE.md file with all of this already set up is waiting in our free community: get the CLAUDE.md file. More posts like this one are in the Claude Code section of the blog.

If your team runs Claude Code across many seats and hits its limits every week, the same checks apply at team scale: the shared CLAUDE.md files, the MCP servers everyone has connected, and which agents run on which model. That is the kind of work we do in our custom AI agents service.

Questions people ask

How do you check your Claude Code token usage?

Run /usage for session cost, plan usage limits and activity stats. On Pro, Max, Team and Enterprise plans it also attributes recent usage to skills, subagents, plugins and MCP servers and suggests fixes. Run /context to see what is filling the current context window by category. Both are described in Anthropic's Claude Code costs guide.

What is the difference between /compact and /clear in Claude Code?

/compact summarises the conversation so far and continues with the summary, so you keep continuity while freeing space; you can pass instructions about what to keep. /clear starts a new conversation with an empty context. Anthropic notes that /compact is itself a request that reads the history it summarises, while /clear costs nothing. See the command reference.

When does Claude Code compact automatically?

By default Claude Code compacts when the conversation reaches the model's context limit. Models with a native 1M window compact a little earlier, at about 967K tokens. You can set your own threshold with a command such as /autocompact 500k, as described in the model configuration docs. We prefer to run /compact ourselves at around 60 percent, at a clean stop between tasks.

How do you use opusplan in Claude Code?

Type /model opusplan in a session, or start Claude Code with claude --model opusplan. It uses Opus while you are in plan mode and switches to Sonnet for execution. Each switch between plan mode and execution is a model switch, so it starts a fresh prompt cache. Details are in Anthropic's model configuration docs.

Does caveman reduce Claude Code token usage?

Yes, on output. caveman makes Claude Code answer with only the important parts while leaving code, commands and paths exact. In our test one task dropped from 1180 output tokens to 159, about 87 percent, but other tasks saved only 41 or 30 percent, so the saving depends on what you ask. Install it from the caveman repository.

Sources

  1. Stop Claude Code From Eating Your Tokens | 11 Fixes (YouTube)
  2. rtk on GitHub
  3. caveman, Julius Brussee on GitHub
  4. Manage costs effectively, Claude Code docs, Anthropic
  5. Commands, Claude Code docs, Anthropic
  6. How Claude Code uses prompt caching, Claude Code docs, Anthropic
  7. Model configuration, Claude Code docs, Anthropic
  8. How Claude remembers your project, Claude Code docs, Anthropic
  9. Connect Claude Code to tools via MCP, Claude Code docs, Anthropic
  10. Prompt caching pricing, Claude API docs, Anthropic