The History of AI Harnesses
Looping, orchestration, tools, routing, context, memory, and vector databases. How Claude Code, Codex, and OpenCode turned raw models into workers.
A raw language model is just a text-in, text-out function. A harness is everything layered around it that makes it do work: file access, tools, a loop, memory, and guardrails. The history of harnesses is the history of AI coding, because coding was the first domain where the loop became genuinely useful.
From chat to loop
The first harnesses were just chat UIs with a code editor bolted on. The turning point was giving the model a loop: let it read files, run commands, see results, and try again. Early coding agents and the Copilot-era tools were mostly autocomplete; the agentic harnesses that followed were workers. The loop is the difference between a model that suggests a function and one that implements it, tests it, and fixes its own failures.
Tools and the shell
The enabling primitive was tool use: the model decides, mid-task, to call a function the system provides, such as reading a file, editing a line, or running a test. Once the model could touch a filesystem and a shell, it could actually build software. Function calling made tool use reliable enough to trust in production.
Context, memory, and vector databases
Models cannot remember between sessions, and their context windows, while large, are not the whole codebase. The solutions became:
- Context management: the harness decides what to include in each request, pruning and summarizing to stay inside the window.
- Memory: persistent project instruction files (CLAUDE.md, AGENTS.md) and session state so the agent reuses what it learned.
- Vector databases and RAG: embedding the codebase or documents, retrieving the relevant chunks per query, and injecting them into context. Retrieval gave the model accurate ground truth, and it is the standard way to make an agent know a large repository.
Routing and orchestration
Not every request needs the flagship model. Routing sends simple tasks to cheap models and hard tasks to expensive ones, which is exactly the tiering logic behind GPT-5.6 Luna versus Sol. Orchestration covers subagents, parallel work, and human-in-the-loop checkpoints: a lead agent that plans, spawns workers, and merges results.
The reference harnesses
Three tools define the current harness generation:
| Harness | Origin | Signature moves |
|---|---|---|
| Claude Code | Anthropic, 2025 | Plan mode, CLAUDE.md, checkpoints, subagents, hooks, skills, MCP |
| Codex | OpenAI | Approval modes and sandboxing, AGENTS.md, ChatGPT sign-in, cloud + IDE |
| OpenCode | Open source | Plan/Build mode (Tab), /init generates AGENTS.md, /undo, @-file references, 75+ providers |
Each is a different UI on the same primitives: a loop over tools, with context, memory, routing, and approvals. Master the primitives and you can drive any of them.
The interview framing
Interviewers do not want the raw model to decide anything. They want you to act as the harness: decide the plan, give the model tools, feed it the right context, review its loop, and keep it from spiraling. That is the entire skill this course teaches.
Sources and further reading
Premium
Unlock the rest of this guide
Premium unlocks every pattern deep-dive, every problem breakdown and solution, the practice sandbox, and verdict feedback on your practice runs.
- A harness is everything between the model and the work: tools, looping, context, memory, routing, and approvals.
- Vector databases and RAG gave models a way to retrieve the right context instead of hallucinating it.
- Claude Code, Codex, and OpenCode are the reference harnesses, and they standardize the same primitives.
- Interviewers grade how you drive the harness, not how well you prompt a raw chat model.
- The full article, complete and uninterrupted
- All pattern deep-dives and problem breakdowns
- Practice sandbox and verdict feedback