Within a single year I’ve watched the “thing worth getting right” in agent work move up the stack three times. First it was the prompt. Then the context. Then the harness around a single run. The newest rung has a name now — loop engineering — and it’s worth being precise about what it is, because the obvious reading is wrong.

The ladder is real:

  • Prompt engineering — what you say in one turn.
  • Context engineering — what information lands in the model’s finite attention budget.
  • Harness engineering — what equips a single run: its tools, memory, and sandbox.
  • Loop engineering — what keeps poking the agent on a schedule, spawns helpers, and feeds itself.

The shift that makes the last one interesting is authorship. You stop being the thing inside the loop typing prompts. You write the loop, and the model becomes a subroutine it calls.

You’re no longer prompting the agent. You’re writing the program that prompts the agent — and the program decides when it’s done.

That sounds like a one-line while, and that’s the trap. The while is free. The engineering is everything you wrap around it so it can be trusted to run unattended.

The guardrails are the work

Three failure modes appear the moment a loop runs without a human watching each turn:

  • Context overflow — long sessions fill the window and reasoning quietly degrades.
  • Silent failure — confident output, tools firing, nothing actually changing. The hardest to catch.
  • Cost blowup — a single agent runs at several times the cost of a chat; a stuck one can call a broken tool hundreds of times in minutes.

So a real loop needs what the naïve version doesn’t: a verifier that isn’t the agent grading its own work, a no-progress detector, and a hard budget. A loop with nothing that can say no is just the model agreeing with itself.

The unit of work

The useful mental model: a loop is cron plus a decision-maker. Each tick the model picks the next action — not a hard-coded branch — and something independent checks whether the goal is actually met.

None of this makes the model smarter. It makes the system able to run while you sleep without lighting money on fire. That’s the whole game now: the loop is the new unit of work, and the guardrails are what separate engineering it from merely running it.