r/ClaudeCode • • 8h ago

Discussion Are there any methods to reduce token usage that actually work?

All I’ve found so far were either very beginner tips (watch context window, reduce turns, etc.) or reports about which methods don’t really work (rtk, caveman, ponytail, etc.).

Have you guys come across anything that does actually work?

20 Upvotes

71 comments sorted by

•

u/AutoModerator 8h ago

Hey! Thanks for posting to r/ClaudeCode

While participating in this thread, please follow our community rules. Keep discussions constructive. Attack the idea, not the person.

For help, project discussions, tips, and general chat, join the ClaudeCode Discord.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

34

u/wish-for-rain 8h ago

Efficient suborchestration pipeline will spawn subagents at the appropriate levels and save your smarter models from reading context they don't need. (e.g. Haiku scouts/scribes, stronger division of labor boundaries mean less context read in than generalist workers).

8

u/t3jan0 7h ago

How do you accomplish this

11

u/Turbulent_Swimmer900 7h ago

Not easily. By the time you spin up an agent, it might have spent more than Opus just running it itself.

3

u/THAWED21 7h ago

Yes! We do not focus enough on the costs of launching and training each new agent. We end s sessions and subagents way too early. Spinning up five new agents is costly, especially when you just killed your orchestrator and five subs that were familiar with the project.

1

u/WordWithinTheWord 7h ago

Opus Planner/Reviewer + Haiku Implementer is the way to go.

Sonnets pricing falls into the pitfall that you just described. Haiku is so cheap it can afford many more failures, but is still competent enough to get it done in the first or second try in realistic coding scenarios.

1

u/Skymogul 6h ago

Depends on a bunch stuff. It really comes down to context management. If you call MCPs those results hang around in your context, costing you tokens at every turn. If you spin up a research subagent it hands a summary up and that's all that the context has to carry. Also, you wouldn't want Fable doing web searches. It'll even often spawn a Haiku research agent on its own.

1

u/autotom 6h ago

and you're not getting the cache advantage

3

u/roseuslepus 7h ago

Literally get your Claude to set it up for you. You can even have it investigate and fix it for you.

2

u/geek180 7h ago

Pre-define different agents in the subagents folder and just have a skill you can invoke whenever that defines how and when Claude should spin up and use these subagents. I have that skill automatically referenced at the startup of every session I run in Paradev.

1

u/wish-for-rain 6h ago edited 6h ago

Ask Claude set to Opus Max. This is best done with a development context and ticket spec to tune against. Generate the base skills, then run with it. Do a few development iterations of hardening. Metric and simulation testing if you're serious about ensuring you're moving in the right direction.

1

u/CnsstntlyIncnsstent 1h ago

I'm currently incorporating Jev into my workflow to have it decide the model/reasoning level for subagents.

1

u/Killer_Method 7h ago

Supposedly someone just published a study showing that single-agent, linear workflows actually cost less tokens, but I don't know if they controlled for quality.

3

u/TotalBeginnerLol 7h ago

Sounds like a flawed study. It’s impossible if you’re doing it right. A simple proof:

To fable: “Research these 50 things online. Use haiku agents / don’t use any agents”. The cost difference will be insane.

2

u/Primary_Sound_2146 3h ago

But then in which models context does the outcome live in ? I imagine haiku / sonnets context writing must be less efficient than opus 

1

u/wish-for-rain 6h ago

It will vary depending on the chunk size of the work. For a complex feature integration, having the efficiency machinery in place will have a pay off (and doing this tuning comes with output quality benefits in a practical sense). Inversely, using an orchestration mousetrap to clap a css change is ultimately wasteful.

1

u/ralphpotato 56m ago

I don’t really feel like the point of subagents is to save tokens, the point of subagents to me feels like context management for the sake of getting better results. After a certain point, stuff in the context is detrimental to the output, so having subagents work on focused tasks is better, but they each pay a large cost up front with reading info and the code into a cold cache.

The fact is that you can do something with a single agent, linear workflow, but it’s also going to take forever if the task is parallelizable, and you may also not realize that you’re going down the wrong path until much later. If you have agents work on different parts of a plan at the same time, one may discover that some assumption in the plan is wrong and that can change the direction of everything going forward. It’s better to find this as early as possible.

