The Harness Holds the What
Your team moves its coding agent to a newer, more capable model on Monday. By Wednesday the diffs look worse. A two-line fix to a shipping-quote bug comes back with three files rewritten from top to bottom, a PLAN.md nobody asked for, and a test run that took four tries because the agent added console.log calls between runs and left two of them in.
The agent explains each choice by quoting AGENTS.md, the instruction file at the root of the repository. It did what the file told it to do. The file was written eighteen months earlier for a weaker model, and most of it is a procedure: plan first, search with grep before editing, rewrite whole files, debug by logging. Each step fixed a real problem with the model of its day.
The file is silent on what the service is for and what a good quote looks like. The fix depended on one such question, which way to round a discounted price to the cent, and on that question the agent guessed.
Every task the agent runs starts from this file. A line in it is an instruction you repeat on every task, for as long as the line survives.
Standing context and the two kinds of line
The harness is the program around the model: the loop that sends it text, runs the tools it calls and feeds the results back. Before your task arrives, the harness loads standing context, text that sits in front of every task. In a coding agent that is a file such as AGENTS.md or CLAUDE.md at the repository root, plus whatever system prompt and rules files the tool reads. The per-task prompt from the previous lesson describes one job. Standing context describes what stays true across all of them.
Every line of it does one of two things. A what line says something about the result you want or the world the work happens in: who uses the service, what counts as a bug, which conventions the code follows, which commands exist, which actions need a person's yes. A how line prescribes the method: which steps to take, in what order, with which tool, and how to think before acting.
Daniel Miessler, who names this split Bitter Lesson Engineering, states the cost of the second kind in "Good and Bad Harness Engineering": "Bad Harness Engineering is bad because the smarter AI gets the more antiquated your instructions will become."
Why one half rots
In 2019 Rich Sutton looked back at seventy years of AI research and found one pattern in chess, Go, speech recognition and computer vision. Researchers built their own knowledge of how to solve the problem into their systems. It helped at first and it was satisfying to build. Then general methods that scale with computation, search and learning, overtook those systems, and the built-in knowledge became something to tear out. His essay puts it in one line: "We have to learn the bitter lesson that building in how we think we think does not work in the long run."
A how line in standing context is a small piece of built-in method. It records the best way you knew to get good work out of the model of its day, and there it fixes a real problem. When the next model arrives, the line stays where it was, and for a while it costs little. Then a smarter model would do better on its own, and the line holds it to the old way: a plan file written for a model that now plans as it works, a whole-file rewrite written for an edit tool that no longer fails.

