@shao__meng: Updated lecture notes for MIT OpenCourseWare 6.S950 Agency with AI, Lecture 5: The Harness — https://agencyai.mit.edu/w5/ Covering observability, controllability, and "how much Harness is enough" through a 300-line teaching Agent...

X AI KOLs Timeline Events

Summary

Updated lecture notes for MIT OpenCourseWare 6.S950 Agency with AI, Lecture 5: The Harness, walking through a ~300-line teaching Agent to explain the principles of observability, controllability, and the question of how much Harness you actually need.

MIT OpenCourseWare 6.S950 Agency with AI Lecture 5: The Harness — updated lecture notes: https://agencyai.mit.edu/w5/ Through a ~300-line teaching Agent, the lecture covers observability, controllability, and "how much Harness is enough." Concrete best practices around Harness evolve quickly, but several systems principles from decades ago remain timeless. Understanding how Harness works is key to collaborating better with Agents. Agent = LLM + Harness: Breaking Down a Minimal Agent The course team built their own teaching Agent called Baby Anigans: it answers questions about a text file and must cite the line numbers where answers are found. It runs models locally with Ollama, and the outer loop is only about 300 lines of Python with two tools (search, read_lines) — no frameworks involved. The core idea is that the LLM only makes requests, and the loop decides what to execute: call the LLM, run tools, inspect results, then decide whether to continue or stop. This is the ReAct loop, and it's fundamentally what mini-swe-agent and Claude Code do as well. Demo trace: The model initially said "no file found" and was instructed to search first. After finding line 125, it was told to read neighboring lines before the answer was accepted. When a search yielded no results, the system prompted the model to try shorter keywords; after two consecutive failed searches, Python forcibly returned a fixed refusal message explaining that "not finding something doesn't mean it's not in the file." Observability: What You Can See, and What Vendors Hide · Both answers passed the check, but both missed an exception clause — same symptom, different causes: in one case, line 127 never entered the model's view (a retrieval problem); in the other, the exception content entered the view twice but was dropped from the answer (a model problem). The check only verifies "did it search and did it cite" — not whether the answer is complete, because passing the check only proves that the portion it examined is fine. · Comparing what Baby Anigans and Claude Code can each verify: /context shows an inventory of the context, but that doesn't equal the actual request sent. Sub-agent reports are summaries written by the parent Agent and can omit things. git diff shows what changed but not the order of changes or whether the changes are correct. · The trend is vendors packaging more and more of the Harness behind APIs: Codex's context summaries have become encrypted content only readable by the server; Claude's reasoning is encrypted, and while compressed summaries are readable, once modified, the API rejects them. Transparency has been traded for convenience, and the parts being packaged away may be exactly the most valuable ones (the lecture cites an OpenAI article: tweaking two settings doubled ARC-AGI-3 scores). Controllability: Three Long-Standing Principles That Govern All the Specific Practices · Lean AGENTS.md, on-demand loading of Skills and MCP, large inputs placed in files, sub-agents returning only summaries, key rules preserved after compression — the principle is: manage context — only let in what's currently in use, and keep it; origins: storage hierarchy (1965), working set (1968) · Hooks that intercept, deny rules that apply in every mode — the principle is: enforce checkable rules with mandatory interception; origin: reference monitor (1972) · Permission controls, isolated MCP servers, two keys given to two different people — the principle is: least privilege, separation of duties; origin: Saltzer & Schroeder (1975) How Much Harness Do You Actually Need? · Skepticism about Harness engineering mirrors the skepticism that was once aimed at prompt engineering. · One line of research lets LLMs manage the Harness themselves: MemGPT moves data between memory tiers on its own, ACE rewrites its own operating manual, and Meta-Harness reads past run logs and writes Harness code. · There's no universal optimum: for 4 out of 5 models, the best Harness differs across benchmarks. The same component may improve performance for weaker models but primarily save money for stronger ones. · Harness changes fast: Manus says their Agent framework has been rewritten four times.
Original Article
View Cached Full Text

Cached at: 10/22/26, 12:38 AM

MIT OpenCourseWare 6.S950 Agency with AI

Lecture 5: The Harness handout has been updated: https://agencyai.mit.edu/w5/

Starting from a 300-line teaching Agent, it walks through observability, controllability, and “how much Harness do you need.” The specific best practices for Harnesses evolve quickly, but several systems principles from decades ago still hold. Understanding how a Harness works helps you collaborate better with Agents.

Agent = LLM + Harness: Deconstructing a Minimal Agent

