Someone in the vibe coding community asked a great question: “Every time I start a new session and Claude needs to reread my codebase to implement a feature, I burn so many tokens. How do I be more efficient?”
If you’re using Claude Code seriously, you’ve probably felt this pain. Token costs add up. Long sessions get expensive. And repeating context over and over feels wasteful.
Here’s how to fix it.
Understanding the Token Problem
Every time Claude reads your code, it uses tokens. Every response uses tokens. The bigger your codebase, the more tokens each session costs.
The issue compounds when you:
- Start new sessions frequently (Claude forgets everything)
- Have Claude read your entire codebase for small changes
- Ask the same questions repeatedly
- Don’t provide enough context upfront (causing back-and-forth)
The goal is giving Claude exactly the context it needs - no more, no less.
The CLAUDE.md Strategy
This is the biggest token saver. Create a file called CLAUDE.md in your project root.
In this file, put:
- What your project does (2-3 sentences)
- Tech stack and key dependencies
- File structure overview
- Coding conventions you follow
- Common patterns Claude should use
- Things Claude should avoid
Claude reads this file automatically at the start of each session. Instead of discovering your project through trial and error (expensive), it starts with understanding (cheap).
A good CLAUDE.md might save 30-50% of tokens on a typical session.
Selective Context Loading
Don’t feed Claude your entire codebase for every task.
Bad approach: “Read all my files and then add a new button to the homepage.”
Good approach: “Here’s my homepage component (paste it). Add a button that does X.”
Be surgical. Identify which files are actually relevant to the task. Only share those.
For larger projects, maintain a mental map of what lives where. When asking for changes, point Claude directly to the relevant files.
Summarize Instead of Paste
Sometimes context is better than code.
Instead of pasting a 500-line file, describe it: “I have a UserAuth component that handles login via Google OAuth. It stores the session in a context called AuthContext and exposes useAuth() hook for other components.”
This uses maybe 50 tokens instead of 2,000. Claude understands the interface without needing every line.
Use summaries for:
- Files Claude won’t modify
- External libraries and their usage
- Historical context about decisions
Batch Related Changes
Making 10 small requests uses more tokens than making 2 larger requests.
Instead of:
- “Add a header”
- “Make the header sticky”
- “Add navigation links to the header”
- “Style the navigation links”
Try:
- “Add a sticky header with navigation links to Home, About, and Contact. Style it with a dark background and white text.”
One detailed request beats many small ones for token efficiency.
Use the Right Model
Opus 4.5 is powerful but expensive. Sonnet 4.5 is faster and cheaper.
Use Sonnet for:
- Simple changes and fixes
- Refactoring existing code
- Generating boilerplate
- Questions about your code
Use Opus for:
- Complex features requiring creativity
- Debugging tricky issues
- Architectural decisions
- Code that needs to be really good first try
Switching models based on task can cut costs significantly.
Session Management
When to start fresh vs continue:
Continue the session when:
- Working on related features
- Context from earlier work is still relevant
- You’re iterating on recent changes
Start fresh when:
- Switching to unrelated work
- The conversation has gotten cluttered
- You’re getting weird outputs (context pollution)
Longer sessions aren’t always better. Sometimes a clean start with targeted context beats a long, messy conversation.
Template Your Common Tasks
If you frequently ask Claude for similar things, create templates.
Example template for adding a new page:
“Create a new page at /[route]. It should:
- Use our standard layout (see Layout.tsx)
- Include [specific elements]
- Follow our existing page patterns (see Home.tsx for reference)
- Add to navigation in Header.tsx”
Paste the template, fill in the blanks. Consistent, efficient, fewer tokens wasted on explanations.
The 80/20 of Token Savings
If you only do three things:
- Use CLAUDE.md - Biggest single improvement
- Share only relevant files - Don’t dump everything
- Batch related requests - Fewer, more detailed prompts
These three practices alone can reduce token usage by 40-60%.
Master Claude Code
Get the complete guide to efficient vibe coding, including advanced optimization techniques.
Get the Course →Think Long-Term
Token optimization isn’t just about saving money today. It’s about building habits that scale.
When your project grows from 10 files to 100, good practices become essential. Start optimizing now while your project is small. The habits will serve you later.
The best vibe coders aren’t the ones who use the most tokens. They’re the ones who get the most done per token spent.