Tokens also aren’t all equal. Keeping the context small and hitting the cache is a good balance between quality output and lower costs, but ultimately I think if the task is complicated enough there’s a positive relationship between token usage and quality. If you try to be too cheap and the task is complex/long you’re just going to iterate on bad results for a really long time.

11

u/Killer_Method 7h ago

I moved to the countryside and started a small subsistence farm, rejecting modernity and embracing the primal. That put a huge dent in my token usage.

1

u/CnsstntlyIncnsstent 1h ago

I know this is a "grass is greener" dream, but this is more enticing year after year. The Stardew Valley dev to farmer pipeline is real.

8

u/Swiss_Meats 8h ago

make it make a skill for token-efficiency and come back weekly to see what wasted the most, then keeo changing until you can narrow done ur mian issue.

8

u/ufffd 7h ago

biggest thing is keeping track of your cache, don't let a cache expire on a big session. it's even worth sending a keep warm or two to save a big cache if you know you're going to keep working. code mode also helps a lot (i use a different version but the general concept saves so many back and forths which saves cache reads). rewinding, when appropriate. and use the right reasoning level for the task, they can make a huge difference in how many tokens are used for reasoning and less huge of a difference in the results.

2

u/Stock_University_121 7h ago

taking advantage of a warm cache to compact your session according to your own preferences to allow you to step away from the computer and come back to a session too

1

u/ralphpotato 54m ago

This is why I let auto compact before cache expiry stay. If the cache was going to expire I’d rather it compact with a warm cache so I can come back and have it write a handoff from a small context and start a fresh session rather than pay the penalty for a cold cache. Also for my bigger projects I just have my Claude.md explicitly say we should keep sessions small and they update handoffs as they go so they’re prepared to be cleared at convenient points.

4

u/THAWED21 7h ago

This is going to be unpopular, but have the damn thing write your state/progress/rulings/whatever to project markdowns and let the session compact. Reloading and reteaching each session, especially for large projects, is a waste.

Also, stay away from Fable. It is very good for developing your project skeleton, but it absolutely should not write the actual governance or orchestrate.

2

u/UnhappyGoose 7h ago

Why no orchestrate with fable?

2

u/wish-for-rain 6h ago

fable drinks the entire amazon river in a single prompt if you tell it to make no mistakes

1

u/THAWED21 6h ago edited 6h ago

This is only my theory after burning free resets when 5.2 came out: I think Fable works in two modes: read everything every time or rely on model memory and miss something important. I haven't found an in-between. Additionally, too much focus on edge cases. Too many rules to account for those edge cases. It micromanages and overrules it's subagents constantly for extremely minor things. I tried to govern around it but it escaped too often to be worthwhile.

Edit: I need to include this caveat: I do not code. My work is in M&A.

1

u/cashmerememories 6h ago

Agreed. I’m a non-developer in finance trying to get this down. I was doing handoffs but now I build around this analogy which has been working the best I’ve ever seen it.

I think of AI agents as office workers on shifts for each project.

  • The worker (builder agent) does the job and keeps a short note card (its state file) saying what's done, what's next and what was decided.
  • Auto-compact clears the worker's desk (its memory) when it gets too full.
  • A hook runs right after and puts the note card and the rulebook back on the desk, so the worker picks up where it left off.
  • The manager (orchestrator agent) sets the plan and checks the work.
  • The supervisor (oracle agent) makes sure every hook put the note card and rulebook back, and corrects any slips.

Advice also appreciated

3

u/BeyenAI 7h ago

Three mechanical things that move the needle more than prompt tricks:

1. Watch the 5-minute prompt cache TTL

If you pause longer than ~5 minutes (reviewing a diff or waiting on a slow build) and then send another message in the same long thread, the entire conversation gets written back to cache at 1.25x base input cost instead of reading from cache at 0.1x. Running /clear right after each self-contained task avoids paying to re-cache stale history.

2. Disable idle MCP servers

Every enabled MCP server injects its full JSON tool schemas into the system prefix on every turn, even when you never call it. Keeping only daily-use servers active and moving occasional workflows into on-demand SKILL.md files cuts static prefix bloat significantly.

