Loop Engineering from First Principles — Kyle Mistele, HumanLayer @aiDotEngineer
Loop Engineering from First Principles — Kyle Mistele, HumanLayer  @aiDotEngineer
Uploaded July 2026 | Updated September 2026, 3 weeks ago
A coding agent will happily hand you a 40,000 line pull request that nobody can review and that quietly does the wrong thing. Kyle Mistele's argument is that the fix is not a better prompt but a better loop, borrowed from control theory: a thermostat senses the error between where a system is and where you want it, emits a control signal, and measures again, over and over. Infrastructure as code already approximates this. The point is to design agent loops the same way, so each iteration makes a small, readable change you can actually verify, instead of one giant diff you have to trust.

The working example is migrating a codebase one procedure at a time. A sensor, often just Grep or a structural search, finds the smallest unmigrated piece, a controller picks what to work on next, and an actuator agent makes the change against golden patterns defined by hand, gated by deterministic CI like a single loop iteration in CircleCI. The loop tracks its own PRs in version control, refuses to stack a new change while an earlier one is still open, and keeps improving the code incrementally, even while the team is away.

Speaker info:
- https://x.com/0xBlacklight
- linkedin.com/in/kyle-mistele
- https://blacklight.sh

Timestamps:
0:00 - Introduction: the 40,000 line PR problem
1:55 - Why more code is not the goal
3:37 - Is the generated code any good?
4:43 - Control loops from control theory
5:49 - Infrastructure as code and Ralph loops
7:06 - Applying control loops to coding
8:35 - Migrating a codebase one procedure at a time
10:40 - Tracking the loop in version control
12:35 - The actuator agent and golden patterns
13:51 - Wiring the loop into CI
15:44 - Avoiding stacked PRs and scaling the controller
Loop Engineering from First Principles — Kyle Mistele, HumanLayerWhy Your AI Agent Needs a Wallet: USDC and Nanopayments — Harshal Bhangale, CircleThe Base Model Is Dead — Varun Singh, Arcee AIHow Evals and Prompts Shape Agent Behavior — Preetika Bhateja & Daniel Bump, YouTube AdsAI is the World’s largest Relationship Therapist — Clay Cockrell & Tony Fabrikant, CoupleWork AIInside 847 Production Clinical AI Notes — Sebastian Fox, ComposoYour Finance Agents Bottleneck Is You — Ramana Siddanth Emani, Auditoria AIVoice agents with Realtime Video — Sidney Primas, LemonSliceCoding Agents Dont Scale Themselves. Neither Do Your Teams. — Patrick Debois, TesslScaling up Continual Learning — Ronak Malde, TrajectoryAgents Need Feature Flags - Sachin GuptaUnlock Agent Autonomy: The Runtime for AI-Native Systems — Tushar Jain, Docker
AI Engineer |

Loop Engineering from First Principles — Kyle Mistele, HumanLayer

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER