miajia
AgentsContext Engineering

Agent Harness: The Layer That Turns Talk into Action

EN · Mia Builder Notes · March 2026

Same model, different runtime, and its benchmark rank jumps from the top 30 to the top 5. The model didn’t get smarter. The harness got better.


TL;DR

  • Agent = Model + Harness. The model is the brain; the harness is the body. Without a body, even the smartest brain can only talk, not act.
  • People think they’re picking a model. They’re actually picking a harness. Claude Code feels “better” than Cursor not because the model is stronger, but because the harness is more complete (shell + memory + MCP).
  • A harness has 5 core organs: file system, code execution, memory, context management, and tool extensions. Every AI product is racing to fill in these five.
  • What it means for the industry: code generation gets cheap → the bottleneck moves from implementation to review → judgment becomes the scarcest skill.
  • Where it’s headed: Context Engineering > Prompt Engineering. Stop tweaking prompts and design the information flow instead.
  • Actionable: You don’t have to wait for the next model. Give your AI tool one MCP tool, write one memory file, and you’re more productive today.

A counterintuitive fact

Last week LangChain published some Terminal Bench 2.0 numbers: Claude Opus 4.6 running in Claude Code (Anthropic’s official tool) ranked in the top 30. Put the exact same model in an optimized harness, change nothing about the model, and it shot straight into the top 5.

If you’re an engineer, that should stop you for a second.

We’ve spent two years arguing about which model is stronger. This data says: the gap between models may be smaller than the gap between the environments they run in.

That “environment” is what we’re talking about today: the Agent Harness.

What’s a harness? Explained with things you already know

LangChain offered a definition last week:

Agent = Model + Harness

The harness is everything except the model itself: the system prompt, tool descriptions, file system, code execution environment, memory system, and context management logic.

Sounds abstract? You use a harness every day. You just haven’t noticed.

What you use What it actually is
ChatGPT on the web A minimal harness: chat history + web search
Cursor An IDE harness: codebase index + file read/write + terminal
Claude Code A full harness: file system + shell + MCP tools + memory + skill system

These products can run models of the same caliber, yet they feel worlds apart. Where’s the difference? Not the model. The harness.

In one line: the model is the brain, the harness is the body. However smart the brain is, without hands, feet, and eyes it can only talk, not act.

Or put more bluntly: people think they’re picking a model. They’re actually picking a harness.

The 5 core organs of a harness

Why call it a “body”? Because every part of the harness handles something the model simply can’t do on its own.

1. File system: giving AI a “notebook”

Without it: the model can only work inside its context window. Anything that doesn’t fit just disappears. Ask it to edit a 500-line file and it has to work from “memory,” so halfway through it often loses track of the logic at the top.

With it: the model can read files, write files, and save intermediate results. Its work is no longer chained to the context window. A complex task can be split into steps, with each step’s output saved to disk.

Even more important: the file system is the foundation of multi-agent collaboration. The main agent writes a plan to a file, sub-agents read it and execute, and the results get written back to another file. Without a shared file system, multi-agent is just talk.

2. Code execution: giving AI “hands”

Without it: the model can only generate code for you to look at. Is it right? Does it even run? You have to copy-paste it into a terminal and find out yourself.

With it: the model generates code → runs it → sees the error → fixes it → runs it again. This write-run-look-fix loop is what turns AI from a “code generator” into an “engineer.”

OpenAI took this all the way last week: they gave the Responses API a hosted Linux container (Debian 12, 6 languages preinstalled) where the model can spin up services, query databases, and call APIs. It’s no longer “write me some code.” It’s “do the work for me on an actual computer.”

3. Memory: letting AI “learn across conversations”

Without it: every new conversation, the model starts from a blank slate. It steps on the same rakes it stepped on last time and repeats mistakes you already corrected.

With it: what the model learns can stick. Last time you said “don’t use fireEvent, use user-event”; that preference goes into memory and loads automatically in every session after that.

I built an automatic learning system for myself: a hook captures the corrections I make in conversation (“No, it should be…”), drops them into a queue, and after a periodic review routes them into long-term memory. The model doesn’t need to be “smarter.” It just needs to “stop making the same mistake twice.”