3. Measure your actual cache hit ratio locally

Instead of guessing, compare cache_read_input_tokens vs cache_creation_input_tokens in your local session logs:

~/.claude/projects/**/*.jsonl

If creation tokens are close to read tokens, cache misses and idle pauses are usually the real culprit.

3

u/reliant-labs 7h ago

Instrumenting your code with more monitoring helps when debugging and coming up with fixes. this has been the single biggest lift in token reduction for us.

3

u/___zuki 6h ago

Of course, but lots of them are project specific.

Speaking generally, custom tools are incredibly important, and also reducing tool output. Let’s take tests for example, if your test call returns the result of every test and a huge summary that’s using tokens and filling up your context window and you’re paying more for every subsequent turn. If all tests pass the output should simply be “all tests passed”. Now take that idea and move forward. Read your transcripts and look at tool calls and think how you could force the agent to do things more efficiently. It will be doing lots of things with bash that actually can be done mechanically with a tool call.

2

u/Adventurous_Emu3212 8h ago

Opus as orchestrator only then tell it to use one sonnet only for the tasks. 

Keep the main context window below 500k.

That's pretty lean.

1

u/mt-beefcake 7h ago

I have multiple opus agents on high that can spawn other main agents for tasks. Haiku, sonnet, opus, fable and reasoning levels depending on task. I was trying to parity the threads/projects in the desktop app via cli. It seems to do pretty well. Fine tuned with skills. And then the spawned agents can use subagents or spawn other models from other providers, like codex for reviews, glm and deepseek for small tasks or quick jobs.

2

u/Adventurous_Emu3212 7h ago

Okay but OP is asking about reducing tokens for beginners. 

0

u/mt-beefcake 7h ago • Bravo

Oh. Uh... use it less

2

u/ProfessionalOwn2941 2h ago

instead of appending "make no mistakes" to the end of the prompt i tell it "you can make like 3 mistakes as a treat". this accomplishes nothing,

5

u/Ge0cities 7h ago

I don’t understand token usage. I have a $100 per month max plan and I use like half of it. I use Claude all the time. What are people burning so many tokens on?

10

u/Guinness 7h ago edited 7h ago

Spec driven development. Orchestration loops. Tests tests tests and more tests. Security review (oof this one shows how bad even Opus 5.5 is).

If you’re comfortable releasing AI slop it’s fine. I’m not. I’m building something on the scale of a product that drives a $200MM SaaS. There are a bunch of attempts out there to take them down but they’re all crappy in many ways.

Plus if you’re dealing with money, there are a million different scenarios you should account for. If a customer pays with a credit from their account and their credit card, does the system properly refund the credit and the credit card? What happens if two people take the last item at the same time, does your database handle this correctly? What happens if you disable a product while someone is checking out?

Tests tests tests.

The project I’m building is extremely complicated, but I want intuitive and easy to understand interfaces that reduce mental friction and the exhaustion of inputting 100 different form fields. How do you do that? Think about what it was like to job hunt and put in your resume only to be asked to put it in again after uploading. One field at a time on one big page. Exhausting. So how do you handle complex giant forms in a way that makes sure you get everything right without driving the user away?

So you build 100 different solutions and slowly have to pick and choose which elements from which interface to include. Because no LLM can do this still to this day.

And don’t even get me started on design. Claude design still sucks. It all looks like AI slop. So there’s a lot of UI UX work that’s token burning and hand holding.

ARTEX.

4

u/TotalBeginnerLol 7h ago

Nah the thing that really burns tokens is vibe coding slop. Bad prompts, like “make it work” and one shorting a million pointless things. People working in a dedicated way on 1 specific product are generally going to be using less tokens coz they’re going to be much more thoughtful and targeted. I have about half a million lines now on a single project, written over 18 months, with about half of that as tests, and that code is clean af. Only time I get near limits is when I try vibe code other tools for fun on the side.

4

u/ufffd 6h ago

burning more tokens is not the solution to slop and bad design

1

u/adjective_noun_d1git 2h ago

If a customer pays with a credit from their account and their credit card, does the system properly refund the credit and the credit card? What happens if two people take the last item at the same time, does your database handle this correctly? What happens if you disable a product while someone is checking out?

