Free Claude Code: Match Every Task to the Right AI Model
Free Claude Code splits your setup into a harness and a brain. Here's how per-task model routing stops you paying Opus rates for chores.

Your cheapest tasks are running on your most expensive model. Not because you chose that, but because nobody chose anything — the default quietly routes everything through the same brain, including the work that needed almost none.
A free repo with 45,000 stars fixes that by splitting your setup in two: the harness you built, and the brain you rent. Once those come apart, you can point each kind of work at the model that should have been doing it all along.
Here is the full breakdown, concept by concept.
The short version
- Harness = what you built. Brain = what you rent. Alignment = what you keep.
- By default a subagent runs on whatever model the parent was using, so chores bill at heavy-reasoning rates.
- Each model tier can point at a different provider — including free and local ones.
1. The harness and the brain
The single most useful idea here is the separation itself.
The harness is local. Your prompts, your skills, your tools, your project conventions, the accumulated setup that makes the thing useful for your work specifically. That is the part you spent months building and the part that carries your value.
The brain is the model underneath. Rented, interchangeable, and — once the two are properly separated — swappable without touching anything else.
Most people treat these as one product. They are not, and once you stop treating them as one, the model becomes a runtime choice rather than an identity.
2. Why the default costs you
Here is the specific leak, and it is not obvious from the outside.
By default, a subagent runs on whatever model the parent was using. You start a session on a heavy model because the architectural question at the top was genuinely hard. Then the session spawns subagents to do the follow-on work — and they inherit the same model.
So a one-line file rename bills at heavy-reasoning rates. So does a lookup, a formatting pass, a classification, and every other mechanical step in a long session. Individually they are trivial. In aggregate, across a working week, they are most of the invoice.
The parent model choice was correct. The inheritance is what costs you.
3. Model-task alignment
The fix is to match the brain to the job, tier by tier:
- Opus for the hard architectural thinking — the decisions you will build on top of for months.
- Sonnet for daily writing and coding, which is the bulk of the work.
- Haiku or a local model for the chores nobody should be paying premium rates for.
This is not a compromise on quality. A file rename does not get better on a larger model; it gets more expensive. Alignment means spending capability where capability changes the outcome, and nowhere else.
4. Bring any brain
Once the harness is separated, the set of available brains gets much larger than the set your subscription includes.
Connect free, paid or local models. OpenRouter alone reaches hundreds of models behind a single API, which turns model choice into a configuration line rather than a migration.
And for the bottom tier, you may not need a provider at all: Ollama and LM Studio run models on your own machine, for nothing. A local model handling the chores costs electricity, and the chores are precisely the tasks where a local model is good enough.
5. Tier routing is the real trick
This is the feature that turns the idea into a system.
Fable, Opus, Sonnet and Haiku can each point at a different provider. The tier names become routing labels rather than fixed products — so “Haiku-tier work” can execute anywhere you like.
There are forty-plus backends behind one harness, from Bedrock to Groq to DeepSeek. Which means the tiers you lean on least can quietly run on something free, while the tier you actually depend on stays exactly where it is.
The result is a cost curve that matches your usage curve instead of your worst-case reasoning requirement.
6. Setup and keys
Getting there is deliberately unremarkable: one terminal command, a few yes-or-no answers, and you get an alias to run.
Keys live in an admin panel, which is where the operational controls sit too. You can set spend limits so a runaway session cannot produce a surprise, and switch models mid-task when the work turns out to be harder or simpler than it looked.
That last one matters more than it sounds. Model choice at the start of a task is a guess; being able to revise it halfway through is what makes the guess cheap.
The master formula
- Harness = what you built.
- Brain = what you rent.
- Alignment = what you keep.
The harness is the part with your fingerprints on it. The brain is a commodity you should be shopping for. Keeping those two straight is the whole discipline, and the savings follow from it automatically.
Frequently asked questions
What is the difference between the harness and the brain?
The harness is local and yours: prompts, skills, tools and conventions. The brain is the model underneath, which is rented and interchangeable. Separating them means you can swap the model without rebuilding anything you actually invested in.
Why do cheap tasks end up on expensive models?
Because a subagent runs on whatever model the parent was using by default. A session that starts on a heavy model for a hard question keeps billing at heavy-reasoning rates for every trivial follow-on step, including one-line file renames.
Which model should each kind of task use?
Opus for hard architectural thinking, Sonnet for daily writing and coding, and Haiku or a local model for chores. Capability only earns its cost where it changes the outcome — a file rename does not improve on a bigger model.
Can you run Claude Code with local or free models?
Yes. OpenRouter alone reaches hundreds of models, and Ollama and LM Studio run models on your own machine for nothing. There are forty-plus backends available, from Bedrock to Groq to DeepSeek.
What is tier routing?
Pointing each model tier — Fable, Opus, Sonnet, Haiku — at a different provider. The tier names become routing labels, so the tiers you use least can run on something free while the tier you depend on stays where it is.
Build it yourself
Everything written about here gets built in the open — the whole application, on camera, including the parts that did not work first time.
Keep reading
open source SaaS alternativesOpen Source SaaS Alternatives: 5 Repos Worth Selling
Semrush charges $250. This costs ten.
Read article→
Claude AI side hustlesClaude AI Side Hustles: 5 That Fit Around a Full-Time Job
Claude AI side hustles work because your job already gave you the niche. Five that fit around full-time work, and the one thing that decides all five.
Read article→
agentic AI system designAgentic AI System Design: 9 Layers That Break in Production
Agentic AI system design is backend engineering, not prompting. The nine layers that decide whether your agent survives production.
Read article→