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:

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.

Original post →

More from coding & agent

coding & agent channel →