AI Loops Need Control Theory, Not Hype

HumanLayer co-founder Kyle Mistele argues that AI coding loops need control theory for real-world application, moving beyond hype to build manageable and effective software.

Kyle Mistele speaking on stage at AI Engineer World's Fair.
AI Engineer
Visual TL;DR
AI Coding LoopsDriver
From the article 9+ mentionsIn the rapidly evolving world of AI-powered software development, the promise of automated coding loops is immense, but the current approach is often more hype than substance.
Problem: Ralph LoopsDriver
simple prompt-agent-done approach leading to massive, unreadable pull requests
From the article 2 mentionsMistele identified a common pattern he calls "Ralph Loops," inspired by Ralph Wiggum from The Simpsons.
Detached from QualityDriver
current methods often result in poor code quality and unmanageable software
From the article 2 mentionsKyle Mistele, co-founder of HumanLayer, argues that many teams are building these loops incorrectly, leading to massive, unreadable pull requests and a detachment from code quality.
Control TheoryCore
design sophisticated loops to guide and manage AI agents effectively
From the article 9+ mentionsSpeaking at the AI Engineer World's Fair, Mistele outlined a more pragmatic, "real-world" approach to leveraging AI for software development, emphasizing the application of control theory.
Agentic Control LoopsContext
building manageable and effective software beyond simple AI prompting
From the article 6 mentionsMistele then detailed the steps for building effective agentic control loops:
Real-World AI DevEffect
From the articleSpeaking at the AI Engineer World's Fair, Mistele outlined a more pragmatic, "real-world" approach to leveraging AI for software development, emphasizing the application of control theory.
Future of AIOutcome
moving beyond hype to build manageable and effective software
Contents(4)

In the rapidly evolving world of AI-powered software development, the promise of automated coding loops is immense, but the current approach is often more hype than substance. Kyle Mistele, co-founder of HumanLayer, argues that many teams are building these loops incorrectly, leading to massive, unreadable pull requests and a detachment from code quality.

AI Loops Need Control Theory, Not Hype - AI Engineer
AI Loops Need Control Theory, Not Hype, from AI Engineer

Speaking at the AI Engineer World's Fair, Mistele outlined a more pragmatic, "real-world" approach to leveraging AI for software development, emphasizing the application of control theory. The core idea is to move beyond simply prompting AI agents and instead design sophisticated loops that guide and manage these agents effectively.

The Problem with "Ralph Loops"

Mistele identified a common pattern he calls "Ralph Loops," inspired by Ralph Wiggum from The Simpsons. This approach involves a simple loop of prompt, agent, and done, often with extensive use of verifiers or multiple code review agents. However, this often results in the creation of massive pull requests, like 40,000-line changes, that are impractical for human review. He contends that while tools like Claude are powerful, simply piping prompts into them without a robust control mechanism leads to unmanageable and potentially error-prone code.

"We have this idea just kind of as an industry somehow that we can like pipe a prompt and a loop to a coding agent and that we can build software this way," Mistele stated. "But at the end of the day, if we're doing this, we're still building 40,000-line PRs that just nobody wants to read."

He also highlighted the cost and stability issues associated with some of these naive loop implementations, noting that they are often expensive and can lead to unexpected problems, especially in complex codebases or critical systems.

Control Theory as the Solution

Mistele proposed that control theory offers a better framework for building effective AI loops. This field, commonly used in engineering to manage dynamic systems, focuses on driving a system towards a desired state through a feedback loop. The key components are a set point (desired state), a sensor (measures current state), a controller (calculates error and decides on action), and an actuator (applies the change).

"Control theory is all about how we drive a dynamic system, which would be your codebase, towards some desired stable or optimal end state," Mistele explained. "You have a sensor that measures the current state of the world. You have your set point, the desired state of the world. And the difference between those two things is your measured error."

He drew parallels to everyday examples like thermostats and Kubernetes autoscaling, which all utilize control loops to maintain stability and achieve desired outcomes incrementally. This incremental approach minimizes risk and avoids the "over-steering" that can destabilize a system.

Building Agentic Control Loops

Mistele then detailed the steps for building effective agentic control loops:

  • Define the End State: Clearly articulate the desired state of the codebase.
  • Build Your Sensor: Identify how to measure deviations from the desired state. This can be deterministic (e.g., linters) or non-deterministic (e.g., AI agents). He specifically recommended tools like ast-grep for code analysis.
  • Build a Controller: Develop logic to decide what changes to make based on the sensor's output. This can be a simple deterministic rule or a more complex agent that analyzes data.
  • Build Your Actuator: This is typically an AI agent with a custom skill that applies the changes. He stressed the importance of creating "golden patterns" by hand for the agent to follow.
  • Build the Loop: Automate the process using tools like GitHub Actions to run the sensor, controller, and actuator in a cycle, creating pull requests for changes.
  • Put a Human on the Loop: Implement a low-friction feedback mechanism, such as a feedback file or specific commands (like /iterate), to allow human steering and correction.
  • Add Flow Control: Prevent loops from creating excessive work by managing the number of in-progress changes.

The Future of AI in Software Development

Mistele concluded by emphasizing that while the concept of AI-driven loops is powerful, the execution needs to be grounded in sound engineering principles. By applying control theory, developers can build loops that are not only efficient but also maintainable, reliable, and ultimately, lead to better code quality, even in large and complex codebases.

"We can build control loops that improve our code incrementally, and we're actually reading the code," Mistele said. "It has adaptive flow control so we're not creating a bunch of work that nobody wants to review. And we can re-steer it on the fly in a super low-friction way."

StartupHub data

In our directory

Anthropic is an AI safety and research company that develops reliable, interpretable, and steerable AI systems, including the Claude family of large language...

Location
San Francisco, United States
Funding
$4.0B
© 2026 StartupHub.ai. All rights reserved. You may not republish this article in full without a license. Search engines and AI research tools may crawl and summarize for reference. Bulk reproduction or model training requires a license. See our terms.
Daniel Singer

Written by

Daniel Singer

Editor, StartupHub.ai

Daniel Singer is the editor of StartupHub.ai, a technology expert and thought leader on AI and its applications across sectors, from fintech and healthcare to developer tooling and consumer software. He writes and tests the tools covered here thoroughly and regularly, and built StartupHub.ai to give founders, operators and buyers a clearer read on what they are actually being sold.

More from Daniel Singer