So the next thing we're going to do is add flow control. Because the other problem that we had when we did this was that if we were at a customer site for a week or if we were traveling or spent six days working on slides instead of writing code, the PRs from all of our loops would just stack up. They'd duplicate work. They'd conflict. And we wouldn't get around to doing it. And the loop's work is important, but it's not that important. And so now we just had all this junk we had to deal with…

Kyle MisteleCo-founder, HumanLayer · Executive, HumanLayer

Context. Mistele explains why HumanLayer added a rule that a loop skips its run while its previous pull request is still open.

Talk: Loop Engineering from first principles, AI Engineer (YouTube), July 25, 2026, at 15:12.

Checked against the source [ Grade B ] Said in the last year Sells AI tools

Filed under

Who is speaking

Kyle Mistele, Co-founder, HumanLayer. A founder of a company that builds with coding agents every day and runs the migration loop he describes; HumanLayer sells AI coding tooling, so the talk also promotes its approach.

HumanLayer sells AI or agent tools or services, so it has a reason to publish flattering numbers about AI. The passage stays in the archive; read it with that in mind.

How this was checked

Checked against the source by a first reader, then confirmed independently by a second reader who fetched the source without seeing the first reader's notes (Independent review agent (Claude Sonnet), blind second pass from passage text and citation only, no repository access, 2026-11-03).

Whisper reads 'So the next thing we're going to do is add flow control… And so now we just had all this junk we had to deal with. It wasn't important.' The passage ends at 'deal with…' (the ellipsis marks the omitted next sentence). Exact otherwise.

How to cite this passage

Kyle Mistele (HumanLayer), “Loop Engineering from first principles”, AI Engineer (YouTube), 2026-07-25, at 15:12. https://www.youtube.com/watch?v=xIt_mTQp6mY Archived at https://the-ai-record.com/passages/humanlayer-loop-prs-stack-up-customer-site-2026

More from the same source

And of course, once you're feeling confident in the loop, we're going to want to speed it up, right? I have 150 RPC procedures to migrate. If I do one at a time, it's going to take six months, which is way longer than I want to wait.

Kyle MisteleCo-founder, HumanLayer · Executive, HumanLayer

Context. Mistele is explaining why HumanLayer would raise the number of procedures its loop handles per run.

Talk: Loop Engineering from first principles, AI Engineer (YouTube), July 25, 2026, at 16:23.

  • 150 procedures to migrate, HumanLayer RPC API migration to Effect
  • 6 months migration time one at a time, HumanLayer RPC API migration to Effect. Level not stated

Checked against the source [ Grade B ] Said in the last year Sells AI tools Passage page

And every morning, we walk into the office to a small incremental PR that's low risk. And when we first did this, it was actually really frustrating, and we turned the loop off … because we had to constantly update the skill, we had to constantly check out the branch, change the skill, change the code, commit and push, and our loop was actually really high friction, right?

Kyle MisteleCo-founder, HumanLayer · Executive, HumanLayer

Context. Mistele has just described scheduling the migration loop to run once a day as a CI workflow, and goes on to the problem HumanLayer hit with the first version.

Talk: Loop Engineering from first principles, AI Engineer (YouTube), July 25, 2026, at 13:48.

Checked against the source [ Grade B ] Said in the last year Sells AI tools Passage page

At HumanLayer, we like to build out what we call golden patterns by hand before setting the agent loose. These are just like idiomatic hand-written examples for the agent to follow because they're just pattern replicators and otherwise you're getting what's in the docs or what the agent knows from the internet.

Kyle MisteleCo-founder, HumanLayer · Executive, HumanLayer

Context. Mistele describes how HumanLayer prepares the skill given to the agent that makes each change in its migration loop.

Talk: Loop Engineering from first principles, AI Engineer (YouTube), July 25, 2026, at 12:47.

Checked against the source [ Grade B ] Said in the last year Sells AI tools Passage page

So today I want to talk about what I think works in the real world and what we've started doing at HumanLayer, which, to be clear, is still building loops, right? I think loops are super powerful, but we can design loops and still read the code. In fact, we can design loops that make it easier to read the code because the loops are making the code better.

Kyle MisteleCo-founder, HumanLayer · Executive, HumanLayer

Context. Mistele is opening the part of his talk about how his company builds agent loops, after arguing that loops which produce unreadable pull requests are the wrong design.

Talk: Loop Engineering from first principles, AI Engineer (YouTube), July 25, 2026, at 4:03.

Checked against the source [ Grade B ] Said in the last year Sells AI tools Passage page

To illustrate that, I'm going to walk through a control loop that we use internally at HumanLayer. For our loop, we are incrementally migrating our RPC API to Effect. We adopted it for some of our race prone code. We like it, so we're adopting it across the rest of our code base.

Kyle MisteleCo-founder, HumanLayer · Executive, HumanLayer

Context. Mistele introduces the worked example he uses for the rest of the talk: a daily agent loop at HumanLayer that migrates RPC procedures to the Effect library.

Talk: Loop Engineering from first principles, AI Engineer (YouTube), July 25, 2026, at 9:09.

Checked against the source [ Grade B ] Said in the last year Sells AI tools Passage page

Something wrong? Report a correction. JSON: /api/v1/passages/humanlayer-loop-prs-stack-up-customer-site-2026.json