$0.70
to find one file.
Every AI file search is a token bill. 71 tool calls. 25,000 input tokens. The agent re-reads its own history on every turn. An index collapses all of it to one call.
Without index
per developer per year · just the file-search portion
With index
same developer · same workload · 1,500x cheaper
The ledger without an index
Seven to twenty-eight dollars a day, just on search-and-locate.
| Line item | Value | Impact |
|---|---|---|
| Tool calls per lookup (median) | ~71 | Each call re-reads the full context |
| Input tokens per lookup (est.) | 12,000 - 25,000 | Balloons with every tool result |
| Output tokens per lookup (est.) | 2,000 - 4,000 | Agent reasoning and next-step logic |
| Cost per lookup (Opus 4.6) | $0.35 - $0.70 | At $15/$75 per MTok pricing |
| Lookups per active workday | 20 - 40 | Conservative for agent-heavy workflows |
| Daily search-tax floor | $7 - $28 | Per developer, per day, burned on navigation |
| Annual search-tax (220 workdays) | $1,540 - $6,160 | Not features. Not reasoning. Just finding files. |
These numbers assume Claude Opus 4.6 pricing and typical tool-heavy sessions. The ranges reflect the variance between "I know which folder it's in" and "I need to hunt through the whole repo tree."
Where the tokens go
A tool call isn't free. It's a full round trip.
When Claude Code runs a shell command, the command's output is appended to the conversation. A find / -name "iron*" that returns four thousand candidate paths adds four thousand lines of text to the context. The very next tool call has to re-read all of them. So does the call after that. And the call after that.
Seventy tool calls per lookup is not a hypothetical. It's the median we measured. By tool call forty or fifty, the model is spending more of its token budget re-reading its own history than looking at the file it's hunting.
Context growth
Token cost compounds on every tool call
Median tool calls
Per file lookup on real hunt tasks
Peak input tokens
Because history replays on every turn
cheaper per lookup with an index. $0.0004 vs $0.70.
The ledger with an index
$2 a year instead of $6,160.
One call, one answer, move on. No loops, no scope-down logic, no compounding context.
| Line item | Value |
|---|---|
| Tool calls per lookup | 1 |
| Tokens per lookup | ~200 |
| Cost per lookup | $0.0004 |
| Annual cost (220 workdays) | $2 - $4 per developer |
Cost delta
cheaper with an index
Daily spend
vs $7-$28
Annual spend
vs $1,540-$6,160
Per lookup
vs $0.35-$0.70
Why it compounds
The agent's token budget fills up with its own search history.
Every tool result lives in the context for the rest of the session. A find that returns 4,000 candidate paths adds 4,000 lines. The next call re-reads all of them. By the 40th tool call, the agent is spending more tokens re-reading search history than actually examining files.
Per-session economics
Walking the filesystem
71 tool calls per lookup
Context grows O(n^2) per turn
Indexed lookup
1 tool call per lookup
~200 tokens, no context growth
The index doesn't just make search faster. It preserves the context window for actual work. Without it, the agent fills its own memory with search junk before it even starts reasoning.
$30K to $120K/year for a 20-person team. Not on features. On finding files.
An index eliminates this category entirely.Scale
Multiply by your team size and it gets worse.
| Team size | Daily (no index) | Annual (no index) | Annual (with index) | Savings |
|---|---|---|---|---|
| 1 engineer | $7-$28 | $1,540-$6,160 | $2-$4 | ~$6,156 |
| 5 engineers | $35-$140 | $7,700-$30,800 | $10-$20 | ~$30,780 |
| 20 engineers | $140-$560 | $30,800-$123,200 | $40-$80 | ~$123,120 |
| 50 engineers | $350-$1,400 | $77,000-$308,000 | $100-$200 | ~$307,800 |
| 100 engineers | $700-$2,800 | $154,000-$616,000 | $200-$400 | ~$615,600 |
A mid-sized startup with twenty engineers running Opus-backed agents all day is spending $140 to $560 a day on this one operation. Not features. Not reasoning. Just hunting for files.
The bigger number
You're already paying for file search.
For a company that can't raise prices to cover the waste, the math is ugly. For a company that can, it still feels wrong: you're paying the world's most expensive search engine to do the world's most elementary task.
An index eliminates this category of spending. Not reduces: eliminates. A file lookup that goes through an index is so cheap that if you tried to bill it back to the developer, you'd lose money on the bookkeeping.
If you're paying for agents, you're already paying for file search. You're just paying for the wrong kind.