r/ClaudeAI • • 3d 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.

25 Upvotes

26 comments sorted by

38

u/OGLeap 3d ago • Bravo

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

4

u/Party_Till_I_Die 3d ago

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

0

u/OGLeap 3d 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

3

u/Southern_Performance 3d 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

2

u/OGLeap 3d 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

1

u/Kroosn 2d ago

I use both and they have different instructions. Claude is for implementation, agents is for codex to review or research. I find splitting the tasks and agent file lets each be more targeted.

1

u/scoop05333 3d ago

Thanks!

1

u/Ixemile 2d ago

As a pure newbie that discovered claude code in cmd two days ago, that's some great things to learn ! I had the stupidity of starting in the app and after a looong chat and couple of apk builds, the session cost me 180M tokens...

I quickly started to ask what it needed in plan mode and it helped a lot

Still I have some question, when would you /compact instead of /clear ? From what I understand, /clear equals a whole new session, while /compact allows you to reduce what's re-sent (or re-read) to a short summary. If I heard you right, for good practices: when working on a website or app and doing different changes (UI, content, options..), these should all be done on individual sessions, preferably run on sonnet and referring all to the same .md . Then let a opus model review and build ?

2

u/OGLeap 2d ago

180M in one session hurts but yeah, everyone has that one. you got it mostly right:

  • /clear = clean slate. use it when the next task doesn't need anything from the current one
  • /compact = keeps a short summary of the session and drops the rest. use it when you're mid-task and the context is getting long but you still need what you figured out (which file, what broke, what you tried)

on your workflow: separate sessions per change is good, and keeping the shared stuff in one .md is exactly how to make that work, every fresh session reads it instead of you re-explaining. sonnet for the building is fine. i wouldn't make an opus review step a rule for every change though, use it when something is tricky or you keep going in circles, otherwise you're paying twice for small edits

1

u/Ixemile 2d ago

Thanks for this ! This sub is a bit overwhelming as a newbie so your input is really welcomed 👏

1

u/TheJoshuaJacksonFive 3d 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.

3

u/OGLeap 3d 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

6

u/New-Paramedic7176 3d 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 3d 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

3

u/OGLeap 3d 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 3d 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 3d ago

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

1

u/Key_Reporter3816 3d ago

Totally get this — on the $20 plan the week runs out fast, and subagents feeling more expensive is real, not just you. In my experience they only pay off when the tasks are truly independent and each one is big enough to justify its own context. For a single website, one focused session usually wins. What helped me most was boring session hygiene: start a fresh session per feature instead of carrying a long chat, ask for small changes one at a time and check the diff before the next step, and keep a short note of what the project already does so I don't re-explain it every time. For routine edits and quick checks I also switch to the cheaper/faster model when I can — the big model is worth saving for the tricky reasoning parts. That stretched my week noticeably more than any orchestration trick did.

1

u/pitch_witch9 3d ago

I installed the superpowers plugin and use it for all work. I also installed Skills for Real Engineers. Every time I start a task I start in plan mode, and ask for a superpowers team where each worker has a dedicated slice, is equipped with a relevant skill and has a dedicated model, and that any worker that could reliably be assigned to Haiku should be set up that way. I also ask for any open questions to asked before presenting the plan. This has dramatically lowered my token consumption. I have a 20 usd plan privately and a larger enterprise plan for work. I rarely run out privately and pretty much never at work.

1

u/pitch_witch9 3d ago

I also make sure to compress more than Claude will do automatically if I can’t start a new session.

1

u/ivanjxx 3d ago

i delegate large code exploration to cheap models like deepseek and limiting max context window size

1

u/Silent-Sprinkles-751 2d ago

Skip subagent; they usually cost more total tokens. Instead: /clear between tasks, keep a short CLAUDE.md with your stack and commands, name exact files in your prompts, and switch to a cheaper model with /model for easy edits.

1

u/TonkaTown 2d ago

I’m new to Claude and just made a website all contained within a project. I have it connected to my repo direct. Am I using more tokens by using the same project as I iterate or add to my site? Anything from these tips I should be doing in that space? Thanks in advance!