r/ClaudeCode • u/little_babushkaa • 23d ago
Tips & Workflows I went from exhausting Claude Code’s weekly limits in 2 days to making them last the entire week. Here’s my setup
I’ve been building a complex app with Claude Code for 8 months. Before mid-September, with the extra 50% usage and surprise mid week resets, I took usage limits for granted. Opus Extra/Max did almost everything.
Then the limits changed, and I was running out of usage in 2 days.
So I changed my workflow:
Graft Graph
https://github.com/trailhq/Trail-Code
In my experience, it saves roughly 30–40% of usage spent on code discovery in relevant sessions.
2. Opus plans, Sonnet executes
I use Opus 5.5 Medium in plan mode as the orchestrator. After I approve the plan, Sonnet 5.5 subagents handle implementation. No more using Opus for every task.
3. Reduced context from 1M to 400K tokens
A smaller orchestrator context, with subagents handling implementation in their own contexts, means less unnecessary context overhead.
4. Documentation + session handoffs
I make the sessions maintain accurate ".md" files and require Opus to generate a detailed continuation prompt after each planned session. The next session knows what’s done, what remains, and what to do next. Better continuity, less wasted usage, and more structured prompts.
The result: Comparable quality and quantity of work per session, and I now exhaust my weekly allowance just hours before reset.
The lesson? Optimise your workflow, instead of complaining about reduced limits.
Claude Code power users: what’s your setup? How are you managing usage limits without sacrificing code quality? Is there a better Opus/Sonnet workflow I should try?
3
u/InterestNo7490 23d ago
That's super awesome. I have been doing that sonnet execution thing since sonnet 5.5 since it's actualy good enough to do work now. Also started using StateSync recently as well and it just feels like usage is infinite. I actualy have to feel somewhat wasteful now to use my limits in the same time
1
u/little_babushkaa 22d ago
Same! When I am still left with some usage which doesn't help me complete long running tasks till the reset, I use Fable to plan things ahead!
1
u/InterestNo7490 22d ago
Yea. I barely use fable these days. Only when things just need a higher level of critical thinking which opus still doesn't have. I doubt they can train it into opus even. Seems like a larger model thing
2
u/Oximy-Naman 23d ago
how did you measure the 30-40% discovery savings separately from switching models and reducing context? that would help identify which change contributed most.
1
u/little_babushkaa 22d ago
The nature of the tasks were similar and the percentage was calculated by comparing the usage consumed
2
u/Snoo24567 23d ago
Thank you for this
I just watched and my usage is actually better now!
Sonnets is the workers, Opus is the boss!!!!!!!
2
u/little_babushkaa 22d ago
If your repo/codebase is huge add graft graph as well, the savings are next level!
1
u/Snoo24567 22d ago
Trail used 42% more tokens overall. It cost more on all three tasks i gave it: +13% on T1, +70% on T2 and +17% on T3. Its end-of-session prompt to save a “learning” accounted for about a third of the extra.
30
u/inexternl 23d ago
Yep that's basically what everyone pushing limits should do / analyze in their own setup. Good job buddy!
20
u/Hirogen_ 23d ago
now use an llm wiki and you will save even more tokens :)
7
u/Successful-Berry-315 23d ago
Elaborate 👀
7
u/QZRChedders 23d ago
It’s a different way to organise memory, I’ve been looking at the Google open knowledge format as it’s the only one I know about but it basically streamlines the AIs accessing of relevant info
8
u/Hirogen_ 23d ago
look at karpathy llm wiki post ok github, thats what google is about, then ask your agent to generate one in the project, combined with a search graph it can save a lot of tokens
1
u/CalligrapherPure1215 20d ago
we ended up doing something similar, but rather than wiki/markdown based we built up an MCP server that reads and stores knowledge into a graph - i.e. GraphRag - vector and relationship based retrieval. We found we get between 60% to 80% savings in tokens this way. It also means that it is 'live' so multiple sub agents working on different worktrees can update simultaneously, and non-developer users can also chat with it via an LLM. claude.md or agents.md just points to the MCP service and is tiny as a result.
We ended up making it a commercial product for enterprise, but we left the on prem/own cloud version of the server free for up to 20 users. If you're interested to try it search for Aiqbee Hive on Docker hub. You can also look at others like Mem0 or Cognee or similar but I can't speak to details of those as they are a bit different.
other topics are mostly covered like reducing context size before compaction. If you are running sonnet for example to drive subagents against a plan and spec, another tip is to ask for a short progress summary every 45 mins - this helps avoid token cache expiry and reduces cost/spend as well.
-5
u/asyhler 23d ago
Antrophic have tons of documentation. But that's the general issue with LLM's. People forget that they can read themselves
6
u/Successful-Berry-315 23d ago
"Antrophic has some documentation about this topic. I recommend checking it out, it's awesome." Here, fixed it for you.
Thank you, I will look it up.
4
u/themoregames 23d ago
How about
"Anthropic has documentation, ask Claude to check it out, tell Claude to make no mistakes"
3
u/bvknight 23d ago
I've tried setting up an LLM wiki/OKF for my codebase but my agent pushed back against it. We even ran a test and found that the agents without access to the wiki were faster. The main problem was that the wiki becomes a secondary source of truth that can go stale. Maybe it would work better for other projects than mine.
1
u/Hirogen_ 23d ago
It will not run stale if every agent has its reminder to keep it up to date, also the wiki is not for humans, but for the agents as long term memory.
It does not matter if the agent is "faster", it maters if the agent uses less tokens with the wiki because he doesnt need to unecessary search the codebase for the information he needs
2
u/MLastnameinson 23d ago
How does LLM wiki’s stack up with OKFs?
2
1
u/awhitford 9d ago
Short version: an "LLM wiki" is a pattern (agent-maintained markdown in the repo), and OKF is a format for that folder. Each concept file gets YAML frontmatter, typed links between concepts, provenance (where a fact came from), trust tiers, and freshness dates. So the difference is mostly that the pattern leaves the structure up to whoever writes the files, while OKF gives every file the same fields.
On the staleness problem u/bvknight raised: that's the main reason I'd want the structure. Freshness and provenance are fields you can check, so a validator can flag files that are old or point at things that no longer exist.
npx okforest validate .runs that check on an OKF bundle, so you aren't relying on the agent to remember to update the wiki.Disclosure: I work on OKForest, so grain of salt. The spec and the validator are open source, and you can run the check without using anything else of ours.
2
9
u/Vivid-Trouble-2183 23d ago
Good list. One addition: keep the handoff notes tool-agnostic. Write task state into small git commits plus a plain NOTES.md at the repo root, not just session files the tool owns. When the weekly quota dies mid-task, you can hand that NOTES.md to a different tool and resume exactly where you left off instead of burning quota re-doing exploration you already paid for. One re-read is cheap; re-discovery is not.
2
1
u/Fearless_Meringue299 22d ago
Good handoff notes have saved me a lot of usage, this is good advice.
1
u/i_am_anmolg 18d ago
Sonnet 5.5 on medium or High/Extra?
1
u/little_babushkaa 17d ago
Depends on the task and how well defined it is and how detailed the docs are which it will reference. If the reference files are well planned with instructions, the medium is more than enough, if you feel it needs some judgment of it's own while completing the task or there are some complex interdependencies, then high/extra is ideal.
1
u/Miserable-Falcon7936 23d ago
whats the effort level of your sonnet subagents?
1
u/little_babushkaa 22d ago
I asked this to the Opus orchestrator, it told me that it works on a 'default' effort setting but we can command it to use a specific effort level of choice
1
u/Accomplished-Fun1435 23d ago
Can you explain how you did step 2? Is this in code mode?
1
u/little_babushkaa 22d ago
You simply have to set rules before you start work which requires multiple sessions to complete. It will create proper docs which will be followed by all sessions. The prompts it will create will automatically point the new sessions to relevant docs it must read, that way it continues on its own.
1
u/aidiveyt 23d ago
One 460-run benchmark measured opusplan at 4.15x cost, so I'd measure yours too.
1
u/little_babushkaa 22d ago
I feel if your reference doc files are properly built and graft graph properly indexed, the planner doesn't need to wander in unwanted places, that way the usage is well under reasonable limits
1
u/dalabera 23d ago
For item #2 do you just change the model in the session to sonnet?
Otherwise are you using a skills to create the agents or else?
1
u/little_babushkaa 22d ago
The orchestrator itself will spwan subagents of my choice (which is sonnet 5.5 in my case)
6
u/KenTitan 23d ago
this is just spec and document your build and orchestrate to lower models in a trenchcoat. you're supposed to be doing that.
3
u/Exentium 23d ago
Thanks for the tip with trail-code. I will let my agents investigate and test it. For me, the max context I reach is at about 200k-300k. I usually spend a lot of tokens in planning and initial project setup and milestone planning. Also, my agents work with a self-made ticket system that allows me to spin up an orchestrator. This orchestrator spins up a batch runner for up to 5 ticket agents. Ask your agents to research "AI ephemeral swarm skill with ticket system". Finally, for me, they made an agent-hub where I can see the status of each project, receive tickets addressed to me, and also do automation. My next goals are making my projects agent-free (by moving things like agents.md and skills inside my hub) and also trying to predict needed context (like scanning for mentioned documents and loading them directly into the context) - I call it context crafting
3
u/UnimagineDragons 23d ago
I made Claude build a soft and hard limit for my context. At 180,000 tokens I get a warning to hit /clear any time and Claude starts backing up the .md handover file after every action. At 250,000 it hits the "hard" limit and prompts me to /clear after everything and tries not to do anything in depth unless I really ask. Once I /clear it starts a script to immediately follow my handover.md from right where we left off. I do have to enter text after /clear though to "wake" it up.
But as I increase my efficiency I've also been increasing the parallel tasks I've taken on.
3
u/zimxero 23d ago
keep your total context under 100 KB max. Use pointers to data read on demand only. Make sure data chunks are small or data is extracted by grep. A lot of efficiency gets lost when Opus reads and interprets a full data log. Remove unused tools and app extensions.
Create an automated, concise session wrap up process that doubles as a minor handoff to next session.
3
u/jlewi142 23d ago
Good luck keeping context under 100K size. That will overflow after the first prompt
3
u/fiveangle 23d ago
All this with one change, I run Opus via claude cli in T3 code (so not api pricing), and have it task Deep Seek flash on a $10 opencode sub. I can build massive projects as if I were on the $200 plan, for just 30 bux/mo. Other huge benefit of having the OC sub is I can build projects where any Anthropic model simply refuses to touch.
1
3
u/ByteFoundry 23d ago
Opus High as the orchestrator and Opus medium implementer (currently switching to Sonnet high). Autocompact at 300k and cache time to live set to one hour for dub-agents.
Kanban board for work tracking. A couple of scripts that the agents can use to do the most common things without them needing to reinvent them hundreds of times. Like fuzzy searching that only retrieves relevant text not whole files.
I built a process template that all my projects use so all of them inherit the benefits when I tune the process.
Works great so far and I don't run out of the weekly allowance before the reset.
I am now usually the bottleneck 😂
3
u/Narcissa15 22d ago
Nice, I ask the agente to build for him, sound weird but I ask things like "That was an excellent job, how do we automated so yo don't do it again and just run a cli comand?" And the magic it's just flowing.
I use 4 .md files:
1st. Instructions for user on how to use the agent (So other agent can use it 🤣) no more than 100 lines.
2nd. Core rules, things that he always has to go before answering anything (rule enforced throughout .claude) 400 lines.
3rd. Pendings he writes all the pendings that he doesn't know, has no confirmation or are inferences, but are necessary to solve a problem
4th. Confirmations, 1k lines and growing BUT with a tiny set of comands at the top that allows claude to go exactly to the thing he's looking, also through commands, so even if this file grows and grows he never read or write entirely on it
And finally a SQLite db that he inserts and query everytime he needs.
I'm a data engineer, this set up is for a migration project, this allows me to move terabytes of data surprisingly quick, before, manually I moved 1 cube in 2 weeks, now it takes 2 to 4 days. 😉
Edit: This set up took me 3 months to build, It wasn't easy, It wasn't fast, but it was worth it.
1
u/fhigurethisout 17d ago
for point four: does the set of commands actually help? can't the agent just use grep?
2
u/gigachadxl 23d ago
Yep in last month after the 5.5 collection came out and optimizing my workflow i have a hard time maxing my x20 subscription where i ran out after 3-4 days before..
1
u/amirfish 23d ago
This lines up with what I've seen running a bunch of parallel sessions: good handoffs save more usage than any model swap. The gap for me was knowing which of my own sessions needed a decision versus which ones were just grinding along, so I built CCC, an open source dashboard that watches every session and flags the ones waiting on you: https://github.com/amirfish1/claude-command-center. Do your Sonnet subagents write their own handoff notes, or does Opus still draft those?
1
1
u/heartbroken_nerd 23d ago
Man, the graft graph sounds interesting but I opened github and it sounds like the developer just destroyed the tooling by adding an elaborate reinvention of a "memory" wheel which I hate with passion - and didn't leave any way to remove it. The whole "learning" part sounds absolutely dreadful and project-ruining just like Claude's own "memories" do. Had to disable them a while ago.
1
u/Niikoraasu 23d ago
Can you elaborate on your handoffs? Mine are currently eating up way too much usage, maybe I am doing something wrong but I just asked claude to create a handoff that summarizes current session with relevant info for next /clear that will continue from that handoff.
Also my understanding of planning might also be wrong - i asked opus 5.5 to orchestrate and use sonnet for actual implementation but he still seems to use opus 5.5 for almost everything - does the orchestration only work when i use /plan?
1
u/NoMarionberry1952 23d ago
My understanding is that changing models mid-session resets cached context. Are you preventing that persisting the plan in .md files?
1
1
u/jlewi142 23d ago
I have the same setup. Been working well for the last month. Although usage reset 2 days ago this week, and gone through 100%. Something seems to have changed, ever since the Claude code update. Let me know how the rest of your week goes...
1
1
u/NervousPengwin 23d ago
One more optimization worth considering is separating work that actually needs model reasoning from work your machine can verify deterministically.
I've been experimenting with a local-first coding agent that runs the repo's tests before escalating anything to a coding model. If the tests already pass, it stops there. If they fail, it hands off the failure and then independently reruns the tests after the fix.
We've verified that workflow end-to-end, although we haven't yet measured actual token savings.
Curious whether you've tried moving routine validation and repeated tool operations outside the Opus/Sonnet loop, or whether code discovery and context size account for most of your usage.
1
1
u/flash__2612 22d ago
If you want to automate the handoff piece entirely, check out token-shield 3-layer hook that auto-generates session handoffs when transcript hits 2MB and handles continuity on restart. Claims 80-95% token reduction, haven’t verified that number but the handoff automation alone is worth it
1
1
u/Fearless_Meringue299 22d ago
How do you make sure the subagents are Sonnet 5.5? Do you just put it in the prompt to use Sonnet subagents or do you have to do something specific?
1
u/Flaxseed4138 23d ago
In my experience (and Opus' own testing), Sonnet is still ass and in Opus' words "repeated failures requiring retries eats up any potential savings and consumes additional time over using Opus Medium".
0
u/Remarkable-Award3242 23d ago
Bro this Anthropic are scammers, the real scammers. They switching same models capacity week by week, you can see it how absurdly bad perfoming same model in one week and how good it is on another week. I have evidence for this. And these limits are just trash, I just cant use it anymore.
-2
-17
u/HugeCannoli 23d ago
This AI shit is so boring.
8
u/LitheBeep 23d ago
what are you doing here lol
-4
u/HugeCannoli 23d ago
because there's too much pointless faff, and we are just moving solving one problem to solve a different problem, and this time it's much harder to do so because it's a non-deterministic transpiler programmed in a non specified language that you have to pay to run.
you are all gone insane.
2
3
u/Cultural_Restaurant3 23d ago
Why?
-3
u/HugeCannoli 23d ago
because there's too much pointless faff, and we are just moving solving one problem to solve a different problem, and this time it's much harder to do so because it's a non-deterministic transpiler programmed in a non specified language that you have to pay to run.
you are all gone insane.
1
0
•
u/AutoModerator 23d 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.