Loop engineering designs the system that prompts agents, instead of a person sitting inside every turn.1 A loop is a schedule plus a decision that reads state, acts, checks feedback, and chooses whether to continue.1

Overview

The harness runs one agent, and the loop finds work, spawns helpers, verifies, and feeds itself.1 A loop needs feedback and a halt: missing validation and loops without an exit are gaps,2 and stops such as max iterations and max cost belong in hard logic, not in a prompt the model can talk past.3 Skills inside the loop are the reusable asset, so a tick does not re-derive the project.

Mechanism

  1. A small program prompts, reads the result, and prompts again only if the work is not done.1
  2. The layer is named: execution, task, product, system, or oversight.4
  3. Durable state sits on disk, and the loop calls skills instead of pasting a giant prompt.1
  4. The maker is split from the checker,5 and iterations and cost are capped.3
  5. Context is seeded once before the loop when the question needs an opening retrieval.6

Applications

Loop engineering applies when work should repeat under a halt condition instead of a human prompting every turn.

Limitations

A fan-out with no return into a next cycle is not a loop. An uncapped loop that grades its own completion is excluded by the halt requirement.3

Worked example

Question’s Gambit is an opening move run once before a search agent’s loop.6

  1. The question is split into clues that can be searched in parallel, not ordered sub-answers.
  2. Each clue is turned into complementary searches.
  3. The results are pooled and deduplicated, and the pool is reranked against the full question.
  4. The top-ranked documents are handed to the agent as its first observation.
  5. The usual search loop then runs unchanged, verifying and filling gaps. The paper attributes the gain to the opening context, not to a different loop or tool.

See also

Further reading

References

Footnotes

  1. https://x.com/addyosmani/status/2064127981161959567 ↩ ↩2 ↩3 ↩4 ↩5

  2. https://x.com/av1dlive/status/2096578191691518314 ↩

  3. https://x.com/cyrilxbt/status/2087057424373182860 ↩ ↩2 ↩3

  4. https://x.com/aparnadhinak/status/2073492320159510869 ↩

  5. https://x.com/polydao/status/2101969181751361998 ↩

  6. https://arxiv.org/abs/2609.14412 ↩ ↩2