r/coolgithubprojects • u/Otherwise_Snow_5616 • 10h ago
Claude Code reaches the same answers with 86% fewer tokens (free, open source)
3
u/Otherwise_Snow_5616 10h ago
My text didn't come through with the picture, so here it is:
Claude re-reads your whole chat before every reply. It's like re-reading the whole book to write the next sentence. Long chats and big test logs get paid for again and again.
I built Fewer to keep the book short:
- it makes long outputs short, and saves every page word for word, so Claude can still find any detail
- it reads ahead the files your message asks about
- after /clear, the new chat picks up where you left off
The picture is Fewer's map of where my own Claude Code tokens went in the last 30 days.
I tested it on 9 coding and web tasks, 12 runs each with and without Fewer, on GitHub's clean machines: 86% fewer tokens, and every answer right both ways. The benchmark is in the repo, so you can rerun it yourself.
Works on Mac, Linux and Windows. Free, Apache 2.0. If you use Claude Code a lot, try it and tell me what you see, especially if it doesn't help.
3
u/exclusivegreen 10h ago
Did you forget to post a link?
5
u/Otherwise_Snow_5616 10h ago
oops 😅 my text didn't come through. here it is: https://github.com/hazemdawahi/fewer
2
u/redneck-eyeball 5h ago
But you need Claude code for this. What about the free tier desktop app. Because that's all I have.
And yes, obviously I run out of tokens and need to wait for another 5 hours to continue what I'm working on.
No free version of Claude code as far as I'm aware.
2
u/Otherwise_Snow_5616 5h ago
ah yeah, Fewer only works with Claude Code for now, and Claude Code needs at least the $20 Pro plan, there's no free version. sorry!
but a few things from building it that I know work, even in the free app:
• new chat for every new task. claude rereads the whole chat before every reply, so one long chat gets expensive fast. this was the biggest saver in my tests
• when a chat does get long, ask claude for a short summary of where you are, then paste that into a fresh chat and keep going
• paste only the part you need. the one function, not the whole file. the error lines, not the whole log
• ask for short answers. everything claude writes gets reread on every later reply too
so doing those should make the 5 hours last longer
5
u/seiggy 9h ago
Fewer tokens doesn't mean anything without benchmarks to show it doesn't harm output, task completion, and intelligence.
I'd recommend using a benchmark like - https://www.scbench.ai/ that's difficult and shows real world problem sets with not just tokens burned, but turns, and task completion evaluation results.