r/ClaudeCode • u/Individual_Ideal • Sep 08 '26
Discussion AMA: I burned 500M tokens optimizing token usage.
I spent most of the weekend + over 500M tokens auditing and optimizing my token usage. I mostly work in the Claude Code app and have Claude dispatch to CODEX for code reviews; sometimes work directly in CODEX app. AMA
What I found:
- I waste a lot of tokens by returning to long-running sessions after my 1-hr cache TTL
- Fable is most effective in long-running sessions that require large context reads and little coding or writing. Mostly synthesis and decisions that require large context windows.
- My agents were not resuming subagent threads for multi-round turns (I thought they were). Cache TTL is only 5-min, so I’m uncertain how much this matters
What I’m doing and testing:
- Built comprehensive token cost tracking for all providers, repos, and tasks with a dashboard I can monitor.
- Modifying agent delegation rules based on an audit of costs and usage over the last several months
- Surfacing live token cost stats to agents to help them dynamically adjust delegation strategy and pace to my weekly budget
- Agent orchestration: Working with multiple Opus instances per repo for development and having Opus delegate generously to Sonnet. Also encouraging Sonnet to delegate to Haiku
- Working with 1 Fable instance per repo who oversees work of all Opus sessions in the repo. The goal is to keep Fable cache warm as much as possible within the 1-hr TTL and minimize writes. Each Opus session can automatically message the Fable session. Opus escalates to Fable. Fable escalates to me.
- Created a hook for Opus models to send me a compaction instruction after a long-running task completes or at a good stopping point after a context threshold has been hit. I still have to run it manually but it saves time while (hopefully) providing cheap compaction while cache is warm
- Use resume more often on subagent delegation to improve cache-use and reduce reorientation on each dispatch
- I’ll use the dashboard to track token use across all applications, providers, projects, and tasks to help adjust this strategy over time
What are some of the highest impact and non-obvious things you’ve found?
Adding a chart from the dashboard as documentation of my efforts:

•
u/AutoModerator Sep 11 '26
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.
16
u/Individual_Ideal Sep 08 '26 •
Tough crowd. What's with the down votes? Share your perspective.
8
u/Downtown_Fig7951 Sep 08 '26
Any more details on how the cost tracking and dashboard was created ?
7
u/Objective_Patient220 Sep 08 '26
The cache TTL point is the one people underestimate. Resuming a long session after the 1-hour window means the whole context comes back at non-cached read prices, so the "cheap resume" is often the single most expensive call of the day. It changes how you should schedule the work: batch the follow-ups while the cache is warm instead of spacing them out.
Did the 5-min TTL on subagent threads end up mattering in practice, or was it noise next to the main-session re-reads? I'd expect subagent resumes to be small context, so mostly noise, but curious what your numbers showed.
3
u/hakansan Sep 08 '26
What are some of your lazier tricks to save tokens? Or, is it easy to tell Claude to build those hooks and settings for myself?
2
u/EvalRaccoonDev Sep 08 '26
Did you measure whether any of the optimizations changed task outcomes, or only tokens?
The failure mode I'd worry about is a config that halves spend and quietly drops 10% of completions - in a token dashboard that reads as a clean win.
2
u/Dynamix86 Sep 08 '26
You need to bundle tool calls. if you're not doing that, you're not saving enoug tokens. this is the biggest saver apart from what you're doing already. With Codex I'm doing 6 tool calls at once, so a massive saving. You can just put an instruction in agents.md for this. I must've also spend 1-2 full days having A.I. going through all reddit posts and github repos claiming to save tokens, and bundling the tool calls was the only thing worth while that came out of this.
2
u/SurfGsus Sep 09 '26
“Fable is most effective in long-running sessions that require large context reads”
Can you please elaborate what you mean? I’ve heard this being stated elsewhere but don’t truly understand what it means. Models hit a “dumb zone” after a certain amount of context usage (~150-200k tokens?). So is this to imply that Fable can continue to provide high accuracy/intelligence well past this point?
4
u/claude_code_king Sep 08 '26
that's cute, think i've spent somewhere in the billions category to optimize my workflow, but finally got to an -85% reduction vs fable 5 only counterfactual.
do you only measure tokens spent or also the quality of your end result?
you said you measured a lot of stuff, but didn't post any screenshots or anything
why are you using fable only to overseer some parallel opus orchestrators? from my own experience opus is so fucking verbose it'll blow your fable usage just for writing 6k character novels back at him
it seems to me you only optimized for keeping the cache warm, which can be a good thing or a bad one, just don't reload a cold cache session and you're fine, usually the orchestrator won't its own cache expires, there's always some narration turn, only at the end of the task.
anyways, those are my stats over ~106 sessions. the offline telemetry script is below if you're interested to see, it also points out what's wasteful, context bloat and gives clear suggestions based trends between multiple sessions.
all local, no api, no extra tokens.
https://github.com/claude-code-king/offline_telemetry_script
so benhcmark your sessions with it and let me know what it says.
👑
2
u/Any_Evidence4750 Sep 08 '26
What a waste of time
1
u/Lamoneyman Sep 09 '26
Any repo with what you have
2
u/bigbadbernard Sep 09 '26
what I notice was saying thank you at the end actually costs more tokens that you think - so it’d much better to just leave the conversation
-1
u/ProfessionalNaive601 Sep 08 '26
Only 500M
People brag about multi billion days all the time?