A what line ages the other way. "A one-cent error is a bug customers see on the receipt" is a fact about your business that no amount of training can supply. The model of its day applies it to the cases it was written for. The next model applies it to cases you never listed, such as a discount, a currency conversion or a refund. The line gets more useful each time the model improves.
Sutton made the same point about reward signals in the reinforcement learning textbook he wrote with Andrew Barto: the reward tells the agent what you want achieved, and finding how is the agent's job. Reward a chess program for capturing pieces and it can learn to capture pieces while losing the game. Standing context plays the same role for a coding agent. It is where you say what winning looks like.
What the file should hold
A file with the how half removed can still be long. What matters is the kind of line in it. Five kinds earn their place:
- Purpose: what the system does, who depends on it, and what is at stake when it is wrong.
- What good and bad look like: the criteria you would judge any change by, with numbers where you have them.
- Conventions: the rules this codebase follows that a newcomer could not guess from one file.
- Tools and facts: the commands that build and test, the helpers to use, and the gotchas the model cannot see in the code.
- Gates: the actions that need a person's yes, and the ones nobody takes.
The last two read like instructions, and an auditor in a hurry cuts them along with the steps. They survive for their own reasons. A smarter model still cannot know that your integration tests need a database started first, or that your shipping carrier reports some errors with HTTP 200. A gate exists because the authority to run a migration against production is yours, and a more skilled model leaves that authority where it was.
Auditing a real file
Here is the shipping service's AGENTS.md as it stood on Monday, numbered for the audit:
# AGENTS.md
1. You are an expert senior TypeScript engineer with 20 years of experience.
## Workflow
2. Before writing any code, think step by step and write your plan to PLAN.md.
3. To find code, run `grep -rn` over src/ and open every match before editing.
4. Always rewrite the whole file when you edit it. Never use partial edits.
5. If a test fails, add console.log calls, rerun, and repeat up to three times.
6. Only read the files you need. Your context window is small.
## Rules
7. Run tests with `bun test`. Integration tests need `bun run db:up` first.
8. Never run `bun run migrate` against production. Migrations ship through the release pipeline.
9. The carrier API can return HTTP 200 with an `error` field in the body. Check the body.
10. IMPORTANT: You MUST use zod for ALL validation. NEVER skip this.
11. Do not add dependencies without asking.
12. Do not use `any`.Take each line and ask one question: would a smarter model make this line unnecessary? A yes marks a how line. Before cutting it, ask what it was protecting, because some steps stand in for an outcome you still want.
| Line | Kind | Verdict |
|---|---|---|
| 1 | Describes the model, says nothing about you | Cut, and write who you are and what the service does |
| 2 | Step | Cut; if it existed so you could see large changes first, write that gate instead |
| 3 | Step | Cut |
| 4 | Workaround for an old edit tool | Cut once you confirm partial edits work with today's tools |
| 5 | Step | Rewrite as the outcome it protected: no console.log in committed code |
| 6 | Stale premise | Cut |
| 7 | Tool fact and gotcha | Keep |
| 8 | Gate | Keep |
| 9 | Gotcha | Keep, then move it into a tool |
| 10 | Convention, shouted | Keep the convention in plain words |
| 11 | Gate | Keep |
| 12 | Convention | Keep |
Line 10 is a convention worth keeping, written in a voice that was itself a workaround. Capital letters and MUST were how people got older models to follow a rule at all. Anthropic's prompting guide for its recent models warns that language written to stop a model from neglecting a tool can make a newer, more attentive model overuse it, and it recommends plain wording. Here the overuse would be schemas wrapped around values the service computed itself.
The audit also has to find what the file never said. Nothing in it says what the service does, what a correct quote is, how fast a quote must be, or that money is stored as integer cents. And nothing settles the question the opening fix turned on, which way to round a discounted amount. That is a business decision, so it belongs to you, and it goes in the file.
Here is the file after the audit:
# AGENTS.md
## What this is
rates-api returns shipping quotes to the shop's checkout. Customers see
the quote on their receipt, and a slow quote loses the sale.
## What good looks like
- A quote equals the carrier rate plus our markup, to the cent.
- p95 latency for /quote stays under 300 ms.
- Every behavior change ships with a test that fails without it.
## Conventions
- Money is integer cents everywhere (`amountCents`). No floats for money.
- Discounted amounts round to the nearest cent, halves up.
- Validate request bodies and carrier responses with zod.
- No `any`. No `console.log` in committed code.
## Tools and facts
- Tests: `bun test`. Integration tests need `bun run db:up` first.
- `bun run check` runs the same checks CI runs.
- Call carriers through src/carriers/client.ts. It treats an HTTP 200
with an `error` field as a failure.
## Ask first
- Adding a dependency.
- Changing the markup rules in src/pricing/.
## Never
- Run `bun run migrate` against production. Migrations ship through
the release pipeline.It is longer than the original, and nearly every line in it is something only the team knows.
Tools carry what sentences cannot