LangChain took a different approach in Deep Agents: path routing. Files written to the /memories/ directory persist automatically; everything else is temporary. The agent doesn’t need to know there are two storage backends. It just reads and writes files, and the harness layer handles the routing transparently.

4. Context management: keeping AI from “getting dumber the longer you talk”

Without it: Chroma’s research found that a model’s reasoning gets noticeably worse as its context window fills up. They call it “context rot.” A model with a 200K context can perform a lot worse at 150K than at 50K.

With it: the harness compresses context at the right moments. The key isn’t whether to compress. It’s when to compress and what to keep.

LangChain shipped an interesting approach this week: let the model decide when to compress. The model triggers compression itself when it switches tasks, before a flood of new information comes in, or when an old decision gets overturned. No more relying on thresholds a human picked.

5. Tools and search: letting AI “sense the outside world”

Without it: the model’s knowledge stops at its training cutoff. It doesn’t know what your codebase looks like, what happened today, or which toolchain your company uses.

With it: through MCP (Model Context Protocol) it plugs into external tools: browser debugging, Slack messages, calendar events, database queries. The model goes from “can only answer from what it was trained on” to “can pull live information, then answer.”

Last week Google released the Chrome DevTools MCP. An AI agent can attach directly to the browser session you already have open, read console errors, analyze network requests, and inspect DOM elements. No more taking screenshots and pasting them into the AI. It looks for itself.

Why do so many people say Claude Code is better than Cursor?

This is the best case study of harness differences there is.

Plenty of engineers have used both Cursor and Claude Code, and the common verdict is that Claude Code is “smarter.” But take the Claude model out and drop it into a plain chat box (say, claude.ai), and the experience instantly falls back to roughly ChatGPT level. The model didn’t get dumber. The harness got simpler.

The real difference between Claude Code and Cursor isn’t the model. It’s the design philosophy:

ChatGPT / Gemini on the web Cursor Claude Code
Metaphor Chat assistant A better IDE A terminal agent that writes code
Your role You ask, it answers You drive, AI rides shotgun You name the destination, it drives
File system None (only sees what you paste) Reads your open files + indexes the codebase Full filesystem read/write + glob/grep
Code execution Code Interpreter (Python only) Limited terminal integration Native shell: runs it, reads the output, fixes it, all on its own
Memory Limited chat memory .cursorrules (per project) CLAUDE.md + memory system + hooks
Context management Fixed window, truncates when full Manual @file, @codebase Reads relevant files automatically, auto-compact
Tool extensions Web search + plugins IDE plugins MCP (endlessly extensible: Slack, calendar, Linear, browser…)
Verification loop You run the code yourself You run the tests yourself Agent runs the tests → reads the errors → fixes → runs again

When people say “Claude Code is better,” it actually breaks down into 4 things:

  1. The write-run-fix loop doesn’t need a human → because the harness has a shell
  2. You don’t have to hand-pick the context → because the harness finds the relevant files itself
  3. It can work across systems (edit code + run tests + check Slack + open a PR) → because the harness has MCP
  4. It gets to know you the more you use it → because the harness has memory

That’s also why Cursor has been adding agent mode and background agents lately. It’s patching the gaps in its harness and moving toward a “complete body.” ChatGPT added Code Interpreter, web search, and memory: also patching its harness. Every product is converging, because the “body parts” an agent needs are already a known list.

What this means for software development

The bottleneck is moving

Harrison Chase (LangChain’s CEO) wrote a post last week, and his core point was: once code generation gets cheap, the bottleneck moves from implementation to review.

Before: PM writes the PRD → designer makes the mocks → engineer builds it → weeks Now: engineer has an agent prototype it directly → review → iterate → hours

When implementation is nearly free, judgment becomes the scarcest skill: whether something should be built at all, whether it’s built right, whether the architecture holds up.

This is creating two new roles:

  • Builder: product intuition + agent fluency + design basics → ships fast
  • Reviewer: domain expertise + architecture evaluation + fast judgment → guards quality

Harness quality directly shapes output quality

