Loop engineering runs loops outside the harness to widen what an agent can handle
Agent design has stacked layers, each one widening the scope a model can act on. Prompt engineering shaped what the model said. Context engineering shaped what it held in mind. Harness engineering (see: an agent harness is everything that constrains and shapes an agent) shaped the tools, environment, and controls around it. Loop engineering is the next layer up: it runs loops that sit outside the harness itself.
The move is from tool calls, to the external environment, to a loop the harness does not own. A single agent turn inside a harness handles one think-act cycle; a loop outside it chains many cycles, checks their output, and retries until a condition is met, so the system can take on work too large or too uncertain for one pass. Caleb Writes Code frames this as “stacking loop on top of loops,” where each new loop widens what the whole stack can reach.
The trade is control for scope. A loop the harness owns runs inside its permission and observability perimeter; a loop pushed outside it gains reach but must bring its own gating, or it amplifies mistakes at distance. Loop engineering is therefore a design discipline, not just running more iterations: the shape of the outer loop decides whether the added scope is productive or runaway.
References
- Caleb Writes Code. Loop Engineering explained in 8min (Caleb Writes Code)