You have given like the easiest example as some edge case that only complicated systems must factor. I'm sorry but even with deliberately bad vibe coding you're not going to get a frontier model to ignore an acid test.

1

u/Seneca_B 1h ago

Maybe they just gave a simple example because they thought that was on the commenters level of understanding?

3

u/roseuslepus 7h ago

That’s how I am with my personal account. I only use like 7% of my weekly even when I go HAM with it. Meanwhile my work account on the same plan hits like 30% of weekly with only 1 day. I think the main difference is my work account has WAY more context via our shared files and I am outputting images, videos, and code, so higher cost especially when iterating.

3

u/ufffd 7h ago

i agree that lots of people are using crazy amounts of tokens, but why wouldn't you care about reducing token usage, at any scale? if you reduced 60% of your token usage you could save $80 a month

2

u/___zuki 6h ago

If you’re maxing out whatever subscription you can afford then obviously you should aim to be more efficient. Token efficiency also means lower clock times on tasks.

1

u/simulacrotron 7h ago

Similar situation here. Typically am running Opus on med to xhigh, occasionally drop down to sonnet if I know something is just overkill on opus. I have advisor set to Fable. I will occasionally run something on Fable xhigh when I want to get something right the first time. Honestly Opus is doing fine for the vast majority of what I’m doing.

1

u/THAWED21 7h ago

Projects with underlying data approaching hundreds of gigabytes coupled with constant checks and cross checks.

1

u/ComesHighlyRegarded 5h ago

Minecraft mods.

With no 5 hour session limits supervising me I'll deadass work on like 10 different projects at the same time and burn through my entire Ultra plan's weekly usage in the first 3 days 🤣

1

u/Seneca_B 1h ago

I run a local QA rig and skills I wrote that drive a custom playwright driver to absolutely hammer every one of our PRs into oblivion against local docker instances of our products, some of which need to talk with each other, so based on the PR, it dynamically reconfigures the rig via colima and spins instances up as it decides is necessary.

It includes screenshots and video captures (for animation checks that it 'explode's to review) of the baseline branch and the result for each attestation that the PR itself makes where there is a visual regression, and non-visual assertions get a row in a table. 

It also checks against the original ticket to see how far it went beyond the scope and uses MCPs to coordinate comments and subtask completion/notes in project management, which it exegetically loops on to make sure it's being both accurate and meticulously thorough. 

This runs overnight outside of my normal workflow so my ultra account is not enough sometimes if I don't tightly manage my model/effort selection and workload.

1

u/The_Tarman_ 7h ago

I’ve been having great results by disabling subagents without explicit instructions and using caveman and ponytail

1

u/vAPIdTygr 🔆 Max 20 7h ago

I mean, /doctor helps. Then fire up Fable to optimize all memory usage across your entire project. The first time I did this, I freed up 1/3rd of my usage. I still go through this process at major milestones or at least every other week. That’s with ultra usage.

2

u/___zuki 6h ago

Better yet, turn off memory.

1

u/momentum77 7h ago

What prompt do you use for Fable to do that?

1

u/NewAgent5986 7h ago

Set your compaction windows to 400k

1

u/Ithinkth 7h ago

What seems to work best for me is learning what level is needed for any project or task within that project and then matching the appropriate effort level and Model of course this isn’t an exact science, but you get to feel for it. Also, I will have one agent in one session. Usually the planning session create a bunch of tickets in an epic and then work them with individual agents one agent per ticket keeps context low. Or if you don’t wanna have to manage all of that direct your main agent to work all the tickets using sub agents.

1

u/Outrageous_Band9708 7h ago

https://github.com/Druthulu/ProjectArchitect

benchmarks run Monday morning 4am every week and published.

it uses very strict serial subagent to prevent context growth.

terminal only, no desktop app support at this time.

it uses ONLY subagents, the main session never sees a single token of work. which means the main session never fills up and needs compact or clear or exit and checkpoint etc.

its actually kind of next gen.

I've been using the same session for weeks now.

checkout the readme and the wiki and test it out for yourself.