Line 9 survived the audit, and it is still weaker than it could be. A sentence asking the agent to check the response body works only when the agent recalls it on the call that matters. A client function that treats an HTTP 200 carrying an error field as a failure works on every call, for the agent and for every person on the team. Once that client exists, the standing file needs one line: call carriers through src/carriers/client.ts.
The tools the model can call are part of the harness too, and they are the place for the how you still own. A tool is method written as code, where it runs the same way each time and has its own tests. Advice about method tells a capable model how to work. A tool gives it something more to work with. When an agent keeps making one kind of mistake, the fix that lasts is usually a tool or a check, plus one line in the file saying it exists.
The harness checks the work against what you said
A line in the file states intent, and a check proves a change keeps to it. Some what lines are mechanical enough for a program to check after every change: integer cents, no console.log, no new dependency without a yes. Put those checks in a command the agent can run itself, the same one CI runs, and make each failure name the line it breaks. The agent then finds the violation and fixes it before it reports done.
Here is that check run against the agent's next change, a 10% shipping discount on orders over $75:
type Change = {
addedLines: { file: string; text: string }[];
depsBefore: string[];
depsAfter: string[];
quote: (weightGrams: number, subtotalCents: number) => { amountCents: number };
};
// Each mechanical line from AGENTS.md, paired with a check that can fail.
const rules: { says: string; check: (c: Change) => string[] }[] = [
{
says: "Money is integer cents everywhere (`amountCents`).",
check: (c) =>
[500, 1250, 4999].flatMap((g) => {
const { amountCents } = c.quote(g, 8000);
return Number.isInteger(amountCents) ? [] : [`quote(${g} g) returned ${amountCents} cents`];
}),
},
{
says: "No `console.log` in committed code.",
check: (c) => c.addedLines.filter((l) => l.text.includes("console.log")).map((l) => `${l.file}: ${l.text}`),
},
{
says: "Ask first: adding a dependency.",
check: (c) => c.depsAfter.filter((d) => !c.depsBefore.includes(d)).map((d) => `new dependency: ${d}`),
},
];
// The agent's change: 10% off shipping when the subtotal is over $75.
const change: Change = {
addedLines: [
{ file: "src/pricing/discount.ts", text: "const discounted = base * 0.9;" },
{ file: "src/pricing/discount.ts", text: "console.log('discount', discounted);" },
],
depsBefore: ["zod"],
depsAfter: ["zod", "lodash"],
quote: (weightGrams, subtotalCents) => {
const base = 495 + Math.ceil(weightGrams / 500) * 150;
return { amountCents: subtotalCents > 7500 ? base * 0.9 : base };
},
};
for (const rule of rules) {
const problems = rule.check(change);
console.log(`${problems.length ? "FAIL" : "ok "} ${rule.says}`);
for (const p of problems) console.log(` ${p}`);
}Output
All three rules fail, and each failure quotes the line it broke, so the message tells the agent what to fix without you. The money check found half-cent quotes such as 580.5, which is the rounding question the file now answers.
Notice what a pass would prove. Suppose the agent drops the log line and the new dependency and changes the discount to Math.floor(base * 0.9). Every check goes green, yet the 580.5 quote becomes 580 where the file says halves round up to 581. The checks prove the change keeps to the file's mechanical lines. Whether each quote is the right number takes a test with the expected amount written in it, the subject of Tests as Specifications. Standing context states the criteria, and the harness runs every check that can be automated against them.
Auditing after every model upgrade
Each how line is a bet about the current model's weaknesses, and an upgrade changes the weaknesses. So run the audit each time the model under your agent changes, and on a schedule in between:
- Ask of every line whether a smarter model would make it unnecessary, and mark the ones where the answer is yes.
- For each marked workaround, check that the failure it was written for is gone with the current model and tools. Ask the agent for a partial edit to a large file and read what it produces.
- Cut the marked steps and rerun a few recent real tasks without them, judging the results against the criteria in the file.
- Read where the agent guessed or asked a question. Each guess marks a what line you have not written yet.
- Write a dated reason beside each surviving workaround, so the next audit can tell it from a convention.
Leave the conventions and preferences out of step 3. Most tasks never touch a given preference, so a run with and without it will report the line as useless when it is the only place that fact is written down.

The usual mistake in an audit is to sort by grammar. "Never run bun run migrate against production" reads like a command, so an auditor sorting by tone deletes it with the plan file. Sort by what the line protects. If it says what you want, what is true, or what needs a yes, it stays, whatever mood its verb is in. The production line stays even after you take migration credentials out of the agent's environment, because it also tells the agent where migrations go, which saves a session spent probing a credential it lacks.
A line belongs in standing context when a smarter model would still need it: it says something only you know about your users, your stakes or your taste, it guards an action whose authority is yours, or it names a fact about your tools that the code does not show. Every other line is a bet on a weakness of the current model, and the bet expires with that model.