[Bug] Read tool consuming excessive tokens with line number prefixes

Resolved 💬 2 comments Opened Jan 14, 2026 by mrmercan Closed Feb 27, 2026

Bug Description
My claude code is burning 2x or 3x tokens than its normal. Check this:

File stats:

  • 315 lines
  • 1,579 words
  • 13,098 characters

Token estimate:

Using the ~4 characters per token rule: 13,098 ÷ 4 ≈ 3,275 tokens

But the Read tool adds line number prefixes (like 1→, 2→, etc.) to each line. That's roughly 7-8 characters × 315 lines = ~2,500 extra characters = ~625 more tokens.

So estimated: ~3,900 tokens for the file content.

But context jumped by 8k tokens (from 30k to 38k).

The extra ~4k came from:

  • Your message (~20 tokens)
  • My response (~150 tokens)
  • The tool call itself (metadata, function name, parameters)
  • The /context output you pasted (~300 tokens)

Still doesn't add up to 4k extra. Either:

  1. The 4 chars/token ratio is wrong for this content (code/markdown may tokenize less efficiently)
  2. There's overhead I'm not accounting for

I don't have a clear answer for the full 8k.

I just wanted it to read a file. and it burned 8K token for this. Can you imagine this? Please solve this. This is really annoying.

Environment Info

  • Platform: darwin
  • Terminal: iTerm.app
  • Version: 2.1.7
  • Feedback ID: f9ef696a-8574-4ab1-ace7-6eac0ca81581

Errors

[]

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