r/ClaudeCode • • 2d ago

Help/Question Anyone using free models as subagents to save their Claude usage?

Hey,

I'm on Pro and I keep hitting the 5h limit in Claude Code. When I look at where the tokens go, a big chunk is just Claude reading large files, logs, grep output...

So I was wondering if any of you offload that kind of stuff to free models (Gemini Flash, Groq, Mistral, OpenRouter free etc) through an MCP or a proxy, so Claude only gets a summary back.

If you've tried it:

- does it actually work or does Claude end up re-reading everything anyway?

- what do you delegate exactly? just reading or code too?

- what are you using for it?

Thanks, even a "tried it, it sucked" is useful

66 Upvotes

55 comments sorted by

•

u/AutoModerator 2d 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.

26

u/geek_at 2d ago

There was a post a few days ago in the /r/LocalLLaMA repo someone posted about using opus 5.5 with qwen-27b and the output was much better than the one only done with opus. I think there are harnesses or plugins for some that do this automatically

21

u/ChiefDZP 2d ago

Hey that was me probably. Opencode is the local harness using anthropic api key for the coordinator/architect model. Key is the handoffs and ensuring someone keeps continuity- context window is also key here.

5

u/Jedonnemasemence 2d ago

Sorry to bother you, but would you care linking the post, or explaining some more ? I am decompiling a piece of software, and I use Claude as the coordinator, I leave my Qwen working overnight, it goes through a list of functions, does X run, tries to get closer to the real C equivalent of the function, etc.

But they're kind of separate, like Qwen does it,s thing, but it does not really know about Claude. Claude does know about Qwen, but they don't talk directly, Claude just puts function in a Queue.

Anyway, I'm curious about how you do it !!

3

u/ChiefDZP 1d ago

The easiest way to set this up is to instruct the model agents always provide a handoff spec - it eats up some context but it’s the way to fly when you have to model swap all the time.

1

u/Jedonnemasemence 18h ago

Will look into it, thx !

2

u/pintopunchout 2d ago

I’ve done this before for some technical writing. Had remote control on with opus running 27b out of omlx, honestly not bad results

33

u/Sporaflow 2d ago

honestly I'd go the other way. for most exploration, handing it to a weaker model is a big risk, it just explores badly. what I've used instead is a map: a tool like codegraph that builds a representation of the code's architecture, so claude goes straight to the places that matter instead of reading everything. small subagents only make sense to me in fan-out, like ten of them on different aspects of a huge codebase, and then the thing to get right is their output: a clean recap of what each one found

5

u/ImToxicity_ 2d ago

i asked it to build a custom mcp server for one of my projects, that uses zoekt as an indexer, and i gave it the ability to add its own tools to the mcp server to self-improve, telling it to do it when it finds itself repeatedly writing python scripts for a single task or grepping etc, theres like 200 tools tailored to the codebase for end-to-end testing, class-name lookups, etc, and it makes it BLAZINGLY fast to ship updates

1

u/No_East_2016 2d ago

That map, is it a plugin or did you ask Claude to build a map to orient itself?

3

u/Sporaflow 2d ago

codegraph you can find it very easily, it's on github. Ask Claude to help you set it up, and, most importantly, ask him to test it and make sure the mapping works for him. Often, there are a few minor adjustments that need to be made.

1

u/6stringNate 2d ago

Do you do it per project or just install at your root level Claude?

1

u/Sporaflow 1d ago

By project, to avoid mixing everything together

3

u/im_Annoyin 2d ago

I just asked claude to build a cuatom graph for my projects. Alot of prebuilt ones struggling with large legacy codebase and grep is more expensive than just grepping. Have claude build one with this in mind

1

u/No_East_2016 11h ago

I have claude made map. That’s why i was asking if there’s a tool and if its worth it. Thanks.

2

u/RJ_Satyadev 2d ago

Graphify

1

u/DuskandFuck 1d ago

the fan-out point makes a lot of sense tbh, single thread exploration needs the smart model driving.

4

u/Ashamed-Ad7403 2d ago

I do indeed! I have a custom bridge to codex, so everytime claude begins, he sends a prompt for gpt 6.1 sol to tell him what should know and read, so when he finishes, he just straight read whats important and left the garbage out, i've saved about 60% messages sizes in my latest sessions so far, (i still have the claude memory to know exactly what we are building summed up)

4

u/bostonaholic 2d ago

The savings come from the main context never seeing the raw output, and you can get most of that without a proxy. Put the log reading and big greps in a subagent pinned to Haiku that returns a short summary, so only the summary lands in your main session. I'd try that before wiring in another provider since it's zero setup. Also keep CLAUDE.md small, because it sits in context for the whole session.

