Browse notes
Agent Harness
Codex, Claude Code, and OpenCode can use a model to work on a repository because software around the model prepares each call and connects its decisions to the environment. That software is the harness.
On each iteration it can assemble instructions and context, present available tools, execute an action in a runtime, and return the result so the model can continue the agent loop.
Context and tools
The harness decides what reaches the next inference: project instructions, conversation history, retrieved files, earlier results, and tool definitions. It may also discover a skill or connect external operations when the task requires them.
Implementation varies by product. Codex, Claude Code, and OpenCode do not have to search the same instruction paths, load skills in the same way, or expose exactly the same tools. Those differences belong to the harness rather than the model.
Runtime
Actions happen in a concrete environment: a local shell, VM, sandbox, or cloud workspace. That runtime determines which files, binaries, network paths, credentials, and services are actually available.
The same model can therefore complete a task in one harness and fail in another. If the repository is not mounted or the test runner is missing, better model output does not add that capability.
Checks and results
A harness can combine model decisions with deterministic checks. Counting findings, validating JSON, or running tests is often more reliable in code than through another inference.
In this repository, for example, editorial rules guide the agent while npm run test:content checks invariants that should not depend on the model remembering them.
When reviewing a run, tool calls, results, errors, and validation outcomes are the useful evidence. The result sent back to the model can be much smaller than the original artifact: a full log can stay in a file while the next inference receives only the relevant lines.