Loop engineering
Loop engineering is the practice of designing an agent’s iterative workflow — the loop it runs to make and check progress — rather than crafting a single prompt. The unit of work shifts from prompt → loop: instead of phrasing one request well, you define a goal, a stop condition, and a feedback signal, and let the agent iterate against its own prior work (files, tests, git history) until the condition is met. Named and popularized in 2026 around Claude Code / OpenAI Codex usage (agent-loops-verification, arjun-iyer).
Relationship to the rest of the wiki
- The Ralph technique (Geoffrey Huntley) is the canonical concrete instance: feed the same prompt repeatedly, the agent sees its previous work each pass and improves until a completion promise fires. Loop engineering is the general discipline; Ralph is one pattern.
- It is the authoring-time complement to the agentic-coding-harness (the structure the loop runs in) and to agent-orchestration (how loops fan out across subagents). spec-driven-development is loop engineering with a reviewable spec as the goal artifact.
- self-improving-agents is a loop whose output is new skills — the loop turned on the agent’s own capabilities.
The verification corollary
Loop engineering’s central consequence (agent-loops-verification): when the loop generates faster than a human can review, the binding constraint moves from generation to verification. A loop is only as good as its feedback signal — “feedback is only as truthful as the system that generates it.” So the value migrates to the verification layer: cheap, faithful checks the loop can run every iteration. This is why the wiki’s output-grounded-verification pattern (ai-job-search compiling and reading its PDF; renwei-writing‘s checklist) and the containment discipline of agent-guardrails matter more, not less, as loops replace prompts — and why, for cloud-native code, verification becomes a runtime problem (the platform-ops cross-spoke seam).
Related
agent-loops-verification · agentic-coding-harness · agent-orchestration · self-improving-agents · spec-driven-development · agent-guardrails · ai-job-search