I Ran Out With Hours Left
I ran out of AI usage with hours still on the clock, refused to pay for the next tier, and ended up building a layer that chooses the model for me.
I spent my Codex usage and still had four hours to go before its five-hour usage window refreshed. I was in the zone. I did not want to stop.
The Claude weekly limit had already put me three days from a refresh, and Codex was halfway through its weekly allowance with six days left. I do a lot of work with AI, and once again I ran out. I did not want to spend more. The next tier up felt like too much pressure to maximize, because paying that much turns every idle evening into a small failure to use what I bought.
So I did what I usually do when something annoys me enough. I built infrastructure.
This continues The Loop Outlives the Model, where I explained bringing DeepSeek in when both plans ran out. This is the short story of what came next. How the Model Intelligence Layer Works is the technical one.
The loop this layer sits on, from Set Up the Loop With One Prompt: a plan, a session with the checklist first, a report, a second reader, and me. The model is not one of the pieces, which is why it could become a decision.
The night I went looking for a way out
The first thing I tried was running a model on my own machine. I have an RTX 3050 with 8 GB of memory. It runs small models fine and runs the ones I would want for coding badly, and a coding model that is worse than the one I am paying for is not a saving, it is a hobby. I put that idea back on the shelf for a year or two.
The second thing was free models online. They exist, they are better than I expected, and the catch is printed on the label: a free endpoint may keep whatever you send it. I decided I could accept that trade for my own projects, where the code is public anyway, and for nothing else. That decision is the most important one in this note, and most of what I built exists to enforce it.
None of this was a new idea about the work. I already handed light work down from Sonnet to Haiku, my smallest Claude model, before I built any of it, so the strong plan was never doing everything. The free models are one more rung on that same ladder, at the cheap end. What is new is that the rung costs nothing and the ladder now crosses providers.
The split from Plan Big, Type Small: Opus plans and reviews, the smaller model types in between, and the files it reads stay down there. The layer only makes the bottom lane cheaper.
The old setup and the new one
Before this, Claude Code was my main tool, the Codex app was the backup and the way I ran a second project, and DeepSeek Harness, which I call DSH, was the last fallback when both plans were out. Making those three work together is what The Loop Outlives the Model was about, so I will not retell it. Here they are side by side with where each role sits now.
The same five roles, before and now. The heavy outline is the change that matters.
The new shape has fewer programs and one decision-maker. A few things about it.
- Claude Code is still where I work when I want Claude.
- OpenCode does all my coding outside Claude. Codex usage, a free model, a small monthly plan and the DeepSeek API all plug into it directly.
- Anthropic's own plan cannot plug into OpenCode: in my testing, it lets another harness in only through an API token billed apart from the plan. Codex lets its plan in directly, and Claude Code is a good harness for Claude anyway.
- I stopped using the DSH app and put that side on hold. Fewer apps is a feature.
- I kept the Codex app, but for work that is not coding: the ChatGPT side, and anything at work.
The decision-maker is the thing I am calling a Model Intelligence Layer: the part of my setup that decides which model does which job, and what happens when one runs out.
What a Model Intelligence Layer does
It owns four decisions: which model plays which role, whether that choice was obeyed, what happens when the model runs out, and what the run cost and where the prompt went. I did not want to make those four decisions tired, so I wrote them down once and let hooks enforce them.
Every part, top to bottom. Each layer has its own note: the loop and its standards, plans and independent review; the three harnesses; and PANTRY, which keeps the record. The underlined boxes link to them too.
In plain words, here is how it behaves.
Judgment goes up, typing goes down. Planning and review stay on the strong models, Opus on Claude and Sol on Codex, or DeepSeek V4 Pro on the Go plan when Codex is spent, because that is where judgment pays for itself. When the main session reaches a piece that needs judgment, it hands that piece to a strong subagent and gets one answer back. A search, a read or a small edit goes the other way, to a light subagent.
Plan big, type small. Judgment goes up to the strong tier, bounded typing goes down the chain, and the main session keeps its place. Plan Big, Type Small is the habit this makes automatic.
Light work falls down a fixed order. One free model first, then the same model on a small monthly plan, then the Codex plan I have already paid for. Before it picks the monthly plan, it reads how much of that plan's allowance is left, and skips it when a limit is reached. When a model says no anyway, the layer cools it down and moves to the next one. If every model is out, it stops and asks me rather than reaching for money.
Free first, then a small monthly plan, then the plan I already pay for. The paid DeepSeek API is never in the order.
The paid model sits outside the order on purpose. The paid DeepSeek API is an escalation. No agent holds its key, it runs on a prepaid balance I topped up myself, and a call only happens after I type an approval in a terminal. The daily cap counts an approved call as spent the moment I approve it, before any money moves. Pick one of the three requests below to see where each rule bites.
| Request | Free model | OpenCode Go | Luna | DeepSeek API | Outcome |
|---|---|---|---|---|---|
| The free model is out | out for today | takes it | Never stalls | ||
| A private repository | skipped: keeps prompts | skipped: keeps prompts | takes it | Never leaks | |
| It needs the paid model | waits for my typed yes | Never overspends |
Pick a request to see how the router decides. The paid API is never in the chain; it waits for my typed yes.
Two more things happen in every session. If a session starts on the wrong model, it stops before doing any work and offers me a restart. And every session and subagent leaves one record of what it used, so my desk, PANTRY, shows free and paid apart.
What is built, and what is still ahead
It is built, I use it every day, and parts of it are still unproven. I built it in two rounds.
The first round is the everyday part: the list of models and what each one is for, the check that a session runs on the model it should, the order light work falls down, and a record of every call.
The second round is for the moments that go wrong.
- A paid call leaves a record and waits until I type approve.
- No more than four agents run at once.
- Before a big task, a check says whether it fits in what the model can hold. It advises; it never blocks.
- A session that gets cut off leaves a checkpoint the next one can pick up from.
- A plan that changes the setup itself, anything that touches my hooks, settings or standards, cannot start until a fresh reviewer has read it. I call that reviewer the goldfish, because it has seen nothing of the conversation that produced the plan, so it reads only what is written down.
- A scout researches new models when I ask, and never adds one on its own.
Seven rounds of independent audit went through the second round before I called it ready.
What I have seen work, and what I have not. I have seen Go take light work after its allowance was checked, live on my Mac. I have not yet seen the free model run out in the middle of a task and Go take over by itself, a main session move on when it runs out, the Codex side of the checks, or Sol take light work on OpenCode. Those are tested, not yet seen. Continuing a cut-off session is still half by hand: I click to archive the old one. On 30 November I look at a week of records and decide whether free should still go first.
The rule I will not bend
On my work computer, only the company's Claude and Codex. The free model, Go and DeepSeek are for my own projects, on my own computer. Those three may keep what they are sent, so they never see work code, and I did not leave that to my memory.
The same setup on two computers. Anything the setup cannot place is treated as work.
Three guards hold the line, and a mistake has to get past all three. A computer the setup cannot identify is treated as a work computer. In work context, every prompt checks the signed-in account and is blocked unless it is a company one. And the wrapper that starts OpenCode, which runs the light chain, refuses to start it in work context, whatever I have said about the repository. That is the work side. My own computer has one more rule: I clear each repository myself, one at a time, before a model that keeps prompts may touch it. I decided I would not let a tired evening be the reason one of them saw something that was not mine.
What it changed
It never stalls, it never overspends, and it never leaks private code. That is the whole pitch, and each part has a mechanism behind it rather than a promise: the fallback order, the typed approval against a prepaid balance, and the guards that keep anything not mine away from models that may keep it.
The first change is the one I wanted. So far, I have not run out in the middle of something. The free model and the small plan take the light work, so the strong plans last longer, and when one of them does empty, the next model is a lookup and not a decision.
The second is that I work at low effort now, a setting for how long a model thinks before it answers. Opus runs low and Sonnet runs medium, because the architecture carries the load: the plan is written, the review is fresh, the guards are hooks. A model that does not have to hold the whole project in its head can think less and be right more often. I have worked this way since the loop and the harness were in place, and the work has held up. That is my experience, not a controlled comparison.
The third is fewer apps and fewer moods. I do not choose between four programs when something runs out. I open the one I always open.
The turn
I ran out at the wrong moment, with four hours left on a clock I could not argue with. Now the next model is a lookup, the lookup knows what it is allowed to touch, and I stay in the zone.
If you want the machinery, every piece with its diagram and a list of the steps to build your own, it is in How the Model Intelligence Layer Works. The setup guide that the layer sits on is Set Up the Loop With One Prompt.
The judgment is human. The typing, by design, is not.