Same engineer, same model:

  • Writing code in ChatGPT on the web → copy-paste → debug by hand → 1 day per feature
  • Using a well-configured Claude Code → it reads the codebase → runs the tests → fixes the bugs, all on its own → the same feature in 1 hour

The difference isn’t the person’s ability or the model’s intelligence. It’s the harness.

The industry right now: three players building the same thing

Here’s what’s interesting: LangChain, OpenAI, and Anthropic are all defining the harness layer at almost the same moment, and they’re converging hard:

ChatGPT Gemini Cursor LangChain (Deep Agents) OpenAI (Responses API) Anthropic (Claude Code)
File system None (uploads are temporary) Google Drive integration Codebase index + open files FilesystemMiddleware Container + File API Full local file system
Code execution Code Interpreter (Python) Gemini Code Execution Limited terminal Shell + Sandbox Hosted Linux container (6 languages) Native shell
Memory Chat memory (limited) No persistent memory .cursorrules CompositeBackend path routing Container persistence + compaction CLAUDE.md + memory + hooks
Context management Fixed-window truncation Fixed window Manual @file Autonomous compression Server-side compaction /compact + auto-summarization
Tool extensions Plugins + web search Built into the Google ecosystem IDE plugins MCP + custom middleware Shell + network allowlist MCP (endlessly extensible)
Skill format Custom GPTs Gems None SKILL.md SKILL.md (!) Skill markdown

From left to right, the harness goes from bare-bones to complete. And here’s the fun part: every product is moving toward the right side of this table. ChatGPT added Code Interpreter and memory, Gemini added Deep Research and code execution, Cursor added agent mode.

At the developer-framework level, the convergence is even more obvious. These are the tools you use to build agents:

LangChain (Deep Agents) OpenAI (Responses API) Anthropic (Claude Code) OpenClaw
Positioning General-purpose agent framework Cloud agent runtime CLI coding agent Local personal agent
Model support 100+ models GPT family Claude family Any (Claude/GPT/local)
File system Virtual FS + CompositeBackend Hosted container + File API Local file system Local file system
Code execution Shell + pluggable sandbox Hosted Linux container (6 languages) Native shell Native shell + optional sandbox
Memory Path-routed persistence Container persistence + compaction CLAUDE.md + memory + hooks 24/7 persistent memory
Context management Autonomous compression Server-side compaction /compact + auto-summarization Persistent context
Tool extensions MCP + custom middleware Shell + network allowlist MCP 50+ built-in integrations + custom skills
Skill format SKILL.md SKILL.md Skill markdown Agent can write its own skills
Standout capability Composable middleware pipeline Concurrent shells + secret injection Hooks lifecycle events Multi-platform access (WhatsApp/Slack/Telegram)
Deployment LangGraph Platform / self-hosted OpenAI cloud Local CLI Local-first + optional cloud runner

A few things jump out:

  1. Skill formats are converging — LangChain, OpenAI, and Anthropic have all landed on SKILL.md, and OpenClaw goes one step further by letting the agent write its own skills
  2. Local vs. cloud is splitting — OpenAI is going fully hosted in the cloud, Claude Code and OpenClaw are local-first, and LangChain supports both
  3. Memory is the biggest differentiator — everyone implements it completely differently (path routing / container persistence / files + hooks / 24/7 always-on), which tells you the industry hasn’t found the best answer yet
  4. Every framework is heading in the same direction — file system + code execution + memory + context management + tool extensions. All five organs, not one missing

A general-purpose harness is a standard body, but your work needs a custom one

After all those comparison tables, you might be wondering: if frameworks like OpenClaw and Claude Code already come with a harness, why would an engineer still need to set up their own?

Because the factory harness is general-purpose, but the way you work isn’t.

Take OpenClaw. Out of the box it has 50+ integrations, persistent memory, and shell execution. That’s a pretty complete body. But it doesn’t know:

  • That every morning you need to pull from Linear + Slack + Calendar + GitHub in parallel to build your plan for the day
  • That your PRs need a rollback plan, which not every team requires
  • That when you review code, you check that userEvent.setup() lives inside each it block and not in beforeEach
  • That after you write code, lint + typecheck + test all have to pass before you commit