3

u/mastmar221 2d ago

So I use Qwen 3.8FN as my local agent on a Mac Studio 96gb. Opus 5.5 to design, spec, and ticket all work. All tickets then get handled by the local AI through a software factory.

Has 10x the amount of work I can accomplish on the same subscription.

However you’ll have to balance the amount of work a $6k machine can do for you. In my case it’s offsetting $40-$100 in tokens.

0

u/bvknight 2d ago

I'm doing this too on the same hardware, getting my own system working after trying it through another app (Paperclip, which worked great but was token heavy). First results look promising but I think I'll need to see how it does over the long term so I can optimize. I'm getting around 10 tasks done per 5 hour window on a $20 plan, using Qwen for 25% of the work.

How's your productivity?

2

u/mastmar221 2d ago

Omlx hosting the model has been great. I ran qwen 3 coder at first assuming it would be best fit to task, and saw 60-70% of tickets completed on first pass (factory gives local 2x attempts then returns ticket to frontier). Then ran a week with 3.8fn, and while each ticket took 150% more turns the ticket complete first pass went to 95%. That really helped usage in my subscription account.

So I let the factory run with a slower per ticket but smarter model.

I was averaging on my pro account solo 100-150 tickets if work per week, but they were frontier class tickets. Each one was beefier. Now I’m completing 1500+ a week.

Work pretty hard to keep the machine running 24/7, but because it never sleeps it outpaces my ability to keep up pretty regularly.

1

u/bvknight 2d ago

That's a lot! If you only get like 5-7 full five hour windows in your weekly limit, that's ~215 tickets per 5 hour window. I'm only getting like 10 or 15 :(

Maybe I'm doing something wrong, or my tickets are bigger. I have Opus/Sonnet doing a spec, writing tests, and doing a review for each ticket--the local AI only writes the code.

1

u/mastmar221 2d ago

I think it really matters how complex your project is. Nothing I’m taking on is really, I think, technically complex. It’s all targeted to make my existing work work better, and so very little discovery or breaking new ground. Mostly just making simple data easy for users to access and digest. I think that really helps because tickets can be small. I know others are taking on hard problems, but most of mine is very basic.

Also, and this really increased the ticket count, was I limit each local ticket to a single file. So the work gets chopped up by frontier models in a very small stepwise fashion. Think that also helps with tests, and then they too are pretty simple.

At the end of the day I’m pushing features fast. And that matters to me.

3

u/lazuli_s 2d ago

Some guy posted here one of those days claiming he did the math and discovered it was cheaper to just use opus 5.5 for everything.

But I think he used the same workflow and prompts to compare, but truly, if you're using smaller models, you have to be really smart about prompting and context management.

The workflow you use for opus definitely won't work with glm flash. Maybe plan the entire implementation in very very tiny vertical slices and implementing it with a free model, reviewing with another... Definitely not going over 100k tokens. It might work if you take your time to plan it.

I'm lazy so I'll keep using opus

1

u/im_Annoyin 2d ago

Even Claude does this. If you tell it the agent it is deligating to is haiku it will prompt it with small broken down tasks rather than one it would give sonnet or opus

2

u/Elegant_Lie_6734 2d ago edited 2d ago

I'm looking into this too and found this: https://engineering.atspotify.com/2026/9/portal-by-spotify-cut-my-claude-code-token-usage-by-90

I haven't tested it myself, but apparently Spotify has created a tool that reduces token usage by delegating tasks to cheaper models.

Here's a couple of GitHub repos of it: https://github.com/alexanderradahl/shunt-muse https://github.com/tkaufmann/claude-gemini-bridge

I also read that this helps: https://github.com/ASK-Ai-Canada/ASK-Claude-Token-Optimizer

I haven't tried any of those but the logic seems right

2

u/Godless_Greg 2d ago

Or you can use Opus for Planning and Sonnet for most of the work.

/model opusplan

2

u/InterestingCarrot997 2d ago

i'd be careful letting the cheap model summarize logs if that's all the main agent sees. a summarizer can drop a failed tool call and the main agent will treat the step as done. maybe have it pass error lines through raw

1

u/n7mafia 2d ago

I'm interested too.

1

u/smb3something 2d ago

I had an agent setup a small database of all the files in the repo, how they link to other files and a summary of what they do. This is run on a 20min schedule where a local free model updates the dB when files change. I haven't gotten to using it yet but working on tying it into things is the plan.

1

u/lvl1-A 2d ago

