Claude Code Burned All My Tokens in 30 Minutes - Why Narrow Scoping Fixes This
Claude Code Burned All My Tokens in 30 Minutes - Why Narrow Scoping Fixes This
Everyone who runs parallel Claude Code agents hits this wall eventually. You spin up five agents on your codebase, each one starts exploring the project structure, reading files, understanding dependencies - and 30 minutes later your daily token allocation is gone. The fix is narrow scoping.
Why Tokens Burn So Fast
When you give an agent a broad task like "improve the authentication system," here is what happens:
- It reads the entire auth module (5-10 files, thousands of tokens)
- It reads related models, middleware, and configuration
- It reads test files to understand expected behavior
- It reads documentation and comments
- It explores the database schema
- It checks how auth is used across the application
That is easily 100K tokens of input before any work begins. Multiply by five parallel agents, each doing their own exploration, and you are burning 500K tokens on context loading alone.
The Narrow Scoping Fix
The key is giving each agent a very specific scope:
- Bad: "Improve the authentication system"
- Good: "In
src/auth/token.ts, add a refresh token rotation mechanism. The new function should follow the pattern insrc/auth/access-token.ts. Write tests insrc/auth/__tests__/token.test.ts."
The second prompt tells the agent exactly which files to read and what pattern to follow. It does not need to explore the codebase. It reads three files and starts working.
Five Agents, Five Scopes
Running five agents daily on your codebase works when each one gets a narrow, non-overlapping scope:
- Agent 1: refactor the user profile API endpoint
- Agent 2: add input validation to the settings form
- Agent 3: write unit tests for the billing module
- Agent 4: update the error handling in the webhook processor
- Agent 5: migrate the config file from JSON to YAML
Each agent touches different files. Each agent knows exactly what to read. No exploration waste.
The CLAUDE.md Connection
Your CLAUDE.md file should include file ownership boundaries. When agents know which directories and files belong to their scope, they stop reading everything and start reading only what matters. This turns five token-burning explorers into five focused workers.
The difference between 30-minute burnout and all-day productivity is one thing: scope discipline.
Fazm is an open source macOS AI agent. Open source on GitHub.