Anthropic’s engineering team argued in 2025: agent value is in the harness, not the model. Worth reading twice if you build AI products.
What Is a Harness?
Harness = the full runtime wrapping the LLM—managing perception, decision, execution, and feedback loops.
Analogy:
- LLM = CPU (inference)
- Harness = OS (scheduling, memory, I/O, process control)
Same GPT-4o, different harness → very different outcomes.
Core Components
┌─────────────────────────────────────────────┐
│ Harness │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
│ │ Context │ │ Tool │ │ Loop │ │
│ │ Manager │ │ Router │ │ Controller│ │
│ └──────────┘ └──────────┘ └──────────┘ │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
│ │ Skill │ │ Sandbox │ │ Eval & │ │
│ │ Loader │ │ / Safety │ │ Monitor │ │
│ └──────────┘ └──────────┘ └──────────┘ │
│ ┌──────────┐ │
│ │ LLM │ │
│ └──────────┘ │
└─────────────────────────────────────────────┘
1. Context Manager
The bottleneck is often context, not raw model IQ.
Jobs:
- Choose what enters context (files, skills, MCP results, history)
- When to compress/summarize old turns
- Layout for LLM attention efficiency
Central battleground in 2026 AI engineering. See the context engineering article.
2. Tool Router
LLM emits “call tool_X” → harness:
- Parses tool calls
- Routes to MCP or built-ins
- Handles errors, retries, timeouts
- Formats results back into context
3. Loop Controller
Agents loop:
while not done and steps < max_steps:
response = llm.call(context)
if response.has_tool_calls:
results = execute_tools(response.tool_calls)
context.append(results)
else:
done = True
return response
Harness sets max steps, completion criteria, checkpoint/resume.
4. Skill Loader
Pick 1–3 relevant skills for the task—Cursor scans .cursor/skills/ and matches intent.
5. Sandbox / Safety
Agents edit files and run commands. Harness provides:
- Filesystem boundaries (workspace only)
- Command allowlists
- Network controls
- Human confirmation gates (delete, PR, etc.)
6. Eval & Monitor
Production harnesses track:
- Tool success/failure per step
- Token usage
- Task quality signals
- Anomalies (loops, privilege abuse)
Three Product Harnesses Compared
| Component | Cursor | Claude Code | Devin |
|---|---|---|---|
| Context | index + open files + @ refs | whole repo + terminal | browser + IDE + terminal |
| Tools | MCP + built-ins | built-ins (+ MCP growing) | full stack |
| Loop | agent mode, interruptible | long autonomous runs | fully async |
| Sandbox | workspace | local shell | cloud VM |
| Skills | SKILL.md on demand | CLAUDE.md | internal behaviors |
Philosophy:
- Cursor: human-in-the-loop collaboration
- Claude Code: long autonomous execution
- Devin: submit task, return later
Design Tradeoffs
Autonomy ←──────────────────────→ Control
Devin Cursor Tab
(fully autonomous) (step confirm)
Context size ←──────────────────→ Cost/speed
Devin (whole repo) Cursor (@file precision)
Generality ←──────────────────────→ Domain depth
General agent Code-specific harness
No universal best—match the scenario.
Minimal Custom Harness
class MinimalHarness:
def run(self, goal: str, max_steps: int = 20):
context = self.build_initial_context(goal)
for step in range(max_steps):
response = self.llm.chat(context, tools=self.available_tools)
if response.tool_calls:
for call in response.tool_calls:
result = self.execute_tool(call)
context.append(result)
else:
return response.text
return "Max steps reached"
Simple surface—each method hides major engineering choices. That is the harness moat.
Summary
Everyone uses similar models. Harness differentiation explains why Cursor beats raw API calls. Next: the highest-ROI harness component—context engineering.