Tokendoctor – See what your Claude Code use overpays

rsaryev1997 34 points 18 comments November 17, 2026
github.com · View on Hacker News

Discussion Highlights (10 comments)

renegat0x0

I have a list of ai related tools. There is so many of them For example limiting token usage i think can also be achieved by 'caveman' project. It achieves it differently but the goal is same i suppose Overall Ai tools I found: https://github.com/rumca-js/awesome-database-top/blob/main/l...

relyks

I use this and it works well: https://github.com/rtk-ai/rtk I'm trying to figure out if I can use multiple of these tools together without conflicts

mkagenius

> https://github.com/localixai/tokendoctor/tree/main/bench Don't we need to run it on all of the benches those models publish? This doesn't look very comprehensive. Moreover half of the times factory claude code is better than 'advised' one. Although I don't discourage such experiments, I feel this one is way complicated for very little or no gain provably.

ralph84

These tricks last at most one model dot release.

pinkyclouds

why not having a tiny fast model summarize tool output instead, maybe with a threshold or something.

urig

Please don't let AI write your README.md. It's illegible to humans.

Incipient

All of these token optimiser things...i rarely see any performance analysis. If you're cutting token usage in half, what does that do to the accuracy of the outcome? If you're automatically delegating to cheaper models, what does that do to the outcome? Personally I've found a HUGE improvement in quality using more context, to the point that it's 'better value' - fewer outcomes I disagree with or have to fix/rework. I've mostly done this through mechanical documentation links that are enforced and can be 'followed' with some python files that the agents use. Context is higher than just reading code, but it has been a HUGE benefit (as far as I can tell).

pseudosaid

Just use billion context. I customize it to set a slider so I decide how big the context window can ever grow, and it uses models to fold itself in on itself and summarize itself while retaining the entire chat history. I've managed to run chats over three thousand messages long without any negative effect. And overall, I average a seventy-four percent reduction in token usage.

notenchange

So, TL;DR: the claimed 38% decrease was because the user figured out that using too close to the limit context (1M) was costing him about 30K per request. So, the tool didn’t actually implement any savings, it was just a look into what happened in the past. Sincerely, you shouldn’t be using near 1M anyway. I usually issue a manual compact between 256K and 500K

peter_d_sherman

>" Your past sessions decide, not anyone's benchmark. What a setting saves depends on how you work: how long your sessions run, which models you use, what the work is. A number from someone else's sessions, mine included, says little about yours. So tokendoctor starts by looking back at your own." This is a great idea, that is, save a user's agents' previous AI conversations, then compare that usage against what would have been saved if various token compression/"tokenmaxxing" strategies were to have been used (then the user can tweak their settings for better future token used based on that knowledge)... Another step forward in AI optimization!

Semantic search powered by Rivestack pgvector
3,874 stories · 35,194 chunks indexed