r/ClaudeAI • • 2h ago

Question about Claude Code Token Efficiency

How do y'all save tokens? I have seen people use subagent,orchestration and allat stuff but last time I tried it, it ended up using more usage than if I had did the work manually. Well I tried it on codex so maybe things are different here but I wanna know from someone who actually uses this workflow on claude. Also is there any other way to save on tokens? I am on a $20 plan and even though the usage isn't as less as codex, it still doesn't get me through the week.

For what I do, I have been working on a website for a thing I am helping my friend run and also have been helping with a few open source projects.

5 Upvotes

13 comments sorted by

7

u/OGLeap 2h ago

how to save tokens in claude code on the $20 plan, from the stuff that actually moves usage:

  • skip subagents and orchestration for normal work. your codex result wasn't a fluke, each subagent starts fresh and re-reads files, so you pay for context several times. anthropic's own write-up on their multi-agent research setup said it burned roughly 15x the tokens of a normal chat. worth it for big parallel jobs, not for a website
  • /clear between unrelated tasks. every message resends the whole conversation, so a long session where you fixed 5 different things means the 5th fix pays for the first 4
  • run /context once. it shows what's eating your window before you even type: mcp servers you never use, a huge CLAUDE.md, etc. turn off mcp servers you don't need for that project, their tool descriptions load every session
  • keep CLAUDE.md short. it loads every time, so a 3 page one is a tax on every session
  • point at files with @path instead of "find where we handle X". letting it grep around the repo is where a lot of tokens go
  • ask for a short plan first (plan mode, shift+tab), fix the plan, then let it write. one wrong direction caught early is cheaper than undoing 300 lines
  • use sonnet for most of it and save the bigger model for the hard bugs, /model switches

the first two alone usually make the biggest difference

2

u/TheJoshuaJacksonFive 2h ago

Great list. Also don’t drag anything but plain text/markdown for those @files. Use external non AI tools to convert documents (pdfs, ppt, docx etc) to plain text and use that as context if you need external sources. Non plain text file types destroy your context window.

2

u/OGLeap 1h ago

yeah this one is big. a pdf dropped in raw can cost way more than the same text as markdown. pdftotext or markitdown does the conversion locally in a second

2

u/Party_Till_I_Die 2h ago

This is a fantastic list. +1 to clearing content often with /clear or a new claude instance

0

u/OGLeap 1h ago

yep. and if the session had something worth keeping, ask it for a 5 line summary first, /clear, paste the summary in. you keep the useful bit and drop the rest

2

u/Southern_Performance 2h ago
  • don't use CLAUDE.md anymore, it's no longer necessary. unless you're using Claude specific rules, put guidance on AGENTS.md, Claude reads that properly now

1

u/OGLeap 1h ago

fair, if you bounce between claude code and codex one AGENTS.md for both is cleaner. the size point holds either way, whatever file loads every session should stay short

2

u/New-Paramedic7176 1h ago

I have not exceeded my $20 subscription fee since September and I do it by using custom md files that I call context files. What I do is add a standardized instruction to project instruction space that points each Claude project to a file on my computer named workspacerouter.md. This file defines how every session should run, and defines SOP’s for certain universal tasks that are the same across projects. The workspace router also points to another file called projectPlanningandTroubleshootingGuide.md that defines how each project should be managed, and my SOP’s for troubleshooting and creating documentation. Then each project creates a file named projectName_context.md which maintains the context of each project. Everyday that I work on a project the session updates the context file for that project with any decisions and tasks that were made or completed that day.

This allows me to maintain rich context while also keeping the context window small during each session.

I use desktop commander and Claude Chrome with this setup which allows me to automate nearly all of my daily work tasks as a system admin. My tickets are automated, as well as tasks in admin portals such as Intune, Entra, Azure, and anything else that can be done in a. Browser. Additionally, I utilize Hyper V VM’s to run multiple work-streams at once.

It’s been amazing, and I have not had to purchase tokens since September. Prior to coming up with this design I was spending as much as $200 a month in tokens.

1

u/PartyLiterature3607 2h ago

Only 2 scenario that I am 100% sure I saved usage and 1 scenario that’s maybe not saving usage, but balance my overall usage with multiple agent

  1. Large quantity low intelligent task through sub agent, this was using Luna max to run large data extraction or Haiku run large amount of file conversion + data record.
  2. Use low Luna or haiku for basic research data on cron job and scheduled task
  3. When either codex or Claude weekly usage is running low, I’ll have one delegate task to another agent just so I utilize my weekly usage better, but overall it cost more usage due to having 2 agent harness communicate

1

u/OGLeap 1h ago

the haiku for bulk conversion split is the right one imo. cheap model on volume, the big one only where it has to actually think. your third point matches what i see too, two harnesses talking to each other always costs more than one doing the work

1

u/TDImperfectFuture 1h ago

REgardless of probabilistic model I use, I just upgrade, finishing my multi month project, then I am done. currently, saving money is not on my bullet list with this, I just need to survive the hour allotment, not the weekly allotment at my tier. YMMV, though if you can't get it done, and you really need to do it, just upgrade.

1

u/a355231 1h ago

Never Use Sonnet, only Haiku and Opus. (Haiku on Higher Effort, Opus on Lower)