Harness Engineering: 2 Agents, 4 Files to Keep a Coding Agent Running for Hours

blaizedsouza · x · 2026-11-07

A Claude-styled guide, "Harnesses for Long-Running Agents," lays out how to keep a single AI coding agent shipping for hours without losing the plot: run an initializer agent once to set up the environment, then have a coding agent deliver exactly one verified feature per session and leave clean notes for the next.

The setup boils down to two files plus a fixed session prompt:

Five failure modes map to structural fixes: trying to build everything at once → one feature per session; declaring victory early → everything starts as passes: false; forgetting between sessions → progress log + git; broken environments → init.sh + smoke test; marking untested work done → browser-based end-to-end testing. The takeaway: an agent doesn't need bigger memory, it needs better notes — design every session so a stranger could pick it up cold.

Original post →

More from coding & agent

coding & agent channel →