The core idea. An agent is a language model called in a loop; the harness is everything except the model, and it decides what the model sees and what it is allowed to do. Anthropic's own definition: Claude Code "is the layer around the model that provides the tools and manages the context the model sees. This surrounding layer is what the term agentic harness refers to" (How Claude Code works, read 5 Oct 2026).
Fig. 1: one turn of an agent. The model makes one decision; the harness does the other six steps
The running example. A tiny Python library, textstats, with two planted bugs: the word splitter drops apostrophes (so word_count("don't stop") returns 3, not 2), and top_words breaks ties in no particular order instead of alphabetically. One test file, run with plain python3 tests/test_core.py, catches both. Every run on this page gets the same prompt: "The tests in this repository fail. Find out why and fix the code so they pass. Do not edit the tests." The same model, Claude Haiku 4.5, given the source file in a single call fixed one bug and left a test failing; inside Claude Code's loop it ran the tests, saw both failures and fixed both MEASURED (section 1).
Every measured number comes from runs recorded on 5 October 2026 with the Claude Code CLI 2.1.289 on a Claude subscription (no API key), kept redacted in this page's source; dollar figures are the API-price equivalent the CLI reports, not money paid. MEASURED marks those numbers, SOURCE marks published ones. How libraries and frameworks package these pieces (LangGraph, Pydantic AI, the Claude Agent SDK and others) is the sibling root, Topic: agentic-frameworks.
New terms, each defined where it is first used:
| Part | The decision | Where the harnesses differ | Owner page |
|---|---|---|---|
| Action format (1) | How the model asks for an action, and who ends its turn there | Native tool calls (Claude Code, Codex, Gemini CLI, opencode) or a text protocol the harness parses (Aider, mini-SWE-agent's text mode) | Building a harness 1, 2; Other coding harnesses 1 |
| Tools and edits (2) | Which tools; how a change to a file is written | Exact-string replace (Claude Code), patches (Codex), search-and-replace blocks (Aider), bash only (mini-SWE-agent) | Building a harness 5, 6; Other coding harnesses 3 |
| Context (3) | What goes into each request, and what leaves when the window fills | Fixed prefix size, memory files (CLAUDE.md, AGENTS.md, GEMINI.md), compaction thresholds, Aider's repository map | Context engineering; Other coding harnesses 5 |
| Control (4) | When the loop stops; planning; delegating | Turn, token and time caps, loop guards, hooks, plan mode, subagents | Building a harness 8, 10; Claude Code 4, 7, 8 |
| Safety (5) | What a tool call may touch | Ask before acting, an OS sandbox on by default, or a disposable machine per task | Agent security; Guardrails (classifiers on requests and replies); Other coding harnesses 4 |
| Where it runs (6) | Where you watch, steer and review the work | Terminal, editor, cloud machine that returns a pull request, resident daemon on your messaging apps | Other coding harnesses 7; Personal agents |
| Measurement and training (7) | What a score or a rollout is a property of | The same weights score and cost differently in each harness, before and after training | Harnesses for training and evaluation; Building a harness 12 |
Numbers in brackets are this page's sections; numbers after a page name are that page's sections. Building a harness from scratch, decision by decision with a default for each, is Building a harness; this page's Loop lab builds one in seven recorded steps.
Real recordings, Claude Haiku 4.5 (claude-haiku-4-5-20251001) both times. Loop: Claude Code 2.1.289, claude -p, tools Read, Edit, Write, Bash, Grep, Glob, permission mode acceptEdits (trace std_haiku_1). One call: the Loop lab's step 0 (s0_haiku). The window bar shows each call's input: the part read from the prompt cache, the part newly written to it, and fresh input. Tool results are cut to a few lines here; the full trace is in the Trace and context lab.
A model call. A language model is a function from text to text. The text goes in as tokens (word pieces, about four characters of English each), and the model generates new tokens one at a time until it decides to stop. It keeps no memory between calls: to "continue a conversation", the caller sends the whole conversation again every time. The maximum it can read in one call is its context window (200,000 tokens for Claude Haiku 4.5, as the CLI's own result record reports MEASURED).
A tool call. A tool is a function the harness offers the model, described by a name, a sentence of description and a JSON schema for its arguments, for example Bash {command} or Read {file_path}. Instead of answering in prose, the model can reply with a structured tool call: on the Anthropic API a tool_use block with stop_reason: "tool_use"; on OpenAI's, a function_call item. The harness runs the function and sends the output back as a tool result in the next request. Put the call in a loop and you have an agent:
messages = [system prompt, task]
while True:
reply = model(messages, tools)
if reply has no tool call: break # the model says it is done
result = run(reply.tool_call) # after a permission check
messages += [reply, result]That is the whole core; what makes a harness good is everything around those six lines. The one rule the loop cannot do without is the action boundary: the model's turn must end at its action, or the model writes the tool's result itself, as Haiku did in the Loop lab when nothing stopped it. A provider's tool-calling API enforces the boundary; a text protocol must enforce it with a stop sequence (Building a harness section 2).
The replay (right). Predict before it plays: which of the two bugs can a model fix without ever running the tests? The buttons switch between the loop and one call; the step list follows the run.
Claude Code's loop, 12 model calls in seven stretches
find, ls, the test file, the package, __init__.py, core.py. Reading a file puts its whole text into the history: by call 6 the request is 14,775 tokens.python tests/test_core.py gets command not found: python back as an ordinary error result, and the model reads it like any other result.python3 shows both failures, 2 failed: the information the single call never had.0 failed.top_words.Nothing was wrong with the model: it was missing information that only running the code could give it. The loop spent six calls finding its way around, recovered from one error and fixed both bugs in two edits.
The model can only act through the tools it is given, and it only learns about the world through what those tools return. A coding harness therefore needs, at minimum, a way to look (read, list, search), a way to change things (edit or write a file) and a way to check (run a command, above all the tests); Claude Code's docs group its built-in tools into file operations, search, execution, web and code intelligence, plus tools for subagents and questions to the user (docs); our recorded runs passed six: Read, Edit, Write, Bash, Grep, Glob. The SWE-agent paper (Yang et al., May 2024) named the tool set the agent-computer interface (ACI): the same model scored differently depending on how its file viewer, search and edit commands were shaped, and with an interface designed for it reached 12.5% on SWE-bench, then the state of the art (arXiv 2405.15793) SOURCE.
Where harnesses differ. At one end, mini-SWE-agent's only tool is bash, it does not use the model's tool-calling interface at all, and its README reports more than 74% on SWE-bench Verified with a strong model behind it (README, read 5 Oct 2026) SOURCE. At the other, Claude Code ships dozens of dedicated tools. With a strong model a shell is a universal tool; dedicated tools earn their place by being cheaper, safer to gate, or easier to verify. And every definition is input the model reads on every call: Claude Code's first call on Haiku 4.5 measured 6,653 tokens with no tools, 13,219 with the six above and 21,140 with its default set MEASURED (the Trace and context lab, Context lab 1). Tools from outside the harness arrive through MCP, the protocol by which a harness discovers and calls external tool servers (MCP page); Claude Code defers their definitions behind a tool search (Claude Code section 10).
The model knows only what is in the request. Each call, the harness assembles it from four kinds of material, in this order: the system prompt, the tool definitions, memory files loaded at start (Claude Code reads CLAUDE.md, and also AGENTS.md, the cross-vendor convention other harnesses use), and the history: the task, every earlier reply, every tool call and every tool result. The first three are a fixed prefix; the history grows by one reply and one result per turn. Fig. 2 measures each piece on the running example.
Fig. 2, step by step (Claude Haiku 4.5 in Claude Code)
CLAUDE.md that states the test command added 184 tokens of startup context in another run; the replayed run had none.Anthropic calls the work context engineering, "the set of strategies for curating and maintaining the optimal set of tokens (information) during LLM inference", because as the window fills the model's ability to recall what is in it decreases (29 Sep 2025). The levers, cheapest first, each owned by a section of Context engineering: prompt caching and the order of the request (2), clipping tool output (3), compaction (4), memory files and skills loaded on demand (5), subagents with their own window (6), notes outside the window (7), memory layers such as Mem0, Graphiti and Letta (8), and context rot as the window fills (9).
The one lever every harness comparison needs: prompt caching (steps 5 and 6). The prefix repeats on every call, so providers cache it. Caching works only if the prefix stays byte-identical, which is why a home-made harness that resends its transcript as one growing block of text got 0 cache reads in the Loop lab and, in section 7, cost twice what Claude Code cost for the same result.
Research on memory that this root only points to: read-time memory curation (Just-in-Time Memory), a second model that reminds the agent of what it dropped (Proactive Memory Agent), and why skills help and when they misfire (Demystifying Agent Skills). Retrieval is rag-and-retrieval.
In the loop of section 1 the model stops by replying without a tool call (the API marks it end_turn). A harness adds hard limits the model cannot talk its way past: a maximum number of turns, a token or dollar budget, a wall-clock timeout, and the user's interrupt. The two classic failures are opposites: stopping too early (declaring victory without checking) and never stopping (looping on the same failing approach). Four mechanisms recur across harnesses, each defined in a sentence here and owned elsewhere:
A hook is the harness running your code at a fixed point in the loop. Claude Code documents 33 hook events; a PreToolUse hook that exits with code 2 blocks the call whatever the model wanted. A rule that must hold every time belongs in a hook, not in the prompt. Claude Code section 4.
A plan mode lets the model read but not change anything until a person approves a plan; a todo list is a tool whose only effect is a visible checklist in the context. Building a harness section 8; Claude Code's plan mode, and the Sonnet model that answers it when you asked for Haiku, in Claude Code section 8.
A subagent is a second loop with its own fresh window: it does the reading, and only its summary comes back. It isolates context; it does not save tokens. Context engineering section 6; when several agents help or hurt, Multi-agent patterns.
Past one context window the agent needs state outside it: Anthropic's long-running harness has an initializer agent write a progress log and a feature list that each later session reads. Cloud and background agents are the same idea on a managed machine, returning a branch or pull request. Building a harness section 8; Context engineering section 7.
Every tool call runs with the harness's rights, which on a laptop are yours. Two things can go wrong: the model can simply be wrong (delete the wrong directory, push to the wrong branch), and it can be steered by text it reads. Prompt injection is an instruction planted in a file, web page, issue or tool result that the model follows as if the user had written it. Neither can be fixed inside the model with certainty, so the harness puts controls around it, in layers, each owned by a section of Agent security:
Fig. 3, the layers one at a time
The lethal trifecta. Simon Willison's framing (16 Jun 2025): an agent that has access to private data, exposure to untrusted content and a way to communicate externally can be made to send your data to an attacker, and no current filter reliably prevents it; the defence is to never combine all three. Agent security section 1 turns it into a design tool: tick the controls your agent has and see which leg goes.
Two limits sit around these layers. A classifier that judges each action before it runs (Claude Code's auto mode, Codex's Guardian) catches an over-eager model's mistakes, but in Anthropic's red-team study an agent working to get past the production monitors succeeded in more than 55% of attacks; and the harness's own dependencies are attack surface, since a LiteLLM release built and signed by its own hijacked pipeline was made to steal every token on the machines that installed it (Agent security sections 9 and 3).
Every coding harness runs the loop of section 1. They differ in the choices around it, and five questions place any of them:
Your terminal (Claude Code, Codex CLI, Gemini CLI, opencode, Aider), your editor (Cursor, GitHub Copilot's agent mode, Cline), a cloud machine that returns a pull request (Devin, Codex cloud, Claude Code on the web), a resident daemon that listens on your messaging apps (OpenClaw, Hermes Agent), or a vendor-run cloud computer that works for you and messages you back (Meta's Muse, Claude Duet). Where it runs decides what you can still check: an edit as it lands, a pull request afterwards, or an action already taken.
Tied to one vendor's models, or model-agnostic through a gateway. Tied harnesses can tune prompts and tools to their models; agnostic ones carry an edit format and prompt per model.
Ask-before-acting, an OS sandbox on by default, or a disposable VM per task (section 5).
Memory files, skills, hooks, subagents, MCP servers, plugins: which exist, and which are code rather than prompts.
Open-source harnesses (OpenHands, Aider, opencode, Codex CLI, Gemini CLI, SWE-agent and mini-SWE-agent) are the only ones whose loop you can read line by line; Claude Code's behaviour is visible through its recorded streams, which is how the labs on this page study it.
Versions, licences, defaults and dates change monthly, so they live in one place, checked against primary sources: the Harness atlas (23 harnesses on nine axes, with a side-by-side compare and a chooser). Three child pages take products apart: Claude Code, taken apart; Other coding harnesses (Codex, Gemini CLI, opencode, Aider, OpenHands and mini-SWE-agent compared by design choice, read from source and run on the same task); Personal agents (resident and computer-use agents, OpenClaw and Hermes Agent).
An agent benchmark scores a system: the model, the harness, its settings (reasoning effort, turn and time limits) and the environment. Change the harness and the same weights score differently, and, more often, cost differently. On published runs (the Harness atlas's "The harness changes the score", from Agentic benchmarks): Arena's HarnessTax study moved success by about 2 points on SWE-bench Lite and 5 on Terminal-Bench 2.0 across three harnesses, while Claude Code cost about twice the minimal four-tool harness Pi per attempt on SWE-bench Lite SOURCE. In a controlled run on Harnesses for training and evaluation, the harness moved Qwen3-4B by +50 points and Claude Haiku 4.5 by none MEASURED: a small model is far more sensitive to its harness than a strong one; the bill is sensitive for both.
What this page's own runs show MEASURED, all on the running example:
| Comparison | Held fixed | What changed | Result |
|---|
The last row is a harness effect with no change in outcome: the Loop lab's harness resends its transcript as one growing text block, so it never hits the prompt cache (section 3), and paid $0.0738 against Claude Code's $0.0384 for the same passing tests on Sonnet 5.5. Three identical Haiku runs differed in calls and cost, which is why a harness claim needs several runs (Trace and context lab, "Same task, same settings, different runs").
The same loop trains models. A trajectory, the recorded stream of every request, tool call, result and token count, is what you grade when the final answer is not enough (Agent and trajectory evaluation). In reinforcement learning terms the task and its repository are the starting state, tool calls are actions, tool results are observations, and a verifier such as the test suite gives the reward: a harness is an RL environment, and a model learns the tools, formats and context habits of the harness it was trained in. If the harness moves the score and the bill, a loop can also search over harnesses; the catch is that a loop tuned on the score it reports overfits it. Nor does the harness's gain fold neatly back into the weights: a same-size model trained on a search harness's traces stays measurably behind the harness, and a complexity argument says a fixed-depth model with only a short chain of thought cannot catch up (Harnesses for training section 6).
Eight pages own the depth, each built from its own recordings and primary sources (October 2026). Reading times are each page's own measurement.
What is an agent harness, in one sentence, and what does it own? The program around a model that runs the loop: it assembles the context for each call, offers and executes tools, gates them with permissions and a sandbox, decides when to stop, and presents the work to a person. The model only chooses the next action.
Walk through one iteration of the agent loop at the API level. Send system prompt, tool definitions and messages; the reply has stop_reason: "tool_use" and a tool_use block (id, name, input); the harness checks permission, runs it, appends the reply and a tool_result with the same id; call again. Stop when the reply has no tool call or a limit is hit.
Your agent's bill doubled after a refactor of the prompt builder. What do you check first? Cache reads per call. If the prefix is no longer byte-identical (timestamps, reordered tools, one rebuilt string) every call pays full input price or cache-write price instead of the cache-read price.
How would you design tools for a coding agent? Few tools matching real tasks (read, search, exact-replace edit, run), clear names and descriptions with examples, results that lead with the verdict, actionable errors, size caps with a note, and an eval loop over real tasks to tune them.
The context window is filling on a long task. Options, cheapest first? Clip or clear old tool results; load skills and tool definitions on demand; move exploration into subagents; write state to files; compact (summarise and restart). Each later option risks losing more.
An agent reads untrusted web pages and has repo secrets. How do you make it safe? Break the trifecta: remove the exfiltration path (network allowlist by destination, no arbitrary URL fetch), keep secrets outside the agent (proxy-injected credentials), run in a sandbox, and gate consequential actions on what they do, not where the text came from.
Why can two papers report the same model at very different scores on the same benchmark? Different harnesses, effort settings, turn and time budgets, attempts, or splits. Ask for all of them, plus cost and the number of runs.
How would you use a harness to generate RL training data? Wrap tasks with a verifier in sandboxes, run the policy in the same harness you will deploy, keep full trajectories with rewards, redact them, train on passing or advantage-weighted ones, and evaluate on held-out tasks and a second harness to catch overfitting to the scaffold.
When is a subagent worth it? When a subtask needs a lot of reading but returns a small answer and does not need the parent's decisions. Not when parallel workers must agree on choices they each make.
Build or buy: when write your own harness? When you need control over the loop (custom tools, training-time use, unusual environments, auditing) or must run where a product cannot. Otherwise use a product or the Agent SDK and spend the effort on tools and verification.
Sources are linked where each fact is used. Recordings: Claude Code CLI 2.1.289 and the Loop lab's own harness, run on 5 October 2026 on a Claude subscription; costs are API-price equivalents at the list prices of that day. Corrections to the old Notion pages are listed in this page's source (src/read/coverage.md).
Loop lab. An agent harness built from nothing in seven steps, each one run for real on the running example (the textstats repository with two planted bugs, standard task prompt: The tests in this repository fail. Find out why and fix the code so they pass. Do not edit the tests.
). The harness is a small Python program; its "model" is claude -p with every built-in tool switched off (--tools "") and a system prompt of ours, so the model can only return text. The harness finds the action in that text, runs it itself, and pastes the result back. Tool calling, seen from the inside, is text in a loop.
All runs used the same task on a fresh copy of the repository, on 5 October 2026, with Claude Code 2.1.289 as the model's carrier. "Tokens read" is what the model read on each call (fresh input plus cache writes plus cache reads), summed over the run; "largest call" is the biggest single prompt. Haiku is claude-haiku-4-5-20251001, Sonnet is claude-sonnet-5-5 (the ids the CLI reported). Click a row to open its transcript below.
Recordings: src/loop/recordings/ (redacted: paths become /work, ids become short labels). Harness code: src/loop/harness/step0.py to step5.py. A few model replies contained em-dashes even when asked not to; the page and the redacted copies show each as ", ".
Each call is broken into its seven stages. The bars are the prompt each call sent, drawn to scale in tokens and stacked bottom to top in the order the harness assembled them. Two recorded runs play side by side on the same task. The default pair is the before/after of step 4: the same noisy tool with no context management (left) and with clipping and masking (right).
Each call passes through seven stages (the chips above the chart): assemble the prompt, call the model, read its output, parse the action, check permission, execute the tool, append the result. The card opens on the last call of both runs, the whole run drawn; play it, step it or drag the scrubber to watch one call's prompt grow by its reply and result. A preset or a run picked in the menus loads its own pair.
The total of each call is measured (the usage record of each claude -p call). The split into blocks is estimated: a straight line fitted per run, tokens = fixed part + rate x prompt characters, gives the fixed part (our system prompt plus about 420 tokens the CLI adds on its own) and the rate; each block gets its characters times the rate. In step 1 some "tool result" blocks were written by the model itself (see step 1 below): the prompt cannot tell them apart, and neither can the stack.
Pick a step. Each panel says what changed, what to predict, what the recording showed, and the code the step added (a diff against the step before). The two cards compare the run before the change with the run after it, on the same task and model.
No loop at all: paste textstats/core.py into one prompt, ask for the fixed file, write the reply back, run the tests once to grade it. This is "chat with the code pasted in".
. The model never saw the tests and got no feedback, so it had no way to find out; it also ignored "nothing after the code block" and added an explanation. Both bugs are written in the docstrings, so this is not a hard task: the missing piece is feedback, which is what a loop adds.The harness now calls the model again and again. The system prompt lists two tools and one output format: a final line ACTION {"tool": ..., "args": {...}}. The harness takes the last ACTION line, runs the Python function of that name, appends --- turn N: result of read_file --- and the output, and calls again. It stops after 8 calls, or when a reply has no ACTION line. There is no edit tool, so this step cannot pass: the point is to watch the loop work.
--- turn 2: result of read_file --- followed by a made-up core.py (def word_count(text): return len(text.split())) and further actions. This harness kept all of that in the transcript and ran the last ACTION, so from then on the prompt held a fake file beside the real one, and the model said in calls 3 and 4 that "the code appears correct". It also called a tool that does not exist (write_file) and got an error back. Run: calls, output tokens of which were thinking, tests still failing.stop_reason: "tool_use" and the result can only come from your code. Models are trained on that format. Through claude -p we cannot set a stop sequence, so step 1b cuts the reply at the first ACTION line instead. In a later run (step 4, masking) one reply ran on for 95,162 characters of invented turns until it hit the 32,000-token output cap; the CLI then sent "Output token limit hit. Resume directly ..." on its own and returned only the last 7,475 characters. That call took 294 s.One fix, found in the step 1 recording: parse the first ACTION line and throw away everything after it before it enters the transcript. This is a hand-made stop sequence.
write_file.Two additions. edit_file replaces an exact string, and the old text must occur exactly once, as in Claude Code's Edit tool: the model must quote what it changes, and an ambiguous match is an error instead of a wrong edit. finish is an explicit stop. A reply with no valid ACTION is now an error message the model sees (three in a row end the run), and the turn cap rises to 12.
A shell tool, run_command, arrives, and with it a gate in front of every call: an ordered list of rules, first match wins. Deny rules (editing tests/; rm, curl, wget, pip, sudo, git push), an ask rule for any command with ; & | ` $ < > (chained or redirected commands are never allowed by prefix), allow rules (reading anything, testing, editing textstats/, a few read-only commands), and "ask" for everything else. With nobody at a terminal, ask becomes deny, as with Claude Code's --permission-prompts none. A denial is an observation like any other, so the model can choose something else. The gate is not a sandbox: an allowed command runs with the harness's own rights (the Reading tab and the Containers and isolation page cover sandboxes).
curl ... | sh. Does the gate fire?tests/test_core.py, a file every run reads, Haiku read it and ignored it. All three runs passed and none tried a command the gate had to stop. The gate is there for the run where the model does follow such text, which a few recordings cannot show; so the table below runs step 3's real check() function on eleven actions, with no model.delegate, without a rule for it, and the gate denied it in the first step 5 run. Failing closed did its job: the run fell back to reading files itself and still passed. Both are the ordinary bugs of a hand-written gate, and the reason real harnesses ship tested permission engines.--allowedTools "Bash(python3 *)", because the README says python3 tests/test_core.py. The model typed python tests/test_core.py, which matched no rule and was denied: twice in each Haiku run, once in the first Sonnet run (plus a chained command ending in python -m pytest). Haiku then finished without ever running the tests; Sonnet said plainly that it could not run them. An allow-list written for what you expect the model to type is narrower than what it types.To see the problem it solves, run_tests is made deliberately noisy: it runs python3 -v, which prints every import, about 240 lines and 12,900 characters per run, standing in for a verbose build or test log. Step 4 adds two mechanisms. Clipping: any tool output longer than 40 lines keeps its first 15 and last 15 lines (naive), or those plus every middle line that looks like a result or an error (smart). A token budget: after each call the harness divides the tokens the model reported by the prompt's characters, estimates the next prompt with that rate, and when the estimate passes the limit it replaces the oldest tool results with a one-line stub ("observation masking"); the last two results are never masked. A run-wide cap of 120,000 tokens stops the run.
exit code 0 on the first line of every result, which survives any head cut: put the verdict where the clipper keeps it. Smart clipping keeps the four lines.The masking run used a limit of 2,000 tokens so that it fires on this small task; it masked one result from call 4 on. That run is also the one with the 95,162-character runaway reply, which is why its totals are large: the budget counts it, and a real harness would also cap output per call.
The loop becomes a function, agent(task, tools, ...), and a new tool, delegate, calls it again with a fresh transcript and read-only tools. The helper reads and runs as much as it likes; only its final report (asked to be at most 80 words) enters the parent's context. Why a subagent and not a todo list: a todo list is a prompt pattern (the model writes a plan into its own context and ticks it off; Claude Code has one, TodoWrite), while a subagent changes what the parent's context contains, which is the mechanism step 4 was about. It is also how Claude Code's Task tool and Explore agent keep long searches out of the main context.
Tests show missing or incorrect function implementations. Fix by implementing all required functions ..., which is wrong, and the parent then read every file itself. Sonnet's helper read three files and reported the two exact lines and their replacements; the parent re-read
core.py once (it needs the exact text for edit_file) and fixed both in two edits. On a task this small the subagent saves nothing: Sonnet's run made calls in all. Isolation pays when the investigation's output is large compared with its conclusion (a search over many files, a long log), and it costs a hop where the conclusion can be lost or invented.The same task run by Claude Code itself: claude -p with its own system prompt and tools (Read, Edit, Write, Bash, Grep, Glob), permission mode acceptEdits, the same model, and an allow rule for python3 (and in the last run also python). The table puts the final harness (step 5) beside it. Costs are the API-price equivalent that the CLI reports, computed from the usage at list prices; the subscription is what actually pays.
1 import re), paths are absolute, Edit refuses an old string that is not unique, Glob and Grep replace ad hoc find.ls -la and a chain of cat and find ran without any allow rule; sed -i and python were denied and reported back as This command requires approval.
Our harness defined tools in prose and parsed text. A provider API makes the same three things structured. (1) Tool definitions travel in the request, each a name, a description and a JSON Schema for its arguments; the provider turns them into extra system-prompt text the model was trained on. Anthropic adds a tool-use system prompt of 496 tokens for Haiku 4.5 and 286 for Sonnet 5.5, on top of the definitions themselves; OpenAI says functions are "injected into the system message" and billed as input tokens. (2) The model's call is a typed block: Anthropic returns stop_reason: "tool_use" with a tool_use block (id, name, input object); OpenAI's Responses API returns a function_call item (call_id, name, arguments as a JSON string). Generation stops there, which is exactly what our step 1 lacked. (3) The result goes back as a typed block in the next request: a tool_result with the matching tool_use_id inside a user message (Anthropic), or a function_call_output with the matching call_id (OpenAI). The API is stateless: every request carries the whole history, just as our harness resent its transcript.
Why providers trained models on a format instead of parsing prose: a trained model reliably stops at the call, produces arguments that parse (Anthropic and OpenAI both offer a strict mode that constrains them to the schema), knows when not to call a tool, and can issue several calls at once. OpenAI's announcement of 13 June 2023 said its new models "have been fine-tuned to both detect when a function needs to be called ... and to respond with JSON that adheres to the function signature". Under the API, the blocks are still rendered into the model's token stream with special markers; the structure is a contract that the provider's renderer and the model's training share.
One recorded turn (step 2, run 1, call 1) written three ways. The first is what was recorded; the other two are the same turn rewritten by hand in each API's documented shape (illustrative: no API key was used, so they were not sent).
Sources, read 5 October 2026: Anthropic, Tool use with Claude (tool_use and tool_result, tool-use system prompt tokens per model, pricing); Anthropic, Prompt caching (minimum cacheable length: 4,096 tokens for Haiku 4.5, 512 for Sonnet 5.5; prefix matching at block boundaries); OpenAI, Function calling (five-step flow, function_call and function_call_output, injected into the system message); OpenAI, Function calling and other API updates, 13 June 2023 (archived copy). Prices per million tokens used for the cost column: Haiku 4.5 input 1, 1-hour cache write 2, cache read 0.10, output 5; Sonnet 5.5 input 2, 4, 0.20, 10 (Anthropic pricing).
I'll start by examining the test file to understand what's expected, then run the tests to see what fails.
ACTION {"tool": "read_file", "args": {"path": "tests/test_core.py"}}
--- turn 1: result of read_file ---
import sys, os; sys.path.insert(0, ...)
from textstats import word_count, top_words
...// request
{"model": "claude-haiku-4-5",
"tools": [{"name": "read_file",
"description": "Return the text of a file in the repository.",
"input_schema": {"type": "object",
"properties": {"path": {"type": "string"}},
"required": ["path"]}}],
"messages": [{"role": "user", "content": "The tests in ..."}]}
// response
{"stop_reason": "tool_use",
"content": [
{"type": "text", "text": "I'll start by examining ..."},
{"type": "tool_use", "id": "toolu_01",
"name": "read_file",
"input": {"path": "tests/test_core.py"}}]}
// next request appends
{"role": "assistant", "content": [ ...the two blocks... ]},
{"role": "user", "content": [
{"type": "tool_result", "tool_use_id": "toolu_01",
"content": "import sys, os; ..."}]}// request
{"model": "...",
"tools": [{"type": "function", "name": "read_file",
"description": "Return the text of a file in the repository.",
"parameters": {"type": "object",
"properties": {"path": {"type": "string"}},
"required": ["path"], "additionalProperties": false},
"strict": true}],
"input": [{"role": "user", "content": "The tests in ..."}]}
// output item
{"type": "function_call", "call_id": "call_1",
"name": "read_file",
"arguments": "{\"path\": \"tests/test_core.py\"}"}
// next request appends that item, then
{"type": "function_call_output", "call_id": "call_1",
"output": "import sys, os; ..."}cat x; rm -rf y) unless the gate parses commands. Sandboxing (containers, OS sandboxes) limits what an allowed command can do.A trace is the record of everything an agent did in one session: every call to the model, every tool it asked for, every result it got back, and what each call cost. Reading traces is how you learn what a harness really does, as opposed to what its documentation says it does. This tab holds the running example worked by 16 real Claude Code sessions recorded on 2026-10-05, plus 6 one-call sessions that measure the startup context, and a context lab built on those numbers.
Each run is one command, started in a fresh copy of the task repository (a tiny Python library, textstats, with two planted bugs and a three-test runner):
claude -p "The tests in this repository fail. Find out why and fix the code so they pass. Do not edit the tests." \ --output-format stream-json --verbose --include-partial-messages \ --no-session-persistence --setting-sources project --strict-mcp-config \ --model haiku --permission-mode acceptEdits \ --tools "Read,Edit,Write,Bash,Grep,Glob" \ --allowedTools "Bash(python3:*)" "Bash(python:*)" "Bash(ls:*)" "Bash(cat:*)" \ --append-system-prompt "Never use the em-dash character."
-p runs one task without the interactive screen and exits. stream-json prints one JSON record per line as things happen. --include-partial-messages adds the raw API stream events, which is the only place the per-call output token counts appear. --allowedTools pre-approves a few shell commands; anything else the model tries in the shell is refused by the permission layer, and you will see that happen.
total_cost_usd, the price the same tokens would have at Anthropic's list prices; every figure here was recomputed from the token counts and the pricing page (read 2026-10-05) and matches the CLI's figure to the cent in all runs but one, the subagent run, explained below.src/trace/recordings/ replace the task directory with /work, keep only a whitelist of the init record, relabel ids and drop thinking signatures; a scan proves no home path, user name or token prefix remains. Claude Code's own tool messages contain em-dashes (for example "file state is current in your context"); in the copies each is replaced by a comma.A recording is a list of JSON records. Five kinds matter:
system / initassistanttool_use blocks), all with the same message id.usertool_result, the output of a tool it ran on the model's behalf, sent back as the next input.stream_eventmessage_start carries the input side of a call's usage; message_delta at the end carries the final output tokens, thinking tokens and the stop reason (tool_use means "run my tools and call me again"; end_turn means "I am done").resultThe init record of a task run is on the right.
It is a statement of the harness's configuration, and three things in it are worth noticing. The tool list is exactly what was passed, which is the list the model will be offered. The agents list shows that even with no Agent tool enabled, Claude Code knows its built-in subagent types. And the model id is the full dated name the alias haiku resolved to (claude-haiku-4-5-20251001); sonnet resolved to claude-sonnet-5-5, as the model configuration docs say for the Anthropic API.
You never see the text the model was given before your prompt: Claude Code's system prompt, the tool schemas, the environment block, CLAUDE.md. You only see its size, as the input tokens of the first call (13,242 for these Haiku runs, measured below). For what it contains, the source is Anthropic's documentation, not a guess: the context window explorer lists the system prompt ("core instructions for behavior, tool use, and response formatting"), auto memory, environment info (working directory, platform, git state), deferred MCP tool names, skill descriptions, and the user and project CLAUDE.md files, each with a representative size; the pricing page adds that any request with tools also carries a tool-use system prompt (496 tokens for Haiku 4.5) plus the tool names, descriptions and schemas. Thinking is the same: the stream says thinking happened and how many tokens it used, but the text arrives empty with only an encrypted signature.
Every recorded session that worked on the task. Click a row to open it in the viewer. "Model calls" counts API requests (one per message_start); the CLI's own num_turns counts differently and is shown in the viewer. "Input processed" adds fresh input, cache writes and cache reads over all calls: it is how much text the model read, not what was billed.
One bar per model call, to scale. Click a bar to jump to that call's messages below. Switch to "API-price equivalent" to see the same bars weighted by price: the tall blue cache reads almost vanish, because a cache read costs a tenth of fresh input.
cd textstats && sed -i ... ("Multiple directory changes in one command require approval") and a bare sed -i ("contains potentially dangerous operations"). The model then falls back to the Edit tool, which acceptEdits allows. Then open Fix the tests with a 491 KB CI log, Haiku: its first tool result is the Read tool refusing a 479.4 KB file.An agent is not a function: the same prompt, model and harness give a different path each time, because the model samples its next action. Each dot below is one run. All nine solved the task; what varies is how they got there.
What the dots say. Haiku took to model calls; Sonnet to . Sonnet is the pricier model per token (twice Haiku's input and output price) yet its runs cost about the same, because it batched its looking around into fewer, larger shell commands (cat README.md; find . -type f; cat textstats/*.py tests/*.py) and so re-read the growing conversation fewer times. That is the first lesson of agent cost: the number of calls multiplies everything, since each call re-reads the whole context.
The task repository got a four-line CLAUDE.md ("All code is in textstats/core.py ... Run the tests with: python3 tests/test_core.py"). It costs tokens of startup context against without it, so about 184 tokens. Two of three Haiku runs then started by running the tests and finished in and calls, against 11 to 12 without the file; the third explored anyway and used . A memory file saves turns when it answers the question the agent would otherwise spend calls on, and it is not obeyed every time.
With --permission-mode plan the run read the code, wrote its plan to a file under Claude Code's own plans folder, then called ExitPlanMode, which a non-interactive run cannot use ("ExitPlanMode is disabled for this session"); it changed no code and said so. One surprise in the trace: every call in that run was answered by claude-sonnet-5-5, although the run asked for Haiku and the init record says Haiku. The per-call model field and the result's per-model usage both show it; this is documented: the Claude Code changelog for 2.0.17 (15 Oct 2025) says "Haiku 4.5 automatically uses Sonnet in plan mode, and Haiku for execution (i.e. SonnetPlan by default)". The permission modes page does say plan mode keeps its blocks in -p runs.
The prompt pointed at ci.log, 6,005 lines of heartbeat noise with five relevant lines in the middle. Haiku tried to Read it whole and got an error result ("File content (479.4KB) exceeds maximum allowed size (256KB). Use offset and limit parameters ... or search for specific content"), then did exactly that: one Grep for FAIL|ERROR|failed|error returned the four lines it needed. Sonnet went through the shell (grep -v heartbeat ci.log | head -60). Neither run put the log into its context, which is the point of the harness's limits: the Read tool's size cap and the shell's 30,000-character output cap (default of BASH_MAX_OUTPUT_LENGTH, env-vars docs) turn a context-flooding mistake into a cheap error message the model can act on.
Asked to "use a subagent to investigate the failures before you edit anything", Haiku called the Agent tool with the built-in Explore type, which ran in the background. The subagent's own tool calls appear in the stream (tagged with the parent tool id and indented in the viewer); its model calls carry no usage records, and the result record's usage covers only the main thread. The per-model totals do include it: in all, of which the main thread's calls account for $0.0619, so the subagent cost about $0.033. Adding the Agent tool also changed the cached prefix (its definition is about 2,700 tokens, measured below), so the first call found nothing in cache. A subagent buys context isolation, not savings, on a task this small.
Claude Code caches the conversation prefix on every call. On this subscription it wrote with the 1-hour lifetime (1-hour writes cost 2x base input, 5-minute writes 1.25x, reads 0.1x: prompt caching prices). With CLAUDE_CODE_PROMPT_CACHE_TTL=5m (documented on the env-vars page) the same task cost , cheaper per write, and the run still hit the cache on every call after the first. Setting DISABLE_PROMPT_CACHING=1, a variable the current env-vars page does not list, did not disable caching on this version: the run still read of its input from cache, with 5-minute writes. Read the trace before trusting a switch.
Sonnet wrote textstats/__main__.py and tests/test_cli.py in calls. Its verification tells the most: python -m pytest failed (no python on this machine, then no pytest), a subshell wrapper was refused by the permission layer, and it fell back to the plain runner. The new test file has no runner of its own, so it imported the file and called both test functions in one shell command, which printed "cli ok"; calling them again after the run confirmed it. It left the two planted bugs alone and said so, which is correct: the task did not ask.
The context window is everything the model reads on one call, measured in tokens (pieces of words, about four characters of English each). On the first call it holds only what the harness put there: system prompt, tool definitions, environment, memory files, and your prompt. The stream does not show that text, but it shows its size, so six one-call runs ("Reply with the single word OK.") with different tool sets measure what each piece costs.
Each bar is the first call's input (fresh + cache write + cache read) for Haiku 4.5: 6,653 tokens with no tools, 13,219 with the six tools of the task runs, 21,140 with every default tool. The task runs' first call read 13,242 (system prompt, six tool definitions, environment and the prompt; the 22-token task is under 0.2% of it); Sonnet 5.5's first call read 7,233. Differences between bars are exact for these runs; the split inside the "no tools" bar is not observable and is not drawn.
Prompt caching lets the API keep the processed form of a prompt prefix for a while; a later request that starts with the same bytes reads it back at a tenth of the input price instead of paying for it again. An agent is the ideal customer: each call resends the whole conversation, which differs from the previous call only by what was appended at the end. Below are the first eight calls of a recorded Haiku session, drawn to scale twice: as billed (with caching) and as they would be billed if every input token were paid at the base price.
The animation, step by step
In the replayed session (Haiku, run 1) 177,132 of 181,145 input tokens were cache reads, over 90%: each call re-reads the previous conversation, and all of it except the newest piece is already cached. Bar length is input billed in base-input-token units: fresh input x1, cache write x2 (1-hour lifetime, as recorded) or x1.25 (5-minute), cache read x0.1. Output tokens are the same in both cases and are left out of the bars; the dollar counters include them. Prices: Anthropic pricing, read 2026-10-05.
A harness designer needs a back-of-the-envelope model: how big does the context get, when does it fill, and what does a session cost? The simplest one has four numbers: the startup context S, the growth per call g (the model's last output plus the tool result appended), the output per call o, and the number of calls N.
The quadratic term is why long sessions get expensive without caching: input processed grows with the square of the number of calls. Caching turns most of it into reads at a tenth of the price.
For each recorded session, take its own S (first call's input), g (average growth between its calls), o and N, and whether its first call found a cached prefix, and compare the predicted API-price equivalent with the one the CLI reported. Click a row to load its numbers into the sliders.
Why does an agent session's cost grow faster than linearly in the number of steps, and what fixes it? Each step resends the whole conversation, so input processed is N S + g N(N−1)/2: quadratic in N. Prompt caching makes the repeated prefix cost 0.1x; fewer, larger steps (batching tool calls) cut N; truncating tool outputs cuts g; compaction resets the history when it gets too long.
What can and cannot you learn from a Claude Code stream-json trace? You get the configuration (tools, model, permission mode), every tool call and result, per-call token usage including cache reads and writes, stop reasons, denials, timing and cost equivalents. You do not get the system prompt text, tool schemas or thinking text; for those you rely on documentation or a harness you control.
A tool returns a 500 KB file. What should a harness do? Never paste it whole into the context. Claude Code's Read tool refuses files over 256 KB with an error that tells the model to use offset and limit or search, and the shell output is cut at 30,000 characters by default. The model then greps for what it needs. In your own harness: cap tool outputs, say they were cut and how to page, and offer search tools.
When does a subagent help? When a subtask would fill the main context with material the main thread does not need afterwards (wide searches, long logs): the subagent reads it in its own window and returns a summary. It costs an extra startup context and its own calls, and on a small task it only adds cost, as the recorded run shows.
How would you check that a harness setting does what its name says? Run the same task with and without it and read the usage fields. Here, an undocumented "disable caching" variable left caching on; the documented TTL variable changed the write lifetime exactly as described.
claude -p --output-format stream-json --verbose --include-partial-messages, Claude subscription, 2026-10-05; redacted copies, the redaction script and the extraction script in src/trace/; notes in src/trace/README.md.python3 but no python and no pytest, so several runs lose a call to that.You have seen what a harness is from the inside: the Loop lab builds one in under 200 lines and the Trace and context lab opens up real Claude Code sessions. This tab steps back and lays out the finished products: the harnesses an engineer meets in October 2026, each described on the same nine axes from its own documentation, repository or changelog, read on 2026-10-05. Then it asks the question the products raise: does the harness change the score a model gets on a benchmark (yes, and by how much is measured below). How harnesses are used to train models, and harnesses that improve themselves, are on Harnesses for training and evaluation.
The nine axes, each answering one design question you will face when you build your own:
Can you read and change the loop? The licence decides whether you can fork it or only configure it.
One vendor's models only, or any model through an API key or a gateway such as LiteLLM or OpenRouter.
One loop; a plan mode (the agent may read but not change anything until you approve a plan); subagents (child loops with their own context window); parallel or background agents.
How a change to a file is expressed: exact-string replace, search/replace blocks, a patch, a unified diff, a whole new file, or just shell commands. Compared on one real edit below.
What fills the window: a memory file read at startup (AGENTS.md, CLAUDE.md, GEMINI.md), a repo map (a compressed outline of the code), compaction (summarising old turns), skills (instructions loaded on demand).
Who approves an action (approval modes, allow and deny rules) and what contains it when nobody does: an OS sandbox (Seatbelt on macOS, Landlock or bubblewrap on Linux), a container, or a cloud VM.
MCP servers (tools from other programs, protocol on its own page), hooks (your code runs before or after each tool call), plugins, custom commands, an SDK.
Your terminal, your editor, a cloud machine you hand tasks to, CI (a GitHub Action), chat apps.
Free with your own key, a subscription, usage-based credits, or enterprise. Prices change monthly: each cell carries the date it was read.
One row per harness, one column per axis. Click any cell for the full description and its sources. Filter by family or by a property; rows that do not match fade. A badge marks products that were renamed, acquired, slowed or shut down in 2026: in 2026 alone Cursor was acquired (August), Windsurf became Devin Desktop (June) and Roo Code was shut down (May).
Three child pages go deeper on rows of this grid (the click panel links them): Claude Code, taken apart; Other coding harnesses (Codex, Gemini CLI, opencode, Aider, OpenHands and mini-SWE-agent read from source and run on the same task); Personal agents (OpenClaw and Hermes Agent). For the permissions and sandbox column, Agent security shows what each verdict of a real gate rests on (section 4) and which trifecta leg each control removes (section 1); Other coding harnesses section 4 compares the six open harnesses' default containment.
Pick two harnesses. Axes whose tags differ are highlighted, so the real design differences stand out from the shared defaults (almost everything now speaks MCP and reads AGENTS.md).
Tick what you must have. The rules are stated, not hidden: a harness is kept only if its tags include every ticked need; products marked discontinued are dropped; the rest are ordered by how many of the optional properties below the line they also have, then by name. Tags are the compiler's reading of each product's docs on 2026-10-05, so treat the result as a shortlist to verify, not a verdict.
The running example's second bug is one line in textstats/core.py: top_words sorts by count only, so ties come out in arbitrary order instead of alphabetically. The fix is to sort by (-count, word). Every harness has to get that one-line change from the model's text into the file, and the six families of edit format in the atlas do it differently. Pick one to see exactly what the model must write.
Characters are counted from the text shown; tokens are approximated as characters divided by 4 (labelled approximate: real counts depend on the tokenizer). Formats follow each harness's documentation: Claude Code's Edit tool (tools reference), Aider's SEARCH/REPLACE and unified-diff formats (edit formats), Codex's apply_patch (openai/codex), mini-SWE-agent's shell-only actions (README).
sed needs regex escaping and behaves differently on macOS and Linux (the stock mini-SWE-agent prompt sets exactly that trap when the host is a Mac and the commands run in Linux: Building a harness section 2 has the run). The Loop lab builds the exact-replace version step by step; Building a harness section 6 measures five formats with eight appliers.A benchmark score belongs to a pair: a model inside a harness, at a setting (effort, turn limit, cost cap). Change only the harness and the number moves. How much depends on the benchmark. The chart shows only controlled comparisons: one study that ran every model in every harness on the same tasks, so the harness is the only thing that changed.
Public leaderboards list many submitted agents for one model and spread wider (Claude Opus 4.6 across nine agents on Terminal-Bench 2.0), but the submitters, settings and dates differ; that spread, every agent per model, is charted on Agentic benchmarks, section 3.
Where does a harness's extra cost come from? Watch the same model (Claude Haiku 4.5) do the same task (the running example) in two harnesses, both recorded for real on 2026-10-05 and owned by the other labs on this page: the 5-step harness built in the Loop lab (four tools described in a short system prompt) and Claude Code with six tools, from the Trace and context lab. Each column is one model call, drawn to the same scale: its height is the context the model read on that call, with the call's output on top.
Fig. 1, step by step
Prices: Haiku 4.5 list prices per million tokens, input $1, 1-hour cache write $2, cache read $0.10, output $5 (pricing, read 2026-10-05). Claude Code's figure reproduces the CLI's own total_cost_usd. The small harness resends its whole transcript as one block, so it can never hit the cache (the Loop lab explains why). Both are API-price equivalents: the runs used a subscription.
Mean first-call context per harness over 7 models on SWE-bench Lite, and mean tool count, from the HarnessTax data (generated 2026-09-22; Claude Code 2.1.224, Codex CLI 0.146.0, Pi 0.85.1).
The atlas cells link their own sources (click a cell). Everything was read on 2026-10-05 unless a date says otherwise. Recordings: the two runs in the animation are the Loop lab's s5_haiku and the Trace lab's std_haiku_1; the failed mini-SWE-agent attempt, now on Building a harness section 2, is summarised in src/atlas/inputs/.
Every link checked on 5 October 2026 (child pages added 6 October 2026; tabs and times updated 24 October and 6 November 2026). Times of pages rebuilt to the teaching contract are their own measured reading times; the others are estimates for a careful read.
A harness built from nothing in seven recorded steps, every run replayable, beside real Claude Code, with the Anthropic and OpenAI request shapes. 26 min, plus 24 in closed details.
22 recorded Claude Code sessions opened call by call, run-to-run spread, six experiments, and three context labs (startup context, caching on and off, a budget model). 21 min, plus 4 in closed details.
23 harnesses on nine dated, sourced axes, compare two, a chooser, one fix in six edit formats, how much the harness moves the score, and the harness tax animated. 30 min, plus 2 in closed details.
The Loop lab carried further, decision by decision: a tool call down to tokens, the action boundary, parallel calls, tool and error design, edit formats measured, planning, the execution environment, stop rules, cost, measuring a harness; Edit format bench tab. Reading 41 min, plus 20 in closed details.
What the model sees on each call, every lever with its own recordings, memory layers included. Reading 40 min, plus 26 in closed details.
The reference harness opened mechanism by mechanism in 23 recorded 2.1.290 runs; the permission grid in Reading section 3; Recordings tab. Reading 42 min, plus 24 in closed details.
Defences in layers, from the threat model to red-teaming; the trifecta design tool in section 1, every gate decision in section 4. Reading 35 min, plus 9 in closed details.
The classifier side of safety: input, tool and output rails, guard models read by metric, and what a rail costs; its Guard model scorecards tab. Reading 40 min, plus 9 in closed details.
Six open-source harnesses compared by design choice, read from source and run on the same task; Aider's repository map in section 5; Same task, every harness tab. Reading 30 min, plus 22 in closed details.
Resident and computer-use agents and their trust boundary, every fact dated and sourced; the gate designer in section 6; A day, replayed tab. Reading 32 min, plus 29 in closed details.
A controlled scaffold experiment, an RL environment from zero, rollouts as data, harness search; Scaffold experiment and Environment lab tabs. Reading 36 min, plus 24 in closed details.
The sibling root: libraries, orchestration, durable execution, gateways, tracing, with six child pages (its memory layers page is now Context engineering section 8). Reading 28 min, plus 3 in closed details.
One LLM request on the wire; its children MCP, Agent-to-agent and beyond and Auth. Root: reading 33 min, plus 6 in closed details; MCP 32 min, plus 15; Agent-to-agent 35 min, plus 9; Auth 39 min, plus 9.
Namespaces, cgroups, seccomp, sandboxes: what a harness sandbox is built on. Reading 51 min, plus 14 in closed details.
How agent benchmarks score a model with a harness, and how much the harness moves the number. Reading 40 min, plus 17 in closed details.
HumanEval to SWE-bench Pro; why "% resolved" needs a scaffold. Reading 34 min, plus 14 in closed details.
Grading actions, not messages. Reading 30 min, plus 6 in closed details.
RL from the beginning: where harnesses become training environments. Reading 20 min, plus 2 in closed details.
Where agentic RL sits among the training stages. Reading 26 min, plus 22 in closed details.
The models inside the harness. Reading 32 min, plus 6 in closed details.
rag-and-retrieval (21 min, plus 1), inference-and-serving (34 min, plus 3), ml-infra-and-orchestration (29 min, plus 10).
The thought, action, observation loop every agent descends from. 21 min, plus 3.
Why SKILL.md files help, and their misapplication failure mode. 25 min, plus 4.
A rich self-improving harness; a model trained to write one per task. 31 min, plus 4; 32 min, plus 6.
Can models build harnesses; a loop that cuts cost; a loop whose gains generalise. 21, 23 and 23 min (plus 3, 3 and 6).
Environments from trajectories, wrapped environments, sandboxes at training scale. 22, 24 and 25 min (plus 4, 4 and 6).
Curating memory at read time; reminding the agent of what it dropped. 20 min, plus 3; 27 min, plus 2.
Git as shared agent memory; insider threats from agents; memorised SWE-bench. 27, 22 and 20 min (plus 8, 5 and 3).
The vendor's own description of the loop, tools, context, sessions, checkpoints and permission modes. 15 min.
Anthropic, Dec 2024: workflows against agents, five patterns, start simple. 25 min.
Anthropic, 29 Sep 2025: compaction, note-taking, subagents. 25 min.
Anthropic, 11 Sep 2025: tool design with evaluations. 20 min.
Anthropic, 26 Nov 2025: initializer and coding agents, progress files. 20 min.
The agent-computer interface: tools designed for a model. 45 min.
A whole harness in about 100 lines with bash as its only tool; the best code to read first. 20 min.
Simon Willison, 16 Jun 2025: the injection threat model in one page. 10 min.
What an OS sandbox around an agent restricts, and deterministic code at each step of the loop. 30 min.
Whole file, search and replace, unified diff: how a model writes a change. 10 min.
21 model and harness pairs: the harness moves the bill more than the score. 12 min.
OpenAI, Sep 2026: an egress gap found by an agent in training. 15 min.
The cross-vendor convention for repository instructions to coding agents. 5 min.