Loop engineering

Agents Intermediate
Definition

The practice of designing systems that run an AI agent in cycles toward a goal with little human input: the system prompts the agent, checks the result against a test or a rule, and sends it back around until the goal is met or a stop condition is hit. The human designs the loop instead of typing every prompt.

In plain English

Stop prompting the robot. Build the thing that prompts the robot. A loop runs the agent, checks the result, and if it isn’t done, runs it again with what it learned. You set the goal, the test, and the budget, then come back when it’s finished.1

In the real world

  • A nightly job that has a coding agent fix failing tests until they pass, then opens a review for a human.
  • A weekly report. Goal: the report is sent. Check: every number matches the source sheet. Budget: twenty minutes of agent time, then stop and ask.
  • Always-on agents such as Dots and Grok Bot, which keep working toward a goal in the background.3
  • The scheduled tasks and background modes appearing in Claude Code and Codex.1

When to use it

  • The work repeats and has a checkable finish line: tests pass, numbers match, every file converted.
  • You’re babysitting an agent through the same cycle every day.

When not to use it

  • No way to check the result automatically. A loop without a test just makes confident mistakes faster.
  • No cost ceiling. Loops that can’t stop are the expensive kind.
  • Anything irreversible inside the loop without a human step.

Good, bad, ugly

  • Good: you review outcomes instead of supervising steps.
  • Bad: designing a good stop condition and an honest check is harder than writing the prompt was.
  • Ugly: the term is months old. The practice is real; the vendor claims around it are not all.2

Key facts

Coined
June 2026, among people building with coding agents; studied in an academic paper by August
Sits above
Prompting (what you say), context engineering (what it sees), the harness (what runs it), then the loop (what runs the runs)
A good loop has
A clear stop condition, an independent check, a cost ceiling, and a rule for when a human steps in

Common questions

How is this different from just using an agent?

Using an agent, you type a task and watch. In loop engineering, a system kicks off the agent on a schedule or an event, checks its work automatically, and re-runs it. You review the end result, not each step.

Is this different from a harness?

The harness is the body around the model for one run. The loop is what starts runs, checks them, and decides whether to go again. IBM describes it as reframing the developer's job from prompting agents to designing systems that prompt, check, and guide them.

Is it real or hype?

Both. The practice of running agents in loops is real and older than the name. The name arrived in mid-2026 and the academic review of it notes bold claims and vocal skepticism side by side.

References

  1. What is loop engineering?IBM · 2026-07-17View source
  2. Loop Engineering: Building Blocks, Adoption, and ImpactLulla et al., arXiv · 2026-08-22View source
  3. Introducing Grok BotSpaceXSI · 2026-08-11View source
Updated 2026-11-10 Reviewed by Elena Boyd Large language model MCP