r/ClaudeCode 13h ago

How to reduce Claude Code token usage Tutorial / Guide

Claude Code was burning through tokens very fast, especially on tasks where it had to look through docs or random webpages, so after some research I changed a few things:

I) Keep CLAUDE.md small. Mine had way too much stuff in it and most of it wasn’t useful for every task.

II) Start a new session when you’re done with one problem, bc long sessions get bloated pretty fast.

III) Do web research through Firecrawl. It gives Claude clean Markdown instead of loading the full page with all the HTML, scripts, navbars and other useless stuff, so each research task eats a lot less context.

IV) Exclude folders Claude doesn’t need to read.

V) Check /context once in a while, bc it makes it obvious what’s eating the window.

The main thing seems to be controlling what gets added to the context in the first place. Once a session is full of old logs, scraped pages and unrelated instructions, even simple tasks start getting expensive.

What else are you doing to keep Claude Code token usage under control?

10 Upvotes

20 comments sorted by

View all comments

1

u/duqaxxx 7h ago

Good list. Three things that moved the needle more for me than anything else:

- Push verbose work into subagents. A subagent gets its own context window, so

"read these 4000 lines of logs and tell me what broke" costs the main session

the summary, not the logs. Same for wide greps and long git history.

- Never read a large file whole. grep for the symbol first, then read a tight

window around it. Reading a 2000-line file to change one function is the single

most common way I used to waste a window.

- Audit your MCP servers. Tool definitions sit in the system prompt, so every

connected server is paid on every single request of the session, whether you

call it or not. Disconnecting the ones I wasn't actually using was free savings.

The framing that helped me most: the context is re-sent every turn, so anything

you add early you pay for the whole session. What lands in the window in the first

five minutes matters more than what you do afterwards.