The course team built their own teaching Agent called Baby Anigans: it answers questions about a text file and must cite the line numbers where the answers are found. It runs models locally via Ollama, with an outer shell of only about 300 lines of Python, two tools (search, read_lines), and no framework dependencies.

The core idea is that the LLM only makes requests — the loop decides what to execute: call the LLM, run a tool, inspect the result, then decide whether to continue or stop. This is the ReAct loop, and it’s fundamentally how mini-swe-agent and Claude Code work as well.

Demo trajectory: the model initially said “there is no file” and was prompted to search first; after finding something at line 125, it was asked to read neighboring lines before the answer was accepted. When a search fails, the system suggests trying shorter keywords; after two consecutive failed searches, Python forcibly returns a fixed “refusal” message, explaining that “not found doesn’t mean it’s not in the file.”

Observability: What You Can See — and What Vendors Hide

  • Both answers passed the checks, but both missed the exception clause, with the same symptom but different causes: in one case line 127 never entered the model’s field of view (a retrieval problem); in the other, the exception content entered the view twice but was dropped from the answer (a model problem). The checks only verify “was there a search, is there a citation” — they don’t verify whether the answer is complete, because passing checks only tells you that the parts it checked are fine.

  • Comparing what Baby Anigans and Claude Code can each observe: /context shows a context inventory, not the actual request being sent; a sub-Agent’s report is a summary written by the parent Agent and can contain omissions; git diff shows what was changed, but not the order of changes, nor whether the changes were correct.

  • The trend is for vendors to wrap more of the Harness behind APIs: Codex’s context summaries have become encrypted content only the server can read; Claude’s reasoning process is encrypted, and although compressed summaries are readable, once modified, the API rejects them. Transparency has been traded for convenience, and the encapsulated parts may be exactly what’s most valuable (the handout cites an OpenAI article: tweaking two settings more than doubled ARC-AGI-3 scores).

Controllability: Three Long-Standing Principles Behind Various Specific Practices

  • Lean AGENTS.md, on-demand loading of Skills and MCP, large inputs placed in files, sub-Agents returning only summaries, key rules surviving compression; principle: manage context — only let in what you’re actively using, and make sure it stays; origins: storage hierarchy (1965), working set (1968)
  • Hooks that intercept, deny rules that take effect in any mode; principle: checkable rules should be enforced via mandatory interception; origin: reference monitor (1972)
  • Permission controls, isolated MCP servers, two keys handed to two different people; principle: least privilege, separation of duties; origin: Saltzer & Schroeder (1975)

How Much Harness Do You Actually Need?

  • Skepticism toward Harness engineering closely mirrors the skepticism once directed at prompt engineering.

  • One research line lets the LLM manage the Harness itself: MemGPT moves data between memory layers on its own, ACE rewrites operating manuals, and Meta-Harness reads past run records and writes Harness code itself.

  • There is no universal optimum: for 4 out of 5 models, the best-performing Harness differs across benchmarks; for the same component, it’s primarily a quality boost for weaker models and primarily a cost saver for stronger ones.

  • Harnesses change fast: Manus says their Agent framework has already been rewritten four times.


Lec 5: The Harness

Source: https://agencyai.mit.edu/w5/ Search 6.S950 Agency with AI

Similar Articles

@xiaogaifun: The most thorough talk about Harness. This is probably the most thorough sharing I've seen about Harness Engineering, I recommend everyone watch it. Video link: https://podwise.ai/dashboard/episodes/8013289…

X AI KOLs Timeline

This article deeply explains the concept of Harness Engineering through a talk by IBM engineer Tejas Kumar, which involves adding deterministic infrastructure (such as tool registries, context management, guardrails, and validation loops) to AI Agents to solve model out-of-control and hallucination problems, ensuring stable task execution.

@Potatoloogs: https://x.com/Potatoloogs/status/2057391224592667051

X AI KOLs Timeline

This article deeply analyzes the concept of Agent Harness, which is the engineering infrastructure wrapped around an LLM, including 12 components such as orchestration loops, tool calling, memory systems, context management, etc. The article cites practices from companies like Anthropic, OpenAI, and LangChain, arguing for the critical role of the harness in production-grade AI agents.

@astaxie: Today the group discussed how to learn Harness. For Harness Engineering, I'm studying these two resources: 1. https://github.com/walkinglabs/learn-harness-engineering… to understand the core mechanisms of each Harness…

X AI KOLs Timeline

A project-based course repository on Harness Engineering for AI coding agents, covering environment setup, state management, verification, and control mechanisms to make AI coding agents work reliably. The course synthesizes best practices from OpenAI and Anthropic on building effective harnesses for long-running agents.