Agent harness engineering: how LangChain lifted coding agents from 52.8% to 66.5%
MaryamMiradi · x · 2026-10-31
A structured overview of AI agent harness engineering: LangChain improved its coding agent from 52.8% to 66.5% on Terminal-Bench 2.0 (Top 30 → Top 5) by changing only the harness, not the LLM. The author distills 5 layers and 12 resources:
- Layer 1 Agent Loop: Claude Agent SDK, OpenAI Codex SDK, GitHub Copilot SDK, LangChain Deep Agents.
- Layer 2 Tool Engineering: MCP for external systems, AGENTS.md for project instructions.
- Layer 3 Context Engineering: Anthropic's context engineering and agent patterns — load instructions on demand, summarize old logs.
- Layer 4 Memory & State: Anthropic long-running agents (progress files + Git), Ralph Loop (fresh sessions + persistent files).
- Layer 5 Control & Evaluation: verification + loop detection, Terminal-Bench.
Harness loop: prepare context → call LLM → check permissions → execute tools → return results → repeat. Two standout tricks: a pre-completion check forcing agents to verify work against the original task (fixes premature stopping), and loop detection for repeated no-progress file edits. Rule of thumb: known steps → plain workflow; discovery-driven tasks → agent loop + harness.
More from coding & agent
- Web Monitors launches: track competitors, funding and new AI models via MCP — gaganghotra_ · 2026-10-31
- Inside Decision Models: How Perplexity's Decider Works and When to Use One — antoine_chaffin · 2026-10-31
- Epic launches open.epic MCP to connect dev agents to FHIR docs and API specs — DesireeCachette · 2026-10-31
- Open Ontologies: open-source 'Terraform for knowledge graphs' traces 901 consequences of one-line edits — anselm · 2026-10-31
- Supabase launches Explorer and Notebooks to unify database and log queries — dshukertjr · 2026-10-31
- Evals in 2026 101: one taxonomy for LLM apps, agents, and training/inference systems — WolframRvnwlf · 2026-10-31