How to Reduce Claude Code Token Usage: 7 Proven Strategies
Problem
I was using Claude Code to remove a currency symbol from a few files. Simple task, right? But when I checked my usage afterward, I saw this:
Task: Remove $ symbol from 3 filesUsage: 9% of Max $100 sessionNine percent of a Max session for removing currency symbols? That felt wrong. I was burning through my session limit way too fast for trivial work.
I started investigating why Claude Code was consuming so many tokens, and I found several strategies that actually work.
What I discovered
I checked a Reddit thread about Claude Code limits, and users were reporting similar issues:
"9% of a Max $100 session used for a simple currency symbol removal task""My session ran out after just a few file edits""The displayed usage doesn't match what I expected"One user shared advice they got from Claude itself about minimizing token usage:
"Minimize tool calls. Don't re-read files you've already read this session.Don't read files for context unless I explicitly ask.Work from what's already in the conversation.Batch all changes into as few operations as possible."This helped users “claw back a significant portion of the overusage.”
So I tested these strategies myself.
Strategy 1: Constrain context gathering in CLAUDE.md
Claude Code’s default behavior is to aggressively gather context. It reads files, searches for patterns, and explores the codebase even when you don’t ask it to.
I added explicit rules to my CLAUDE.md file:
## Context Rules- Minimize tool calls- Never re-read files already in this session- Only read files when explicitly asked- Work from existing conversation context- Batch all changes into minimal operationsThis single change made Claude Code much more conservative about reading files. Instead of exploring the entire codebase for context, it now asks me when it needs more information.
Strategy 2: Enable LSP plugins
Another user mentioned this tip:
"For programming, you should absolutely use the LSP plugins for the languagesof your project. This saves a lot of tokens and makes everything much faster."LSP (Language Server Protocol) provides intelligent code navigation without needing to read entire files:
- Go to definition without full file reads- Find references efficiently- Autocomplete and IntelliSense- Type information on hoverThis means Claude Code can understand your code structure without reading every file. I enabled LSP for my main languages:
{ "lsp": { "enabled": true, "languages": ["typescript", "python", "go"] }}Strategy 3: Batch operations
I used to make many small edits in sequence. That’s inefficient because each edit triggers context processing.
1. Read file A2. Edit line 13. Edit line 54. Edit line 10Result: Multiple context processes, more tokens usedNow I batch everything:
1. Read file A once2. Apply all edits in a single operationResult: One context process, fewer tokensStrategy 4: Use the rtk tool
A user recommended the rtk tool for token reduction:
"I suggest you to install rtk to reduce token usage.I am trying and results are good"rtk is available at https://github.com/rtk-ai/rtk. It helps optimize your prompts and reduce unnecessary context.
Strategy 5: Write tighter prompts
I realized my prompts were often too open-ended:
"Can you look at the users API and add email validation?Check the patterns we use elsewhere in the codebase andmake sure it's consistent."This triggers Claude Code to explore the entire codebase for patterns. Now I use focused prompts:
"Edit src/api/users.ts to add email validation.Use the existing patterns in that file.Don't read any additional files."The difference is clear:
- First prompt: Claude reads multiple files, searches for patterns
- Second prompt: Claude reads one file, makes the change
Strategy 6: Session management
I learned to manage my sessions better:
- Use /compact to reduce context bloat periodically- Start fresh sessions for unrelated tasks- Monitor actual usage vs displayed usage- Don't keep conversations running foreverThe /compact command is particularly useful for long sessions. It summarizes the conversation history, reducing the context window size.
Strategy 7: Optimize your CLAUDE.md structure
I restructured my CLAUDE.md to be cleaner:
# Project Instructions
## Context Gathering Rules- Minimize tool calls aggressively- Never re-read files already in context- Only fetch additional context when explicitly asked- Work from existing conversation knowledge- Batch all file changes into single operations
## Code Style- [Brief, focused style preferences]
## Project Structure- [Minimal structure notes - not the entire codebase map]The key is keeping it focused. A bloated CLAUDE.md with too many instructions can actually increase token usage because Claude processes it on every message.
Results
After applying these strategies, my token usage dropped significantly:
Before:- Simple file edit: 9% of session- Multiple file changes: 15-20% of session- Long coding session: Ran out of tokens quickly
After:- Simple file edit: 3-4% of session- Multiple file changes: 6-8% of session- Long coding session: Much more usable timeThat’s roughly a 50-60% reduction in token usage.
Summary
Claude Code consumes tokens quickly because it aggressively gathers context by default. The key strategies to reduce usage are:
- Add explicit constraints to CLAUDE.md - Tell Claude to minimize context gathering
- Enable LSP plugins - Let the language server provide code intelligence
- Batch operations - Combine multiple edits into single operations
- Use rtk tool - External tool for prompt optimization
- Write focused prompts - Avoid open-ended “explore the codebase” requests
- Manage sessions - Use
/compactand start fresh when appropriate - Optimize CLAUDE.md - Keep it focused, not bloated
The most impactful change for me was adding context constraints to CLAUDE.md. That single change made Claude Code much more efficient without sacrificing usefulness.
Final Words + More Resources
My intention with this article was to help others share my knowledge and experience. If you want to contact me, you can contact by email: Email me
Here are also the most important links from this article along with some further resources that will help you in this scope:
Oh, and if you found these resources useful, don’t forget to support me by starring the repo on GitHub!
Comments