That’s the muscle memory of your workflow. A general-purpose harness doesn’t have those muscles.

So you add skills: tell it how your team works, what your standards are, and how your process runs. Here’s what I added to my own Claude Code:

  • A 4-stage skill chain: design doc → implementation plan → execution log → code review, with input validation and completion checks at every stage
  • Auto-learning hooks: automatically capture my corrections (“No, it should be…”), queue them up, and turn them into long-term memory after review
  • A daily planning skill: pulls from 7 data sources in parallel, lets AI rank everything, and generates a plan for the day with Pomodoro time estimates

Once those were in, the same Claude Code felt like a completely different tool. It became an agent that understands how I work, doesn’t repeat its mistakes, and can run my whole process end to end on its own.

A general-purpose harness solves 80% of the problem. The last 20%, the customization, is where the productivity gap opens up.

What comes next

Short term (6 months): Context Engineering becomes a core skill

Karpathy has been pushing a concept lately: Context Engineering, precisely controlling what information the model sees at every step. It isn’t prompt engineering with an upgrade. It’s a core subproblem of harness engineering.

Instead of spending your time tuning prompts, spend it designing what information enters the context, and when.

Medium term (1–2 years): the model-harness coupling problem

LangChain’s post raised a worry: OpenAI’s Codex got worse when its apply_patch tool was swapped for a different one. The reason: the model got bound to its harness during training. It learned “edit code with this specific tool,” and once the tool changed, it no longer knew how to work.

Which means: the best harness isn’t necessarily the one the model was paired with in training. Harness engineers need to work out the best setup independently of the model vendor.

Long term: agents improve their own harness

Right now, humans design the harness. In the future, an agent could analyze its own execution traces, spot the bottlenecks in the harness layer, and propose improvements itself. LangChain already lists this as one of its active research directions.

I’ve tried a small-scale version myself: hooks automatically capture the agent’s failure patterns (which commands keep failing, which corrections keep coming back), aggregate them, and generate suggestions for improving the harness. It works pretty well. The agent doesn’t need to be smarter; it just needs an environment that suits it better.

Takeaways for engineers

  1. You’re already using a harness. You just might not have noticed. 90% of the difference you feel between Cursor, Claude Code, and Copilot comes from harness design, not from the models.

  2. Harness Engineering is a real skill. Knowing the 5 components of a harness, and how to configure and tune them, will make you an order of magnitude more productive with AI than your coworkers.

  3. Don’t just watch for model upgrades. Next time GPT-6 or Claude 5 drops, ask yourself: is my harness ready to take advantage of what it can do?

  4. Context Engineering > Prompt Engineering. Instead of spending time writing better prompts, spend it designing a better information flow, so that at every step the model gets what it needs, and only what it needs.

  5. Get your hands dirty. Give Claude Code one MCP tool, write one hook, create one memory file. The beauty of a harness is that improvements stack: every small fix pays off in every session you run from then on.



Quotes worth saving

A few lines you can post straight to your feed or stick on your monitor:

“Agent = Model + Harness. The model is the brain; the harness is the body.” — LangChain

“People think they’re picking a model. They’re actually picking a harness.”

“Same model, different harness: top 30 becomes top 5.” — Terminal Bench 2.0

“Once code generation gets cheap, the bottleneck moves from implementation to review. Judgment becomes the scarcest skill.” — Harrison Chase

“Context Engineering > Prompt Engineering. Stop tweaking prompts and design the information flow.” — Andrej Karpathy

“Agents don’t need to be smarter. They just need an environment that suits them better.”

“Every product is heading in the same direction, because the body parts an agent needs are already a known list.”


I’m Mia, a former Google engineer, now building AI products in Silicon Valley in the gaps of my day. This post comes from my own hands-on harness engineering on my AI work setup: I built an auto-learning system and a 4-stage workflow skill chain, then found out that LangChain and OpenAI had published posts the week before about the exact same thing. Sometimes if you keep stepping on rakes long enough, you stumble right onto the industry frontier.