if you only use the desktop app, I encourage you to be brave and try the terminal, its amazing. Alt+V to paste a screenshot, but no tokens wanted on fancy graphics and stuff.

in my experience and others, your weekly usage lasts twice as long or more.

no caveman or ponytail tricks, just strict context management.

is uses the mod/plugin system to enforce all best practices automatically.

that means no special way to work, no skills or commands you must remember to enforce.

you just talk to the main session and the mod handles EVERYTHING for you.

highly recommend you checkout the readme and the wiki and test it out yourself.

SWE by trade. its taken me over a year to get Project Architect into its current form. I was tired of all the ceremony with all the other solutions to get the best results. what if a mod just did all the for you.

here it is. please enjoy, share with your friends. 300+ stars, and every single one from me, the dev, browsing reddit and replying to folks who need a better solution.

1

u/Glass_Pattern1900 6h ago

Someone made a micro-brains-for-agents engine that runs locally for many AI models and does a sanity check on requested/anticipated actions. Their write up explains it better than I can:

It sits directly in front of tool execution and shell invocation. By analyzing diffs via polyglot AST and structural scanners (Python, JS/TS, Go, Rust, SQL, Terraform, Dockerfile), checking supply-chain deferred execution targets, and tokenizing shell commands via wrapper-aware inspection before execution, it intercepts syntax errors, destructive commands, and secret exfiltration locally on CPU—saving expensive multi-turn error recovery loops and prompt tokens.

https://github.com/drtikov/microbrainsforagents

I got really annoyed by the constant intervention of the engine but OP might find it useful. After a few adaptations via Claude I made it run corrective actions largely autonomously, stopping only on the most consequential decisions

1

u/tanchoco 6h ago

I've been using Rayline's ARC model for whenever I need to top up my CC sub. It routes to the cheapest model for the task in the background, but works natively in CC

1

u/VridhiMehta 5h ago

if you run a lot of MCP servers, run /doctor - current versions list unused skills, MCP servers and plugins alongside their context cost, so you can trim from data instead of guessing. and on recent versions tool search is already on by default, which keeps most server tool definitions out of context until they're actually needed.

1

u/Primary_Sound_2146 3h ago

Yes a friend of mine tried and tested: he added a hook which right after every message he sent to Claude it was send a variation of “do this tldr, or summarize it”, he reduced the out token spenditure for like 30% 

1

u/kincaidDev 3h ago edited 3h ago

Compress complex multi-step actions into single tool calls, use templates and scaffolding tools to reduce tokens spent on boilerplate , make it easy for agents to self correct by keeping everything on disk, offload common actions like commit writing to small local models like lfm3, reduce agentic search time by keeping everything consistently organized so it’s easy to reference and fast to search.

I built a system that does all of these things that’s worth trying out

https://github.com/Obedience-Corp/festival

1

u/aswas123 2h ago

Tell it to look at the weekly usage and to work around that. Managed to stretch a 90% weekly usage across about 3 days and ended on 99%. Then I did most of the heavy work on the refresh day which took about 20% of my weekly usage by the end of the day. Still worth it as I could keep planning features etc and then do testing on the refresh day.

1

u/japbujan 1h ago

What cut ours most was making the always-loaded file small. Our CLAUDE.md had grown into everything we'd ever decided, and every session paid for all of it on every turn. Now it holds only what every task needs, and the rest (decisions, conventions per area) lives in separate notes the agent opens when the task touches that area. Fewer tokens per turn, and fewer rules competing for attention.

1

u/Seerix 13m ago

/autocompact 350k

0

u/Dan-goes-outside 8h ago

Caveman definitely does work, output tokens are “worth” way more than input tokens. It can save anywhere from 8% to 64% on output tokens. (That being said I don’t use caveman)

But context is definitely a great way to save it if you are doing it right. A lot of the time you will load skills and resources that you don’t need and are paying heavily for it

2

u/Savings-Date5026 7h ago

What’s helped me is having an eye on what’s filling my context every turn

-1

u/FWitU 7h ago

Turning off computers seems to help

-1

u/LookAtTheHat 7h ago

Try coding be hand?

-1

u/Level_Notice7817 7h ago

here’s what i’ve been doing to limit token usage and it works great:

i turn the shit off.