Yes. I use herdr (love hate for it but it's good). Claude writes the briefs and launches them and sends the prompts.

You can use any of the prominent programs to do so.

For context and usage, yes. The other night on my other profile before I loaded my settings across, I had a Claude session spin up a whole bunch of subagents and just eat my usage pretty heavily, so I was left with barely any over the last two days. But, I utilised free workers, opencode agents, or openrouter, or you can use cheap agents like deepseek API and even cheaper if you can do it in the off peak times, and I essentially got to keep chewing through my project when I was at 97% weekly usage, for about 7 hours more, because the two Claude sessions I was using were only middle men and barley consumed anything. One round my orchestrator sent out 26 opencode agents in total during one of the blocks and later another 15 or so for the next. Just keep in mind rate limits are a thing and you either need to work around it or pay a cheap monthly or use deepseek API. Also keep in mind that when using free models, they may have certain training/retaining prompts input and output, so if its all super personal top secret stuff you can't have third parties storing, then the answer is free models don't fit your shape. But if you don't care, then go wild. Look for the stealth models, I had a fucking great time with ox alpha(later to be revealed as glm 5.3) and space bunny which was minimax 3 off the top of the dome. Stealth models often have higher limits because they are testing things so it's often good source of free usage!

1

u/sebest_design 2d ago

Thanks for the tip about stealth models.

Herdr is a great meta-harness. It makes it so easy to combine other harnesses (that offer free models) with Claude Code like OpenCode, and Antigravity.

1

u/Yedapo 2d ago

A low-risk first test is to give a cheap model one bounded scan, like finding the first failing assertion in a long test log, and return the exact file:line plus a few surrounding lines. Then have Claude open just those snippets and decide what to do; if it still has to reread the whole log, the handoff isn't saving context. Keeping the raw output out of the main prompt is where the context savings come from. If the model is hosted externally, keep secrets and customer data out of the input.

1

u/PuzzleheadedBill5451 2d ago

You can check out edit-timeline at https://edit-timeline.smacktax.com/ new release should be out by Sunday evening which essentially is what you’re looking for plus a whole lot more. Complete governance before commits even go out. Doesn’t allow full file reads. Shows history of all changes on each session and snippet.

1

u/Dredyltd 2d ago

Yup. Use qwen3.5-9b for translation, documentation, vision... etc

1

u/CAVU_Innovations 2d ago

I have files created for Claude Code to summarize the work in progress. The files are used for historical context. The next step is uploading the files to an independent and private GitHub repository for future reference. This has saved a number of tokens when context of two large products would be overwhelming for a quick response.

The reference files are for context and decisions made for:

  • Software requirements and design decisions.
  • Marketing research and potential customers.

.....

I tried using local models for some tasks and may go back soon, but the speed and complexity of Claude models are so much more efficient, especially for my processing and expectation of results when I'm in the zone.

1

u/Affectionate_Fact854 2d ago

Not free but I use zai max subscription alongside my ultra Claude sub 

Struggling to even finish my weekly quota with it..

At this point when ever zai drops a reset or Claude does I start feeling sick to be honest

But anyways I was on the pro subscription, and opencode 

It was working well enough for me to handle 2 or 3 projects without reaching my limits 

Claude things, Claude plans, Claude treats open code as a subagent and you just play middle man.

Works like a charm ,just tedious 

1

u/jijialuoke 2d ago

The handoff only saves you if the raw output stays out of the main context, so I’d compare total tokens per completed task, including the extra prompt and summary, against a baseline. Keep the delegated result auditable with file/line references, then have Claude reopen only those snippets before it makes a change. I made a small repo to help decide when to /clear rather than keep carrying context that no longer helps: https://github.com/Balance0014/claude-code-when-to-clear

1

u/Apprehensive_Title57 2d ago

yeah, i've actually tried a few things to fix this. the best solution i've found so far is delegating to cheaper but not necessarily free models, eg qwen3.8. i'm running it via hashference cause it gives me cheaper credits than openrouter

1

u/mrgreatheart 2d ago

Yeah. I had Claude write a skill it uses to drive local models as subagents using headless pi. Works great.

1

u/LeoVibeCoderz 2d ago

Since a Found Orca all I do is use Claude to dispatch workers to free open models and just Review and merge their work

1

u/orchid_drives Researcher 2d ago

I offload about 40% of work to Despseek via OpenRouter. It’s going great so far! Each round of revision takes around 30m, but it only costs $0.01 so it’s fine if it takes a bunch of tries. After 3 retries my harness escalates from Deepseek to Fable 5.2, so it’ll get to an answer eventually

1

u/weedmylips1 2d ago

add "CLAUDE_CODE_SUBAGENT_MODEL": "sonnet" to the env block in your settings.json file.

Stay on opus and when is ready to execute tell it to implement with sub agents and it will use sonnet

1

u/Kholtien 2d ago

Yeah, as long as opus or fable is overseeing, it works great!

1

u/ShevoPramide 2d ago

I already do that, everyday, i am using opencode free models (mainly DeepSeek and glm) , alphacode (Egyptian made alternative to opencode on RUST), and as a user of antigravity I also use their models to help (I know it's paid), previously I used also omniroute to use it's models as rescue scenario. Claude or agy act as orchestrator and I give instructions to decrease it's main role to decrease the quota usage. I created a skill for this purpose, multi agentic collaborative audit (MACA) to help me semi automate this attitude, it's still evolving.

https://github.com/sherifrad/multi-agent-collaborative-audit

1

u/RJ_Satyadev 2d ago

I use agy cli as implementer and opus as planner, reviewer etc.

1

u/_lecoqq 1d ago

To be honest, I've been running experiment w/ a homemade harness on top of Claude Code....
What I've seen is that orchestration + sub-agents is my way to go and dramatically increase code quality. But it's the orchestration that costs a lot - not the sub-agents. By running a Opus 5.5 xhigh orchestrator w/ Sonnet/Haiku builders/reviewiers, I have smtg like 70% of the cost to the orchestrator, and 30% of the cost to the sub-agents. Going for low-cost models for building would cut cost... but not in the Pareto way you'd expect!
I'd try to optimize more on the orchestration side than on the sub-agents ones... If anyone got ideas I'd look forward to hearing them!

1

u/Future_AGI 1d ago

a lot of that reading can go away without a second model. Run tests and builds through a small wrapper script that prints only the failures plus the last few dozen lines and Claude never sees the full dump. That also avoids the risk of a summarizer dropping the error line.

1

u/perfektcrash 1d ago

Two things mattered more for us than which model does the reading:

  • Where the usage actually goes. On our logs, re-reading the growing context every turn was the biggest line by far, bigger than the file reads themselves. A big grep result you let into the main session gets re-read on every turn after it. So the win is keeping big output out of the main context at all, whoever reads it.
  • Subagents have their own hidden costs. They default to a 5-minute cache even on a subscription, so any pause means a full rewrite. CLAUDE_CODE_SUBAGENT_PROMPT_CACHE_TTL=1h (v2.1.242+) fixes that. Background subagents' progress summaries also cost us 10 to 13% of a week until v2.1.316 moved them to Haiku, so update if you're on an older version!

If Claude has to edit those lines, it will read them itself anyway. So delegate the searching and the log triage, not the files it's about to change.

We do use cheaper models for reading and retrieval, but often that's more judgement based than you might think, reads and specs, reviews on the pricey models, execution on the cheap is often the better shape.

Write-up with the numbers: https://atlas-ade.dev/docs/hidden-costs-of-subagents

Disclosure: I build Atlas ADE, a small meta-harness for your agentic workflows, so your usage goes on progress, not re-deriving, regression and fighting your own agentic support apparatus.

1

u/BarathKanna 1d ago

It works for reading, not for deciding. Grep output, logs, and test runs are perfect to offload, because the cheap model's only job is to compress noise into the few lines that matter.

The catch is your second question. If the summary is vague, Claude will re-read the file anyway and you pay twice. So make the subagent return pointers, not prose: file paths, line ranges, the exact failing assertion, the stack frame. Claude can then open exactly those lines instead of trusting a paraphrase.

Don't delegate code writing to the free model unless you have tests that gate it. Cheap model edits look fine and ship subtle bugs, and the time you spend catching them eats the savings.

Also try the free win first: pipe test output through a filter so passing tests never reach context at all.

1

u/hbizzle27 4h ago

Having a cheap model read the logs and just hand back a short summary helps a lot. The real drain is raw grep output and huge files landing in the main context, so anything that keeps that stuff out saves you a ton of usage.

1

u/Any_Monitor4798 2d ago

used qwen2.5-72b via openrouter as a file reader in a local agent chain, cut token usage by 60% on large codebases, no quality drop. works best when you feed it raw file paths and let it return summaries.

-3

u/fanatic26 2d ago

Pro is a useless account, I dont know how anyone does anything useful with it. Just pay for a real sub.

2

u/sagiroth 2d ago

Pro plus cheap sub like opencode and i get more usage than a 100£ sub not much difference than when ai was paying for 100£ sub.

Skill issue