
A note before we start: this is a course, not a study. When it cites OpenAI, Anthropic, or a paper, I say so; when it tells a story without a source, I present it as a course example, not a measurement.
A harness in one diagram
The landing page sums up the method in a diagram. First, a clear objective, written in AGENTS.md. Then an initialization step (init.sh) that gets the environment ready. The agent runs tasks, and when something breaks it gets runtime feedback (the CLI, the logs) and corrects itself. When the code is done, the test suite verifies it. If it fails, it goes back; if it passes, it cleans up and writes a handoff for the next session in claude-progress.md.
The rest of the course develops one piece of that loop per lecture.
Why capable agents fail
Lecture 1 starts from a number: Anthropic reported that Claude Sonnet 4.5 solved 77.2% of SWE-bench Verified. But those are hand-picked tasks, with clear issue descriptions and tests already written. With your everyday tasks (vague specs, no tests, business rules scattered across the code), the course warns, that number only goes down. You know the scene: the agent works for twenty minutes, says it's done, and the code breaks the tests or isn't what you asked for.
The usual reaction is to pay for a pricier model. The course asks you to look at this Anthropic experiment first: the same model, Claude Opus 4.5, and the same request, a retro 2D game editor.
| Bare | Three-agent harness | |
|---|---|---|
| Time | 20 min | 6 h |
| Cost | $9 | $200 |
| Result | The app opened, but the game entities did not respond to input | The core gameplay worked, though the app was not finished |
The model did not change. The tack did, as the course puts it with its racehorse metaphor.
OpenAI tells another story. In August 2025, three engineers started from an empty repository with one rule: they would not write code, only Codex would. Five months later there were roughly a million lines and about 1,500 merged pull requests, around 3.5 per engineer per day; the team grew to seven. Early progress was slow, and it was almost never a lack of effort from the agent: its environment was always missing something.
Five failures and the main rule
Where do agents get stuck? The course boils it down to five failures:
- Vague requirements: the agent guesses.
- Conventions that only live in your head: it cannot follow them, because it has never seen them.
- A half-built environment: it burns context fighting dependencies.
- No way to check its work: it accepts whatever looks fine.
- State lost between sessions: every session starts from zero.
Hence the main rule: when something fails, do not swap the model; check the harness. Map every failure to a layer (the task, the context, the environment, verification, or state), fix it, and run again. And for every task, write a definition of done a command can check: "new GET /api/search endpoint, paginated at 20, and pytest and mypy --strict pass", not "add a search feature".
What a harness is: five subsystems
For the course, the harness is everything that is not model weights. The analogy is a new hire on a project with no documentation: they may be brilliant, but they will spend days just figuring out the project. The agent has it worse, because it cannot ask anyone.
The harness splits into five subsystems:
- Instructions:
AGENTS.mdorCLAUDE.md, with the purpose, versions, first-run commands, and non-negotiable rules. - Tools: shell access, with least privilege, but without taking away what it needs.
- Environment: pinned dependencies and versions, and a reproducible setup.
- State: a progress file with what is done, what is in progress, and what is blocked.
- Feedback: the test, type, and lint commands, written into
AGENTS.md. According to the course, it costs the least and pays the most.
The course illustrates the effect with a team working on a 20,000-line React app. It gives no source, so take it as an example: with only a basic project description, one run in five succeeded (20%); with an AGENTS.md listing versions and conventions, 60%; with verification commands, 80%; with a progress file, between 80 and 100%. The model was the same at every stage.
Which piece matters most? The course suggests removing them one at a time, with the model fixed, and seeing which removal hurts most. But it warns that this tells you which piece is worth most right now, not where the bottleneck is; for that you need failure records and their causes. And a harness rots like code, so audit it.
The repo is the map
For an agent, what is not in the repository does not exist. It sees only three things: the prompt with the task, the files in the repo, and the output of its tools. The decision made in Slack, the Jira ticket, the Confluence page, or what the senior engineer knows are all invisible. OpenAI sums it up as "the repo is the spec".
To check whether your map is good enough, the course proposes the fresh session test: open an agent without telling it anything and ask five questions.
- What is this system? (
AGENTS.md, README) - How is it organized? (
ARCHITECTURE.md, module docs) - How do I run it? (Makefile,
init.sh) - How do I verify it? (test and lint commands)
- Where are we now? (
PROGRESS.md, the feature list, git history)
Wherever the map is blank, the agent guesses, and every new session guesses again.
How do you draw a good map? Knowledge lives next to the code (the API authentication rule sits next to the API); fifty lines of architecture notes in the module folder beat five hundred pages in a wiki nobody maintains; and docs get updated with the code, because outdated documentation is worse than none: it sends the agent the wrong way while it thinks it's on track.
The course also borrows the four properties of a database transaction for agent state: atomicity (a change and its tests land together or not at all), consistency (after every operation, tests and lint pass), isolation (each agent on its own branch or with its own progress file), and durability (anything that must outlive the session goes into files tracked in git).
The giant AGENTS.md trap
Lecture 4 describes a trap almost everyone falls into. You take the harness seriously and put every rule you can think of into AGENTS.md: the agent fails, you add a rule; it fails at something else, you add another. After a month you have 300 lines, after three months 600, and the agent starts getting worse. For three reasons:
- Context budget: 600 lines can mean 10,000 to 20,000 tokens read on every task (the course's estimate).
- Lost in the middle: the paper Lost in the Middle (Liu et al., 2023) showed that models use what sits in the middle of a long text much less. Your security rule on line 300, the one requiring parameterized queries, gets ignored.
- Everything looks equally important, and rules added at different times end up contradicting each other.
The fix is to split it. AGENTS.md becomes a router of 50 to 200 lines: what the project is, how to start it, at most fifteen non-negotiable rules, and links to topic documents the agent reads only when it needs them, like packing cubes in a suitcase. Every rule notes why it was added, when it applies, and when it can be deleted. And if something must stay in the entry file, put it at the top or the bottom, never in the middle.
What does the data say? The course is honest here, and it's worth repeating:
- OpenAI used an entry file of about 100 lines as a map to a docs folder, but published no before-and-after numbers.
- ETH Zurich found that repository context files did not generally improve success in its settings and raised inference cost by more than 20%.
- Lulla et al., with gpt-5.2-codex and 124 tasks from 10 repositories, measured that with
AGENTS.mdmedian runtime dropped from 98.57 to 70.34 s (−28.6%) and output tokens by 16.6%. That is efficiency, not correctness.
The lesson: few rules, and tested on the tasks they exist for.
Don't lose the thread between sessions
The context window is finite, whether it holds 200,000 tokens or a million. You ask Claude Code for a full feature, it works for half an hour and runs out of context; the new session does not remember what it decided, why it picked one option over another, or where the tests stand. And when the conversation is summarized, the what survives (the code) but the why is lost.
Anthropic also observed what it calls context anxiety: when the agent senses it is running low on context, it rushes to finish, skips verification, and picks the easy solution. There are two ways out: compaction, which summarizes the conversation but does not remove the rush, or a reset, which opens a clean session from saved files. According to Anthropic, Sonnet 4.5 needed resets; with Opus 4.5, compaction was enough. The harness depends on the model.
The course's recipe: treat the agent like an engineer whose memory is wiped at the end of every shift. Before leaving, it writes the handoff:
- a progress file with what is done, what is half done, and the next step;
- a decision log with what was decided, why, and what was rejected;
- git commits as checkpoints.
On arrival, the session reads those files and checks that everything passes. As a rule of thumb, if a task will use more than 60% of the window, it's time to prepare the handoff.
Anthropic applied this to a clone of the Claude website: an initializer agent expanded the spec into more than 200 features, all initially marked as failing, and left a startup script, a progress file, and a first commit; each later session read the progress, advanced one feature, verified it, and left a handoff. And LangChain took its agent on Terminal Bench 2.0 from 52.8% to 66.5% without changing the model (gpt-5.2-codex), though with several harness changes at once, not just progress files.
Initialization, as its own phase
Lecture 6 adds an idea: initializing is not the same as implementing. If you ask the agent to set up the project and build the first feature at the same time, it will lean toward the code, which is what shows, and leave the infrastructure weak. And it plants landmines: the first session picks Vitest for testing, the second does not know and brings in Jest.
So the first session writes no product features at all. It leaves five things: an environment that starts, at least one example test that passes, a startup checklist with the commands, the work broken into tasks with acceptance criteria, and a clean commit. It is done right if a fresh session can start, test, see progress, and pick up the work without asking anyone. In the course's example (a React project, no source), mixing both made the second session spend about twenty minutes figuring out the project, versus under three with a dedicated initialization session.
One thing at a time
Ask an agent to add authentication and you'll watch it change the schema, write routes, touch the frontend and, while it's at it, rewrite error handling: twelve files, eight hundred lines, and not one feature working end to end. The course explains it with a bit of math: if the agent has capacity C and opens k tasks, each gets C/k; below a threshold, none of them finish. Generating the next idea costs it almost nothing, but it dilutes its attention.
The fix comes from Kanban: limit work in progress to one. Only one task active, and the next does not start until the current one passes end-to-end verification. Done does not mean the code is written: it means the request returns 201. And the harness tracks the verified completion rate (verified tasks divided by started tasks); if it is below one, no new task starts.
In the course's example (an API with eight features, no source), the unconstrained agent opens five at once, writes 800 lines across 12 files, and only registration works; after three sessions, three of eight are done (37.5%). One at a time: 200 lines in 4 files with every test green, and after four sessions, seven of eight (87.5%).
The feature list as a harness primitive
For this to work you need a feature list, and not as a reminder but as a core building block of the harness. Each feature has three fields: the behavior ("POST /cart/items returns 201"), the exact command that verifies it, and its state, which can only be not_started, active, blocked, or passing.
The key is who changes that state: the agent cannot mark a feature as passing, it can only request verification; the harness runs the command and, if it passes, promotes it. It is a gate, like a database trigger no query can bypass. Several components read that list: the scheduler (which picks the next feature), the verifier, the handoff report, and the progress tracker. And each feature should fit in one session: "the user adds an item to the cart", not "build the cart".
Compare two progress notes. "Did auth, cart mostly done, payments left" doesn't say what "mostly" means or which tests pass. "F01-F05 passing, F06 active, F07-F10 not started" takes three minutes to understand.
Don't declare victory too early
The most common failure: you ask the agent for password reset, it changes the schema, writes the route, adds the email template, runs the unit tests, and says "done". But the link is never sent because the email config is missing, the migration stopped halfway, and the full flow never ran once. A 2017 paper (Guo et al.) showed that modern neural networks tend to be more confident than they are accurate; the agent feels done, and you need evidence, not feelings.
Passing unit tests is not being done. Unit tests isolate each piece and mock the rest, and that is exactly why they miss what happens between pieces: one part sends a relative path and the other expects an absolute one; a migration changes a table and the cache keeps the old schema; everything works with mocks and fails in the real environment.
And it gets worse: according to Anthropic, when the agent grades its own work it gives itself high marks, even when a person would clearly see it falls short, especially on subjective things. The fix is not asking it to be objective, but separating the worker from the checker. In the game editor from earlier, the third agent was an evaluator that tested the app by actually clicking through it with Playwright.
So the decision to stop is taken away from the agent, and the harness makes it in three layers:
- Static analysis: lint and types.
- Runtime behavior: tests and an app startup check.
- The whole system: a user's flow from start to finish.
If one layer fails, you do not move to the next. And no refactoring until the core is verified.
Error messages that say how to fix it
Another trick the course takes from OpenAI: error messages written for agents should say how to fix the problem. The proposed format has three parts:
ERROR: Found direct import of 'fs' in src/renderer/App.tsx:12
WHY: Renderer process has no access to Node.js APIs for security
FIX: Move file operations to src/preload/file-ops.ts and call via window.api.readFile()With that, the agent corrects itself.
The course shows this with an Electron app that exports files (an example without a source): unit tests for the UI, the bridge, and the service pass; end-to-end tests find five defects (mismatched path formats, progress that never reaches the UI, file handles never released, different permissions once packaged, and errors that never surface in the UI), and unit tests caught none. End-to-end tests also change how the agent codes. OpenAI went further with fixed layers per domain (types → config → repo → service → runtime → UI), with dependencies flowing one way and enforced by a linter: enforce invariants, don't micromanage. And every review comment that keeps coming back becomes an automated check.
See what happens and clean up
Without observability, the agent decides blind, evaluation becomes opinion, and every retry is a shot in the dark. The course separates two layers: runtime observability (logs, traces, health checks), which tells you what the system did, and process observability, which tells you why a change should be accepted. The second is built with a sprint contract agreed before any code (what gets touched, how it is verified, what is out of scope) and a rubric that scores dimension by dimension with concrete evidence: "the button contrast is 2.1:1 and the minimum is 4.5:1", not "it doesn't feel right".
Anthropic published a real case: a browser-based music studio built with Opus 4.6, with a planner (4.7 min, $0.46) and three build rounds and three QA rounds, for a total of 3 h 50 min and $124.70. The evaluator was specific (clips could not be dragged, and the instrument controls were missing), but it was not like that out of the box: at first it spotted problems and talked itself out of them. They tuned it by reading its logs and fixing its prompt wherever its judgment diverged from a human's.
Clean state at the end of every session
OpenAI saw that agents copy the patterns already in the repository, even bad ones. It's like mugs in the office kitchen: someone leaves one, the next person figures it's already messy and leaves another. At first they spent Fridays, about 20% of the week, cleaning up by hand; it did not scale, so they wrote checkable golden rules and set Codex to clean up in the background.
For the course, a session is not done until it leaves a clean state: the build passes, all tests pass, the feature list and progress are up to date, no temp files or debug code remain, and the standard startup works. It illustrates this with an example it explicitly frames as hypothetical: over twelve weeks without cleanup, the build would pass 68% of the time and starting a session would take over an hour; with cleanup, 97% and nine minutes.
And a counterintuitive idea: you prune the harness too. Every piece exists because the model could not do something on its own. With Opus 4.6, Anthropic removed the sprints from its harness because the model could already break up the work, but the evaluator stayed useful near the model's limits. The course suggests disabling one piece a month and measuring. The interesting part of the harness does not shrink with every new model: it moves.
Loops: step away from the keyboard
Everything so far has one thing in common: you are at the keyboard, giving every instruction. Lecture 13 changes that. In early 2026, Claude Code and Codex shipped the same command, /goal: you give it an end state ("all tests green, zero warnings, merged to main"), close your laptop, and the agent analyzes, codes, tests, fixes, and repeats until it gets there. A loop like this has three parts: a goal, a way to verify it, and a stopping condition, decided by an independent judge, not by the agent that did the work.
The course distinguishes four kinds of loop: turn-based (the usual chat), goal-based (/goal), time-based (/loop), and event-driven (a pull request, a failed CI run). And it warns not to mix up the middle two: /goal is a marathon moving toward a finish line; /loop is an alarm clock that starts from scratch every time. The test: does your task have an end?
Several people arrived at the same idea. Peter Steinberger, creator of OpenClaw: you should not be prompting coding agents anymore, you should be designing loops that prompt them. Boris Cherny, head of Claude Code: "my job is to write loops" (he reported landing 259 pull requests in thirty days, all written by Claude Code with Opus 4.5). And Addy Osmani named it in June 2026: loop engineering, replacing yourself as the person who prompts the agent.
Osmani breaks a loop into six pieces: automations (the heartbeat that wakes it up), git worktrees (so several agents can work without colliding), skills (so you stop re-explaining the project), connectors (to touch real tools, like your issue tracker or Slack), sub-agents (to separate the maker from the checker), and external state, the memory on disk that runs through everything else: the agent forgets, the repository does not.
The hardest lesson is the familiar one, now structural: do not let the model grade its own homework. The course puts it this way: a model is its own output's best defense attorney. Someone in your crew must not believe you.
autoresearch, the model loop
The textbook example of a good loop is autoresearch, by Andrej Karpathy (March 2026). It has three files: prepare.py, with data prep and evaluation, which nobody touches; train.py, about 630 lines, the only thing the agent changes; and program.md, the research methodology, written by the human. Humans do not touch code, they touch direction; agents do not touch direction, they touch code.
Each round follows nine steps, like a ratchet that only moves forward: read the direction, survey the state, propose a hypothesis, edit the code, commit, train for exactly five minutes and, if the metric improves, the commit stays; if not, it is reverted. That is about twelve experiments an hour, roughly a hundred overnight. With a private version of this loop, nanochat's training time (GPT-2 level on 8×H100) dropped from 2.02 to 1.80 hours, almost 11% less.
Loops have four silent costs: verification debt, comprehension rot, cognitive surrender, and token blowout. Osmani sums it up: two people can build the same loop; one uses it to go faster on work they understand, the other to avoid understanding it. To get started, the course suggests something small: a task you do by hand twice a week, with its goal and stopping condition, a separate implementer and verifier, a Markdown memory file, and a daily timer.
Graphs of agents
The last lecture starts with a joke. On July 18, 2026, Steinberger tweeted: "Are we still talking loops or have we moved on to graphs yet?" Hours later, Hamel Husain published "Loop Engineering Is Dead. Enter Graph Engineering", whose whole body was a "stop it" GIF. Both were joking, but within a weekend there were courses, roadmaps, and made-up numbers: the "+18% accuracy, −85% cost" claim that went around comes from a paper about chemical piping diagrams, measured against two different baselines. The joke made the idea trendy; it did not create it.
The course sorts the names into four stacking layers (from a thread by Rohit): prompt engineering shapes the instruction, context engineering the information, loop engineering the runtime, and graph engineering the system. None replaces the one before, and the harness is the foundation of all of them.
A graph has four parts: nodes (plain code, a model call, a tool, or a full agent with its own loop), edges (in parallel, conditional, with retries, or rolling back), shared state, and routing rules (if the tests pass, merge; if they fail, go back to implementation; if information is missing, go back to research).
Luis Catacora put it this way: loops have a lot of room for forgiveness; graphs force you to admit how much of your workflow is not actually modeled. A loop is a deferred decision; a graph, an upfront one, more expensive but readable, auditable, and fixable piece by piece. A post from Eigent identifies three ways a single loop fails at scale: Goodhart's law (the classic example: a support loop optimizes closed tickets and the bot learns to close them without solving them), blindness upward (a thermostat cannot ask whether its target temperature is right), and conflict between loops. That is why you need anchors: real outcomes and human spot checks that tie the system to reality.
Isn't this just the workflows we've always had? Half right. They share the skeleton, but in a classic workflow the nodes are deterministic functions, while in an agent graph a node can be a whole agent and a model can decide the route. Tools like LangGraph (January 2024; around 65 million downloads a month by July 2026, according to the course) and the five agent patterns Anthropic published in 2024 were already graphs. The only new thing is that the node went from function to agent.
The course shows how to build your first one in six steps (shared state, nodes, edges, routing rules, a checkpoint that pauses before merging, and running it), with one key detail: the verify node starts with a fresh context and never sees the implementer's reasoning.
And it ends with a bucket of cold water, Osmani's orchestration tax: starting an agent is cheap; closing its loop is expensive, because someone has to check what comes back and reconcile it with what the other agents touched. That someone is you, and there is only one of you: "You are the GIL of your AI agents." Your judgment does not parallelize. That is why the course only asks for a graph if at least three of five criteria hold: independent parts, branches or rollbacks, intermediate state worth saving, verifiable results, and coordination that pays for itself.
To sum up
A powerful model is not enough. What makes a coding agent reliable is the harness: a repository that works as a map, short instructions, written handoffs, one task at a time, end-to-end verification done by someone else, observability, and sessions that end clean. Loops and graphs sit on top, and your judgment is still the bottleneck.
Sources
- Learn Harness Engineering, by Walking Labs (GitHub repository).
- The sources the course cites: OpenAI: Harness engineering, Anthropic: Effective harnesses for long-running agents, Anthropic: Harness design for long-running application development, and Addy Osmani: Loop Engineering.
- The video on my Articulator channel: in English and in Spanish.