How I Get Frontier Results From any Model (the Harness Guide)

The full harness I run, the exact steps and install blocks to build your own, and the receipt from a mid-tier model hitting frontier-level output.
Bookmark this and let's begin.
I am Phosphen. I write long-form breakdowns of the systems the best AI labs actually run. Follow @phosphenq. DMs open.
I used to lose a weekend rebuilding my whole setup every time a new model dropped.
Now I barely notice the releases. I get frontier-level output from almost any model I point it at, because I spent the last year building the harness instead of chasing the model.
The model, it turns out, is the part you swap. The harness is the part you keep.
Most people are still doing the opposite.
They upgrade the model and leave the setup around it untouched, then wonder why the new model feels like the old one with a different logo.
The leverage stopped being the model months ago. It moved to the scaffolding, and almost nobody has noticed.
This is the guide I wish I had a year ago. It is sourced from three things:
Fourteen steps. Three parts. Five rungs on one ladder. Stop chasing models. Start building the body they plug into.
PART 1 · The shift
01. The model was never the variable.
For two years the game was the model.
A better one dropped, you moved your whole workflow onto it, you got better output, you waited for the next release. The model was the thing you held, and the thing that decided your results.
That is over, and most people have not noticed yet.
Here is the uncomfortable version.
The gap between the number one model and the number ten model is smaller than the gap between a good harness and a bad one.
Put a weak setup around the best model on the leaderboard and you get demos that fall apart on contact. Put a strong setup around a mid-tier model and you get work that ships.
The ranking of the model stopped being the deciding factor. The quality of the system around it took over.
The leverage moved. It moved off the model and onto the scaffolding:
That scaffolding is the harness. It is the part almost nobody is building, and it is the whole game now.
Boris Cherny, who built Claude Code, keeps saying a version of this in public, and it is the quiet argument running through this guide.
The work did not get easier. The leverage point just moved one floor up, from the model to the system that drives it.
You can measure the shift, roughly.
Anthropic has said its own engineers now merge on the order of eight times as much code per day as they did in 2024, a number Anthropic itself calls almost certainly an overstatement of the true gain.
Argue about the multiple all you want. The mechanism is not in dispute. The people getting outsized output are not typing better prompts. They built the loop that prompts for them.
02. The test: same harness, two models.
You do not have to take my word for any of this. Run the test yourself, today.
Take a real task from your week. Run it twice:
Then read the gap:
Luck has nothing to do with it. This is the whole thesis in one experiment: the results were never coming from the model.
They come from the system you wrap around it, and that system does not change when the model does.
A harness, in plain English, is five things stacked on top of each other:
None of that lives inside the model. All of it is yours to build.
The rest of this guide is how I build it, one rung at a time, with the exact commands.
03. The honest gate: do you even need one yet?
Before you build anything, the honest question, the one most guides skip to keep you reading.
You probably do not need the full harness yet.
Forcing it is how people end up maintaining a system nobody uses.
A single well-aimed prompt still wins in three cases:
In all three, a harness is slower, more expensive, and more fragile than just asking.
The harness earns its cost under a narrower set of conditions. Miss one and it costs more than it returns:
If you fail one of these, bookmark this and keep prompting by hand for now.
You are not behind. You are being honest about your workload.
If you pass, keep reading. The climb is worth it.
PART 2 · Build the harness
04. Rung one: the prompt, and its ceiling.
Everyone starts here, and there is nothing wrong with it. My first real setup was exactly this: one great prompt I had tuned over weeks, copied from a note every time I sat down.
Then the task got bigger, and the prompt broke.
Not because the model got worse. Because a one-shot prompt has a ceiling built into it. Three ways that ceiling shows up:
The prompt did not fail you. The absence of anything around the prompt failed you.
The fix is never a cleverer prompt.
Past a certain point, tuning the prompt is rearranging furniture in a room that is too small.
The fix is to build the next rung. Every rung from here adds a piece a bare prompt cannot have.
05. Rung two: context, feed the model, don't out-clever it.
The model is smart, but it is blind. It knows only what you put in front of it.
Most people respond to a weak answer by rewording the question.
The people getting frontier results respond by fixing what the model can see.
This is the discipline the whole field moved to this year, and it has a name.
Prompt engineering optimizes the question. Context engineering optimizes everything the question lands in:
It is a system you design, not a sentence you polish.
The concrete move is to give your agent a home and a memory that outlive the chat. I use Claude Code, because it is the best body I have found for a harness and it reads all of this for free.
Do this now. Install Claude Code:
# Windows (PowerShell)
irm https://claude.ai/install.ps1 | iex
# macOS / Linux
curl -fsSL https://claude.ai/install.sh | bash
# or, if you already live in Node
npm install -g @anthropic-ai/claude-codeThen drop a CLAUDE.md in the root of your project. This is the single highest-leverage file in your whole setup. Claude reads it at the start of every session, forever, without you asking:
# CLAUDE.md
## what this is
[one line: what the project does]
## run it
install: [your install command]
test: [your test command]
## rules
- [your conventions]
- never touch [x]
- always [y]Keep it under two hundred lines. It is a set of instructions, not a novel, and a bloated file gets ignored.
That one file is the difference between two agents:
Everything else in this rung is more of the same. Fix what the model can see, and most of the answers fix themselves.
06. Context, deeper: what belongs in the window and what does not.
The mistake at this rung is thinking more context is better context. It is not.
The window is a budget. Everything you spend on noise is spent twice: once on tokens, once on the model's attention.
A useful way to think about it: the context window is a desk, not a library.
You do not pile the whole library on the desk. You put the three things it needs for this task and clear the rest.
Good context engineering is as much about what you leave out as what you put in.
What earns its place on the desk:
What to keep off the desk:
Thoroughness is a context tax.
The agent that gets a clean, relevant window outperforms the one drowning in everything, every time.
Context is the rung most people skip straight past on their way to something that sounds more impressive. Do not.
A great loop on top of bad context is a fast way to be confidently wrong at scale.
07. Rung three: the loop, stop prompting and start looping.
This is the rung where it clicked for me, and it is the one that feels strangest the first time.
For two years I prompted every step by hand. Type, wait, read the diff, type again. I was the loop.
The shift is to stop being the thing that prompts.
You give the agent a goal and the tools to chase it, and you let it run:
You design that loop once. The loop prompts the agent from then on.
In Claude Code the whole thing is one command. /goal runs the agent turn after turn until the finish condition is met, and the condition is plain text, no quotes:
# Claude runs turns until a SEPARATE fast model confirms the
# finish condition, not until the maker feels done.
/goal all tests in tests/auth pass and lint is clean, or stop after 6 turnsHere is the part that makes it work.
After every turn, /goal hands the condition and the conversation to a separate small fast model, Haiku by default, and asks one question: is this actually done?
The model that wrote the code is not the model that decides it is finished. That built-in second opinion is the whole trick, and it is the subject of the next step.
You stop prompting the steps. You prompt the loop once, and it runs itself.
08. The stop condition: keep the maker away from the checker.
Here is where loops quietly go wrong, and where the token bills come from.
A loop needs a finish line the loop cannot move.
The failure mode is letting the agent that wrote the code decide whether the code is done. In Addy Osmani's exact words on loop engineering, "the model that wrote the code is way too nice grading its own homework." It talks itself into "good enough" and fires the done signal on a half-finished job.
The fix has a name. Anthropic documented it back in its December 2024 engineering post as the evaluator-optimizer pattern, long before the vocabulary went viral.
The pattern: one agent generates, a different one critiques, and you repeat until the critic is satisfied. The maker and the checker are not the same model, and ideally not even the same instructions.
That is exactly what /goal does under the hood. The separate checker runs after every turn, so the finish line is never the maker's opinion:
# the checker is a different, fresh model; the hard stop
# lives inside the condition itself.
/goal tests/auth all pass and lint is clean and no new TODOs, or stop after 6 turnsTwo rules make this safe, and neither is optional:
One more tool, so you do not confuse them. /goal runs until a condition holds. /loop is the separate command for running on a schedule, a nightly triage pass on a timer rather than a run-until-done. Different jobs. Do not nest them.
Get this rung wrong and the loop fails silently and expensively. Get it right and you can walk away, which is the entire reason you built it.
09. Rung four: the harness, subagents.
A raw loop drifts and trusts itself. What turns it into a harness you can leave alone is a set of parts wrapped around it. The first and most important is subagents.
A subagent is a specialized helper that runs in its own context window, with its own instructions, its own tools, and sometimes its own model. Two reasons it matters:
Drop a file in .claude/agents/ and Claude will delegate to it when the work matches:
---
name: reviewer
description: Reviews a diff for bugs, missing tests, and risky changes.
tools: Read, Grep
model: sonnet
---
You are a strict code reviewer. For the given diff, list real problems only:
missing tests, unhandled errors, hardcoded values, security risks.
For each, name the file and give the one-line fix. Do not praise. Do not soften.The usual split inside a working loop is three roles:
The verifier is the one that lets you sleep. Give it the strong model and the strict instructions, even when it costs more.
One caution.
Subagents each do their own model and tool work, so they burn more tokens than a single pass. Spend them where a second, independent opinion is actually worth paying for, which is mostly the check.
Do not spin up a swarm because it looks impressive. A loop with one good verifier beats a loop with five chatty helpers and no real gate.
10. The harness: hooks and permissions.
Subagents decide who does the work. Hooks and permissions decide what the work is allowed to do while you are not watching.
A hook runs a command automatically at a fixed point in the loop, so a rule holds without anyone remembering to enforce it.
Formatting, linting, a guard that blocks a dangerous command before it runs.
Put them in .claude/settings.json:
{
"hooks": {
"PostToolUse": [
{ "matcher": "Edit", "hooks": [
{ "type": "command", "command": "npm run lint -- --fix" }
]}
]
}
}That one hook means every edit the loop makes gets linted the instant it lands, forever, whether or not the agent remembered to. Hooks turn "please always do X" from a hope into a fact.
Permissions are the other half.
The loop runs while you are asleep, which means its blast radius is whatever you allowed. Decide up front what is off limits, and it stays off limits no matter what the agent decides mid-run:
Hooks and permissions are unglamorous. They are also the reason the whole thing is safe to leave running.
A harness you cannot trust unattended is not a harness. It is a very expensive way to watch an agent work.
11. The harness: skills, memory, and MCP.
Three more parts turn a loop that works today into one that gets better over time and reaches your real tools.
Skills are how you write project knowledge once and have it read on every run.
A skill is a folder with a SKILL.md inside, holding instructions and metadata, plus optional scripts and references.
The point for a loop is compounding. Without skills, a loop re-derives your conventions from zero every cycle. Add skills and it starts each run already knowing them.
The "we do not do it this way because of that one incident" lives on the outside, written once, obeyed every run.
Memory is the piece that sounds too dumb to matter. It is actually the spine of every loop that survives more than a day.
Agents forget by default. What they learn this session is gone tomorrow unless you write it down.
So write it down, in a file that lives outside the conversation:
# STATE.md - auth quality loop
## last run
2026-07-05 03:30 · 7 failures triaged, 3 fixes drafted, 4 escalated
## in progress
- claude/fix-auth-token-refresh - tests green locally, awaiting CI
## lessons (write here, not in chat)
- 2026-07-04: this runner hits a TLS issue in PowerShell. use bash.
- 2026-07-03: tests/e2e needs the Stripe webhook secret in env. skip if missing.The rule is simple: the agent forgets, the file does not.
A loop with state resumes tomorrow where it stopped. A loop without state starts over every morning, which is most of the reason loops feel like they are not learning.
MCP is how the loop touches your real tools instead of only your files.
Built on the Model Context Protocol, connectors let the agent:
This is the difference between an agent that says "here is the fix" and a loop that opens the PR, links the ticket, and pings the channel once the checks are green.
This is also where I will stop, because the deepest version of memory, a harness that remembers you across weeks rather than a single run, is a whole guide of its own. For now, a STATE.md and a couple of skills are enough to make the loop compound.
Put these parts together and the point of the whole guide shows up on its own. You stop tending the model.
PART 3 · Keep it honest
12. The receipt: they pulled the best model on earth for 18 days, and I barely noticed.
I said the model is the swappable part. In June, the world ran the experiment for me, at full scale, with no warning.
On June 12 the US government put export controls on Fable 5, at the time the most capable model available. Anthropic pulled it worldwide to stay compliant.
For eighteen days the best model on earth was, for most of the world, simply gone.
It came back on July 1, at ten dollars per million input tokens and fifty per million output, about double the price of the tier below it.
If your results lived inside that one model, you lost eighteen days and then paid double to get them back.
My work never slowed down for an afternoon, because a model-agnostic harness does not care which model is underneath.
The loop kept running. Context still loaded, checks still passed, and I swapped a different model in underneath without touching anything else. The output barely moved.
That is the thesis, proven by a real and slightly absurd event.
Build the harness, and a frontier model getting rug-pulled by a government becomes a footnote in your week instead of a hole in it.
Chase the model instead, and someone else's policy decision is now your outage.
13. How this fails quietly.
The dangerous failures of a harness are not the loud ones. A crash you can see.
The failures that cost you are the ones that keep running while looking fine.
None of these mean do not build the harness. They mean build it with your eyes open.
The harness removes the typing. It must not remove the thinking.
The moment you let it, every failure above compounds instead of getting caught.
14. Rung five: the environment, the horizon.
There is one rung above the harness, and it is where the frontier labs are already fighting.
Once the model is a swappable part, the competition moves to everything around it:
This is the rung you do not build in a weekend. It is the one that tells you where all of this is heading.
You do not need it to get frontier results today.
You need it to understand why the harness works at all, and why it keeps working as the models change under it.
Standing on rung four already puts you ahead of almost everyone still typing prompts by hand.
Rung five is the next guide. For now, the climb below it is enough.
§ The mistakes that keep you stuck at the prompt
Conclusion: the model was never the variable.
For two years the leverage was at the model. A better model, a better prompt, a better one-shot answer.
That phase is ending.
The models got good enough that the next leverage point is one floor up: the harness that decides:
You now have the whole thing. The map. The install. A CLAUDE.md. A loop that runs itself against an objective gate. A harness with subagents, hooks, permissions, skills, and memory wrapped around it. And the honest test for whether you need any of it yet.
The winners this year will not have the smartest model. They will have the harness the smartest model plugs into.
When the next release drops, they will swap it in under a system that already works and keep going, while everyone else spends another weekend rebuilding.
Build the first rung tonight, the one thing you still do by hand, and let the model become the easy part.






