[Bug] Excessive token usage and over-researching file context

Status Fixed / completed
Reported on v2.1.83
Maintainer reply None cached
Activity 6 comments · opened Mar 25, 2026 · closed Mar 30, 2026

Bug Description
Token usage suddenly spiked really high. and it seems like claude is researching way more info about the files. etc. PLEASE revert back, it is unusable now.

Environment Info

  • Platform: darwin
  • Terminal: Apple_Terminal
  • Version: 2.1.83
  • Feedback ID: 78a60250-aead-4fc1-a80c-db854c9450b7

Errors

[]

View original on GitHub ↗

6 Comments

nikhilsangvikar · 5 months ago

Having same issue with Claude Code VS Code Extension 2.1.81
Makes my plan unusable. Current session 5h window usage jumped to 25% without even starting a single conversation. This is happening consistently for a past day or so.

WinterCabbage · 5 months ago

A "/compact" command with Opus used 25% of Pro plan 5h window usage, is it normal?

cseickel · 5 months ago

I have never in my life hit a 5 hour limit before. Now I am hitting it constantly. Today I worked for an hour and hit the limit, and I only had one session that I interacted with sporadically. It has also been getting lost in what may be thinking for very long periods that never end until I hit escape. Maybe that is where the tokens are going.

yurukusa · 5 months ago

Hook workaround: read-budget-guard
A PreToolUse hook on Read that tracks unique file reads per session and blocks after a configurable budget:

{
  "hooks": {
    "PreToolUse": [{
      "matcher": "Read",
      "hooks": [{
        "type": "command",
        "command": "~/.claude/hooks/read-budget-guard.sh"
      }]
    }]
  }
}
INPUT=$(cat)
FILE=$(echo "$INPUT" | jq -r '.tool_input.file_path // empty' 2>/dev/null)
[ -z "$FILE" ] && exit 0
BUDGET=${CC_READ_BUDGET:-100}
TRACKER="/tmp/cc-read-budget-$$"
[ -f "$TRACKER" ] || touch "$TRACKER"
if grep -qxF "$FILE" "$TRACKER" 2>/dev/null; then
    echo "⚠ Duplicate read: $(basename "$FILE") already read this session" >&2
fi
echo "$FILE" >> "$TRACKER"
COUNT=$(wc -l < "$TRACKER")
if [ "$COUNT" -gt "$BUDGET" ]; then
    echo "BLOCKED: Read budget exceeded ($COUNT/$BUDGET files)" >&2
    echo "Start working with what you have." >&2
    exit 2
fi
exit 0

Set CC_READ_BUDGET=50 to be more aggressive, or CC_READ_BUDGET=200 for larger projects. The duplicate-read warning alone catches the most common case — Claude re-reading files it already has in context.

aspala · 5 months ago

upgrading to newest version seems to have fixed it (2.1.87).
downgrading to 2.0.64 also fixed it.

thank you @yurukusa for your workaround! <3

github-actions[bot] · 4 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.