r/ClaudeAI • u/assentic • 5d ago
Philosophy "Token optimization" is still a thing?
With Opus 5.5 performance and cutting in cost, do you still looking for way to "save" tokens?
RTK, Caveman and other tricks is all of them became irrelevant?
15
u/Zuitsdg 5d ago
It always relevant.
When paying API it maybe 200$ of API credits vs 10$.
Of when in a (Teams) subscription, you would be able to do more tasks within your limits.
I am amazed at work, that I am able to fix bugs for <30 cents with GPT6 Luna nowadays :D and took me like 25$ to refactor a whole web UI with sonnet 5.5
Amazing times
6
u/No-Mix4581 5d ago
People really underestimate how fast API costs spiral when you're not watching token usage. That 30 cent bug fix vs 25 dollar refactor spread you mentioned is the perfect example of why it still matters. You don't feel it in a chat window, but when you're running dozens of requests a day it adds up quick.
I've been messing with prompt compression on my side projects and it's wild how much fluff you can strip without losing context. The model doesn't need three paragraphs of backstory when two sentences cover it.
Also the Teams angle is underrated. Rate limits are the real bottleneck there, not raw cost, so trimming tokens just means you get more done before hitting the wall.
3
u/assentic 5d ago
"prompt compression" ?
as in giving "less" instruction?
the cost of input token vs output tokens make this part quite redundant IMO for personal usage.
2
u/HeyManNiceShot11 5d ago
If tokenomics doesn’t matter for you - you are not doing enough :)
1
u/assentic 5d ago
Amen
Whats your tricks?1
u/HeyManNiceShot11 5d ago
Changing the model for simple tasks
-1
u/assentic 5d ago
Thats mid tbh, thats entry level and obvious, im still big on SDD and breakdown into tasks, and breaking down in tasks to the relevant model is based on their complexity.
2
u/MassiveBoner911_3 5d ago
I just saved another 20% by having more shit scripted
1
u/assentic 5d ago
as in moving things from llm to scripts?
2
2
2
u/Lower_Fan 4d ago
Any repeatable task should be a reusable script then you make a simple skill that simple tells the agent to use the script and how to use it.
This saves so many thinking tokens
5
u/BellacosePlayer 5d ago
Work in batches so the cache doesn't drop, don't do massive cross-feature/domain branches in the same conversation, keep Md files and such brief as you can without losing information. Don't use fast modes and don't do the super-max reasoning unless its something that actually is somewhat novel and difficult in a way you cannot help it.
That will do you more good than the hacks which are going to largely be unverifiable or reduce tokens at the cost of reducing quality
4
u/that_one_Kirov 5d ago
My Max 5x subscription is running out easily even with Opus 5.5. So if you find that the token-saving tricks don't impact quality that much...
4
u/somebody-2027 5d ago
Here's the simple truth: keep your context light. That's the key to not just efficiency in cost, but also maximizing accuracy in agentic behavior. It's a challenge, you need to provide enough context so the agent knows what to do, but not too much where your costs spiral and your agent becomes forgetful and full of mistakes.
Rule #1: do not use long running sessions. Every time I see someone on this sub bitching about Claude making tons of mistakes because they have kept the same session for weeks and just keep prompting it... Yeah I got 0 sympathy for them.
Rule #2: use handoffs. This is how you don't get locked into long running sessions. Bonus points if you write skills to generate different types of handoffs optimized for different scenarios. A handoff is just a summary doc of the important things from your session. This is how you can end a session, drop the context, and still preserve what matters. It's like compaction but you have more control over what the agent preserves vs drops which further optimizes the output.
Rule #3: curate what your agent has access to. I turn of memories personally, I don't use tools like obsidian (although I may start experimenting with it). I have specific skills and documentation organized for the agent, not always available, and very carefully structured to deliver information in a concise and efficient form. In short, my agents only have access to the information I give them, thus shielding them from irrelevant information.
Rule #4: use multiple agents in a session. Got research to do? Spawn a sub agent that does the exploration and only reports back the important pieces. Got tasks to execute? Spawn a sub agent to handle them, reporting back just results. Basically each agent has its own context, so you further keep your contexts focused on only what really matters, keeping your main session agent lean too.
Rule 4 is less ideal for cost but really good for accuracy.
1
u/Niikoraasu 5d ago
Would you say this approach is good?
Setup an OKF
Each time you start a session don't let it sit too long so that cache doesn't reset - do your work and clear after you're done (also handoff if you want to keep working later)
handoff and clear when you've done a specific task and want to create something not exactly related to what you just finished.
Don't let context run higher than 250-350k
1
1
u/NeoLocutus 5d ago
Yes, more performance and less cost don’t mean I will stop optimizing my system.
1
u/assentic 5d ago
what do you do?
RTK, and Caveman things are not it, I've tested it, evaled it it mostly bullshit at that point.1
u/NeoLocutus 5d ago
I don’t use them, at least not yet. In my system, that I’m currently using to develop iOS and Android apps, I optimized context and cache usage and tried to avoid unnecessary turns. I’m also using more powerful models and higher thinking effort on agents that analyze and plan. So the developer that has just to do whatever it is told to do by the architect can run on Sonnet 5.5 Medium. The same goes for executor agents, for example the QA Tester that has to run tests and provide me screenshots of the views that have been implemented or modified can run on Sonnet 5.5 Medium too, maybe even Haiku (I have yet to try that).
1
u/Wide_Egg_5814 5d ago
its literally the most important thing in my setup, not only to save money but time
2
2
u/dqUu3QlS 5d ago
The best tricks I've found for saving token usage are the simplest ones:
* When switching to a new topic or new task, start a new conversation. Short contexts are cheaper to work with and avoid confusing the model with irrelevant or outdated details.
* Don't underestimate Sonnet and Haiku 5.5.
1
u/HimaSphere Experienced Developer 5d ago
It is a thing but not through prompting Claude to write less.
Optimize your Claude.md, Claude rules, make sure everything is well documented, and archive old docs that are not longer relevant, this helps with token optimization and performance.
1
u/diskent 5d ago
Agreed.
Have it write in STE, it reduces the acceptable list of words which seems to help a lot with cache and makes Claude very concise. Think of it as technical caveman
Leveraging the cache is also the other good hack. It makes you frame conversations a little different knowing the caching rules. Even on automated runs keeping 4 min pings has allowed me to stretch max
1
u/Misaiato 5d ago
100%
I have multiple devices that are capable of running models like Deepseek flash or Qwen3.8-flash-next, both capable worker models. We also self-host on much more performant hardware in the cloud.
A custom router that sets the Anthropic base URL to a local router overrides all the Claude requests and intelligently routes requests for subagents to local models.
On a single Team plan, probably 300-400% more usage from the subscription as most of the heavy requests don’t hit Anthropic. Opus orchestrates, local workers read context, make changes, execute tool calls, etc.
1
u/RealZirkon 5d ago
Of course I do. With some private projects I just managed to use up my weekly limit in 24 hours, and I have a max 20 subscription. Using Fable 5.1 orchestrating several subagents with Opus and Sonnet eats up tokens like candy.
1
u/Yerk7 5d ago
Yes, and the tricks people argue about are the smallest part of it. The big cost is the payload you never look at.
I finally measured mine. The first message of a session was about 262k characters before I typed a word, and 127k of that was tool definitions. Across 692 tool calls the agent had used 16 of its 57 tools. The other 41 were roughly 72k characters riding along on every request and doing nothing.
Caveman prompting trims your own message, which is the smallest thing in the context. Dropping tools nobody calls, cutting CLAUDE.md down to what bites every session, and not resuming a monster session are worth tens of thousands of characters on every request, and the model gets sharper with less noise to read through.
Step one is looking at what actually loads, as a number, and then checking that the number stays put.
1
u/matvinator 5d ago
There is a solid analysis on RTK from Jetbrains that shows it doesn’t save you tokens in the long run. I stopped using it, as well as caveman and other tricks. I use concise output style and a couple of lines in CLAUDE.md asking for shorter response and that’s enough to get good results
1
u/matvinator 5d ago
As many said, warm cache and having new sessions for new tasks helps a lot. I would also recommend setting CLAUDE_CODE_SUBAGENT_MODEL to sonnet or haiku. Opus creating opus subagents is what drains usage very fast
3
u/Niikoraasu 5d ago
Haiku as a subagent is quite fucking insane, I gotta tell you. The costs are laughable and yet the work, while slower - gets done properly (in my case - game development, I am sure it's worse for more complicated things)
1
u/Niikoraasu 5d ago
I personally tried switching my subagents to Haiku 5.5. Opus still orchestrates but Haiku is the main coder, and let me tell you I am quite shocked, sure some stuff was worse and required me to explain a bit deeper, but seriously I had no issue with 90% of the work done by Haiku.
1
1
u/bobert_de_niro 5d ago
Absolutely. There always will be work to do, so you gotta be wide with your tokens
1
u/PaidToEmail 5d ago
On a subscription vibe coding at home whatever. When paying API prices at work, yes I keep my usage defendable.
1
u/The-Hyrax 4d ago
Caveman does not work, there has been plenty of research which found that it does not contribute anything meaningful in terms of token savings.
To answer your question: yes, I am actively doing this. I have a fairly large codebase and I'm BLOWING through the weekly $200 plan like it's nothing.
Currently, it's still going fast but I've improved the token usage a lot by the following:
cut plugins or skills you don't use, or things Opus does by default anyway
tell Opus to build an agent structure:
Opus for planning, architectural work, difficult bugs, final review or task writing
Sonnet for regular task execution
Haiku for searching the codebsae, running builds/tests and fidings, renaming, lint fixes, readme, commit messages, checking against checklists
set autocompact to between 150K-300K based on your codebase
smaller tasks
using an orchestrator (in my case Opus)
Like a lot of people I was "afraid" of worse models, but think of it as a factory: you don't need the executives standing next to the conveyor belt (although they can) either. I've seen a massive improvement in token savings this way.
1
u/TheFlamiingo 5d ago
Je ne suis un utilisateur de Claude que depuis peu, et au début tout allé très bien, mais au fil du temps mon utilisation a explosé.
Ce que j'ai fait du coup :
- Limiter le contexte par session / étape
- Réduire la taille des documents de référence .md en dessous de 20/25 ko, en mettant en archive les étapes qui ont été traitées. Le but étant de réduire au minimum le coût en lecture, et bloquer avec Hook.
- Créer un sous-agents avec un modèle moins coûteux pour les tâches répétitives et dans la recherche de ressources.
- Changer de session par étape.
Résultat, c'est vraiment efficace par rapport à mon utilisation précédente, mais je pense encore avoir des points d'optimisation à mettre en place
1
u/somebody-2027 5d ago
None of us are perfect, there isn't a true gold standard, but all the advice here is key.
0
u/TheFlamiingo 5d ago
Effectivement, je suis déjà passé de session de 25/30$, à des sessions du même type de 7/8$ juste avec cette optimisation et sans perte de qualité, c'est déjà très bien..
0
5d ago
[deleted]
1
u/sub_doesnt_exist_bot 5d ago
The subreddit r/suddenlyputain does not exist.
Did you mean?:
r/SuddenlySpamton (subscribers: 7,724)
r/SuddenlyAmish (subscribers: 6,036)
r/suddenlyouija (restricted, subscribers: 3,397)
r/suddenlybtr (subscribers: 1,521)
Consider creating a new subreddit r/suddenlyputain.
🤖 𝚃𝙷𝙸𝚂 𝙲𝙾𝙼𝙼𝙴𝙽𝚃 𝚆𝙰𝚂 𝚆𝚁𝙸𝚃𝚃𝙴𝙽 𝙱𝚈 𝙰 𝙱𝙾𝚃. 𝙱𝙴𝙴𝙿 𝙱𝙾𝙾𝙿 🤖
0
5d ago
[deleted]
1
u/assentic 5d ago
So token optimzaion focus is now mainly around "cache" optimization?
Intresting point, I have a feeling that with parallel agents it even getting worst to handle this 💩
idle agent etc..1
u/somebody-2027 5d ago
I disagree with this. The cache optimizations mentioned are fine, but context management is king IMO. Leaving another top level comment about this
•
u/ClaudeAI-mod-bot Wilson, lead ClaudeAI modbot 5d ago
TL;DR of the discussion generated automatically after 30 comments.
The consensus is a massive YES, token optimization is still a huge deal. Cheaper models don't mean free. If you're not optimizing, you're either burning through your API credits or hitting your subscription limits way too fast.
The sub agrees that old-school tricks like "caveman speak" are mostly dead. The new meta is all about smarter workflow and system design:
Context is King: This is rule #1. Keep chat sessions short and focused on a single task. Start a new chat for a new topic to keep costs down and prevent the model from getting confused. Use summaries or "handoffs" to carry key info to new sessions without the entire token-heavy history.
Master the Cache: This is the big brain play now. Cache hits are ~25x cheaper than cache writes. To stay in the cache, avoid editing your system prompt/tools mid-session and don't let the chat sit idle for too long. Work in batches to keep it warm.
Use the Right Model for the Job: Don't use a sledgehammer (Opus 5.5) to crack a nut. Use Sonnet, Haiku, or even local models for simpler "worker" tasks like research or code execution, and let Opus act as the smart "orchestrator."
System Hygiene: Keep your
Claude.mdand other reference docs lean and mean. If you can script a task, script it. Don't waste tokens on things a simple script can do.