Loop Engineering: An Agent Loop as a Thermostat, Not an Infinite Bash Loop
We discussed Loop Engineering in July, but the word “loop” contains a trap: it directs attention to repetition, while the engineering value begins with feedback. In the 18-minute talk “Loop Engineering from First Principles,” Kyle Mistele argues that a coding agent should not be treated as a prompt placed inside an infinite Bash loop, but as one component of a real control loop.
Kyle is CTO and co-founder of HumanLayer and writes technical pieces on MCP, context engineering, and harness engineering. His public profile puts OSCP, distributed systems, and contributions to vLLM and llama.cpp side by side — useful context for the talk's emphasis on deterministic boundaries. The talk relies on an internal HumanLayer case, and it closes with invitations to try the published skill and join the company. It is therefore a vendor-engineer's account of firsthand practice, not independent market research.
Mistele's anti-pattern is a blind loop that receives a large task and returns a 40,000-line pull request: the agent has produced a lot, but no one wants to read the result. For teams, complex codebases, and systems with real users, he takes the loop back to control theory and explains it through an ordinary thermostat:
- the set point defines the desired property of the codebase;
- the sensor measures the current state and the error relative to the target;
- the controller selects the next small change;
- the actuator — a coding agent — applies it;
- the system then checks the result and begins another iteration from its new state.
The key detail is that an LLM is not needed everywhere. In HumanLayer's example, the team is migrating RPC procedures to Effect incrementally. ast-grep deterministically finds the old pattern, the controller can select the smallest procedure, and the agent migrates it using handwritten golden patterns. A baseline of existing violations is stored in Git so new team changes cannot increase the debt. One CI iteration creates one small pull request; another is not opened while that PR remains unresolved. When a human leaves /iterate, the review feedback is written into a version-controlled feedback file that steers future runs. Mistele released the same design as an open-source skill on the day of the talk.
This is where a second page belongs on the desk. On the day the video was released, HumanLayer's other co-founder, Dex Horthy, published “Why Software Factories Fail”. Dex explains why a lights-off factory can fail even with a strong harness: tests provide a fast “works now” signal, while the cost of poor program design appears months later. There is no reliable fast verifier for maintainability yet.
That creates an important boundary. If the sensor sees only the number of unmigrated RPC procedures, the loop can drive that count perfectly to zero while learning nothing about the architecture of the resulting code. A control loop optimizes the selected signal, not our unspoken intent.
Kyle and Dex therefore do not contradict each other. Kyle's loop already contains human steering: people define the golden patterns, read every small pull request, provide feedback, and prevent work from accumulating without review. Dex adds the layer above it: humans must own the set point and the slow variables — product requirements, system architecture, program design, and the order of vertical slices.
I would watch and read them as a pair. Kyle provides the mechanics: automate the actuator and reproducible checks wherever possible. Dex supplies the constraint: an engineer still decides what counts as error and remains responsible for the code the team will revisit six months later.
https://www.youtube.com/watch?v=xIt_mTQp6mY
#AI4SDLC #AI #Agents #Architecture #Evals #Engineering
Public sources
- AI Engineer: Kyle Mistele's talk “Loop Engineering from First Principles”
- Dex Horthy: “Why Software Factories Fail”
- HumanLayer: full version of “Why Software Factories Fail”
- HumanLayer: implementation of the design-control-loop skill
- Kyle Mistele: article on harness engineering
- HumanLayer: company website
- Kyle Mistele's GitHub profile
- AI Engineer World's Fair 2026: official schedule
- Book Cube: Loop Engineering and the verifier's right to say no