Back to articles
Update: my Claude Code token optimizer now blocks redundant reads. Here's the data from 107 sessions.

Update: my Claude Code token optimizer now blocks redundant reads. Here's the data from 107 sessions.

via Dev.toEgor Fedorov

Two weeks ago I posted I tracked where my Claude Code tokens actually go. 37% were wasted. — a plugin that tracks where your tokens go and shows you the waste. 34 reactions. Great feedback. But one comment stuck with me: "The real unlock for me was getting a live counter visible all session instead of only doing post-mortems, because it changes behavior in the moment before waste happens." — @henrygodnick He was right. Tracking is nice. Preventing is better. So I built v3.1 — and the plugin now actively blocks wasted reads instead of just reporting them. The big one: Smart Read Cache The #1 waste pattern I found in 107 sessions: Claude re-reads the same file multiple times. page.tsx — read 189 times across my sessions. 60 of those were pure duplicates. That's 130K tokens burned on a file Claude already had. So I added a PreToolUse hook that intercepts every Read call: // First read? Always allow. if ( ! entry ) return allow (); // File changed on disk? Allow. if ( currentMtime !== entr

Continue reading on Dev.to

Opens in a new tab

Read Full Article
5 views

Related Articles