Loop engineering: stop prompting, start designing the check

Loop engineering is the buzzword of 2026: stop prompting your agents and design the system that prompts them instead. It's mostly good engineering with a new name, and the hard part isn't the loop, it's the check. Our opinion, plus the tools that help.

6 min read

Loop engineering: stop prompting, start designing the check

This summer a new term took over developer timelines: loop engineering. In June, Addy Osmani summed it up in one line: "Loop engineering is replacing yourself as the person who prompts the agent. You design the system that does it instead." Within weeks it was everywhere, from vendor explainers to online courses and an academic paper.

Loop engineering is mostly good engineering discipline with a new name. That's exactly why it's worth your time. But the hard part isn't the loop. It's the check.

From prompts to loops

Loop engineering is the latest step on a ladder most of us have been climbing for two years:

  • Prompt engineering: writing one good instruction.
  • Context engineering: giving the model the right information for one call, with files like AGENTS.md or CLAUDE.md.
  • Harness engineering: shaping one agent run, with skills, subagents, hooks and MCP (Model Context Protocol) connections to your tools.
  • Loop engineering: designing what happens across many runs: when an agent starts, how it knows it's done, what it remembers, what it may spend and who checks its work.

Each layer builds on the one before. You can't design a good loop around an agent that doesn't have the right context.

The four loops

There are four loops worth knowing:

  1. The agent loop. The basic cycle: the model gets context, calls tools, reads the results and repeats until the task is done.
  2. The verification loop. A grader checks the result against a rubric. If it falls short, the work goes back.
  3. The event-driven loop. The agent starts on its own, on a schedule or when something happens, like a new issue or a failed build.
  4. The improvement loop. What happens in each run is used to improve the agent itself: its prompts, skills, tools or memory.

Most teams today live in loops 1 and 3. The real value is in 2 and 4.

Four things to get right

1. Yes, it's partly a renamed cron job

Critics have a point. Schedules and triggers aren't new, and automation existed long before AI agents.

What is new is the worker in the middle. A cron job runs the same script every time. An agent reads, writes code and makes judgment calls. That changes what you need to design. You no longer design the steps. You design the checks.

2. Design the verifier first

An agent saying it's done is a claim, not a proof. And an agent grading its own work isn't really a check. A good loop has an independent verifier: tests, static analysis, a separate reviewing agent and, where it matters, a human.

The common failures show why: loops that keep "fixing" the same bug forever, and verifiers that approve without really checking anything. If you can't write down what "done" means in a way a machine can check, you're not ready to run that loop unattended.

3. Your review bandwidth is the real limit

Review is the new bottleneck, and loops make that worse before they make it better. A nightly loop can open more pull requests than your team can read, and approval quietly turns into a rubber stamp.

The longer-term risk is comprehension debt: the growing gap between the code in your repository and what your team actually understands about it. The faster the loop, the faster that debt grows. Run as many loops as you can review, not as many as you can start.

4. Start boring

The hype is ahead of the practice. Of about 36,500 repositories with AI agent configuration files, just 217, or 0.59%, run autonomous loops. And there's no systematic evidence of the benefits yet: most success stories are self-reported.

That's not a reason to wait. It's a reason to start small. Good first loops propose instead of act: triaging new issues, drafting a changelog, suggesting dependency updates. Let them earn trust before you let them merge.

What a good loop needs

  • A trigger and a stop condition a machine can check, like "all tests pass."
  • State outside the agent's memory, in files or a tracker. The agent forgets, the repo doesn't.
  • Skills that capture your project knowledge, so the agent stops guessing.
  • Isolation, such as Git worktrees, so parallel agents don't trip over each other.
  • An independent verifier, separate from the agent doing the work.
  • A budget and a pause button. A single loop that sweeps CI (continuous integration) failures can burn millions of tokens in a couple of days.
  • Clear moments where a human decides, especially before anything is merged or deployed.

Tools that help

You don't need a framework to start. Most of what you need is already in the tools you use.

In your coding agent

  • Claude Code offers /loop to rerun a prompt on a schedule and /goal to keep working until a condition you wrote is true, with a separate small model checking after every turn. Hooks, skills, subagents and worktrees cover the rest of the checklist.
  • OpenAI Codex has an Automations tab where you pick a project, prompt and schedule. Results land in a triage inbox, and runs that find nothing archive themselves. It also has /goal and a separate worktree per thread.

In your repository

  • GitHub Agentic Workflows lets you describe automations in plain Markdown that compile into GitHub Actions.
  • Copilot automations run on demand, on an event or on a schedule, and can propose improvements to themselves for you to approve.

For verification and improvement

  • Microsoft Foundry has an agent optimizer that tests changes to an agent against your own evaluations, plus insights that group recurring failures from production. That's the improvement loop as a product.
  • LangChain Deep Agents includes a grader option that adds a verification loop.

Fully managed

  • Devin Bots take an ongoing goal for days or weeks, run sessions in parallel and send decisions to a "Needs You" inbox, with spending limits you set up front.

From the community

  • The open source loop-engineering project on GitHub collects loop patterns and small tools, such as one that estimates a loop's token cost before you run it and one that isolates runs in a separate worktree. Handy to learn from; review it before you rely on it.

Our take

Loop engineering is worth learning, but not because loops are magic. It's worth learning because it forces you to write down what "done" means, what an agent is allowed to do and when a human decides. That's not a new kind of engineering. It's engineering.

So build the loop. But build it like someone who intends to stay the engineer, not just the person who presses go.

What's next

Are you running loops already? What's your first loop, and how do you check its work? Share your setup in the community channels or bring it to your next chapter meetup. A live demo of a loop that failed, and how you fixed it, is exactly the kind of session we love to put on stage.

Sources