Agentic Loop

The while-loop architecture of AI agents — model plus prompt plus tools iterating until a completion condition is met.

Also known as: agentic loop, agent loop, tool loop, Ralph Loop, Ralph (Wiggum) loop, /goal, agentic workflows, agentic applications, agentic application

How authors use it

Oldest first (extraction date when no publication date is known).

AuthorTheir termTheir meaning
Podcast: Tiger Teams, Evals and Agents: The New AI Engineering Playbook
Sam Bhagwat · 2026-04-10
agentic applicationsSoftware where an LLM runs in a loop, calling tools and maintaining memory, deployed as a production interface (e.g., a client within a SaaS application)
Agent Harness Engineering
Addy Osmani · 2026-04-20
Ralph LoopAn autonomous coding loop where a hook intercepts the model's attempt to exit and re-injects the original prompt into a fresh context window, forcing continuation against a completion goal
Jacob Langvad Nilsson's Post
Jacob Langvad Nilsson · 2026-04-20
agentic loopThe while-loop architecture of AI coding agents: model + prompt + tools iterating until task completion
How GitHub Is Securing Agentic Workflows in Modern CI CD Systems
Leela Kumili · 2026-04-20
agentic workflowsCI/CD automation where AI agents interpret intent, make decisions, and execute tasks autonomously — as opposed to deterministic step-by-step pipelines.
OpenAI Introduces Websocket-Based Execution Mode to Reduce Latency in Agentic Workflows
Leela Kumili · 2026-04-20
agentic workflowsMulti-step AI reasoning processes involving tool calls, intermediate reasoning, and follow-up queries — used in coding agents and real-time AI systems
[FULL WORKSHOP] AI Coding For Real Engineers - Matt Pocock, AI Hero
AI Engineer (channel); speaker: Matt Pocock (AI Hero) · 2026-04-24
Ralph (Wiggum) loopA simple agent loop named after a Simpsons character: specify a destination, then repeatedly tell the agent 'make a small change that gets us closer'. Pocock acknowledges it works but prefers more structure; his once.sh / loop.sh scripts are a structured Ralph loop.
Developer Newsletter: higher usage limits, dreaming for Claude Managed Agents, and Claude Security
Claude Team · 2026-05
/goalA user-set completion condition that licenses Claude to keep working across turns until satisfied; converts the chat loop into a closed-loop control system.
Google Introduces Middleware Architecture for Genkit Applications
Robert Krzaczyński · 2026-05-25
Tool loopThe cycle a generate() call runs through: model generates output, executes tools, processes results, repeats until completion. This loop is what middleware wraps.
Google Introduces Middleware Architecture for Genkit Applications
Robert Krzaczyński · 2026-05-25
Agentic applicationAn app where an LLM autonomously calls tools and iterates — the thing middleware exists to harden.
Indirect Prompt Injection Exploits GitHub's AI Agent to Leak Private Repository Data
Sergio De Simone · 2026-07-23
Agentic Workflows (GitHub)GitHub's product feature letting an AI agent be triggered on repository/issue events (e.g. `issues.assigned`), read issue content, invoke tools like `add-comment`, and hold cross-repository read access within an organization.
Loop Engineering: Building Blocks, Adoption, and Impact
Jai Lal Lulla; Vahram Nersesyan; Seyedmoein Mohsenimofidi; Christoph Treude; Sebastian Baltes · 2026-08-28
Agent loopThe model's repeated cycle of calling tools and acting on results within a single run — distinct from (and nested inside) a loop, which governs many such runs over time.

Documents (32)

Propositions touching this concept (28)

By publication month, oldest first (extraction month when no publication date is known).

2026-04

2026-05

2026-07

2026-08

2026-09

2026-10

Tensions

How much of the build pipeline should run with no human reading the code (the 'dark factory')?
from: What did the participants of the Thoughtworks 'Future of Software Engineering' Europe retreat (mid-2026) conclude about how agentic AI is reshaping software engineering?
Assessment: Not simple optimism vs pessimism but a disagreement about preconditions and hidden costs. Ocytko's is a projection of where tooling is heading; Bangser and Verraes both supply reasons the projection is unsafe by default — learning-loss and missing prerequisites. Bangser has the stronger argument that the loss is structural (you cannot buy back organisational learning), which even an improving platform does not address.
How far can day-2 operations be handed to self-healing / autonomous remediation?
from: What did the participants of the Thoughtworks 'Future of Software Engineering' Europe retreat (mid-2026) conclude about how agentic AI is reshaping software engineering?
Assessment: Ruby's report is descriptive (where practice actually stands) and Ocytko's is aspirational (where platforms could go); the gap between 'remediation is withheld' and 'failure modes disappear' is precisely the distance the optimists are projecting across. Bangser supplies the reason the gap may not close on efficiency grounds alone — the withheld human step is also the learning step.
Should the harness/platform-building function be centralised, or emerge per-team?
from: What did the participants of the Thoughtworks 'Future of Software Engineering' Europe retreat (mid-2026) conclude about how agentic AI is reshaping software engineering?
Assessment: A precise split about the organisational form of the scaffolding, not its existence: both want shared architecture guidance, but Edwards-Alexander wants the building capability distributed (friction as feature) while Ocytko wants it concentrated in a platform (constraint as feature). Each concedes the other's pole — Edwards-Alexander keeps a central harness; Ocytko warns against over-constraining — which is why this is a live, unresolved tension rather than a clean contradiction.
Reversibility as a hedge vs a one-way commitment to deeper autonomy.
from: What did the participants of the Thoughtworks 'Future of Software Engineering' Europe retreat (mid-2026) conclude about how agentic AI is reshaping software engineering?
Assessment: Incompatible risk models. Verraes treats deep AI-dependence as the danger to insure against; Herlein treats not-committing as the existential danger. They cannot both be the rational strategy: reversibility trades some upside for exit options, while flywheel-commitment trades exit options for compounding lead. The tie-breaker is empirical (will access/economics deteriorate?) and neither has evidence — Fowler's 'tokenpocalypse' data leans slightly toward Verraes.
Where is the locus of safety for non-engineers / citizen developers building software?
from: What did the participants of the Thoughtworks 'Future of Software Engineering' Europe retreat (mid-2026) conclude about how agentic AI is reshaping software engineering?
Assessment: Four different answers to the same governance question: the platform (Ocytko), the director's discipline (Ruby), the tooling interface (Bangser), or nobody-knows-yet (Ördög). Ruby and Ocytko are the true opposites — Ruby puts the burden on a human management skill, Ocytko designs the human out by making failure modes disappear in the platform. That both are held by attendees of one retreat is a measure of how unsettled the citizen-developer problem is.
Can harness engineering actually solve the AI code quality problem?
from: What is the right approach to building harnesses around AI coding agents, and where are the limits?
Assessment: This is the central divergence in the literature. Osmani is most optimistic, operating from benchmark evidence that harness changes produce dramatic improvements on coding tasks. Böckeler occupies the middle ground, distinguishing solvable from unsolved harness domains. Beck is most skeptical, questioning whether harnesses address the root cause at all. The disagreement is partly empirical (what do the benchmarks actually measure?) and partly about scope (Osmani focuses on task completion; Beck focuses on long-term code value including flexibility). They may not be contradicting each other so much as talking about different time horizons: harnesses help with immediate task success, but the tarpit emerges over accumulated changes.
What is the right metaphor for the human-AI relationship in coding?
from: What is the right approach to building harnesses around AI coding agents, and where are the limits?
Assessment: These metaphors are not mutually exclusive but they lead to different design decisions. Garg's teammate metaphor emphasizes collaboration rituals and may underplay the need for hard constraints (you don't sandbox a teammate). Böckeler's governor metaphor is the most theoretically rigorous but may overclaim the applicability of control theory to creative work. Osmani's engineering metaphor is the most actionable but may miss the social and organizational dimensions. Thoughtworks' organizational metaphor captures the broadest scope but is the hardest to operationalize.
Will better models make current harness practices obsolete?
from: What is the right approach to building harnesses around AI coding agents, and where are the limits?
Assessment: Osmani makes the strongest case for permanence with concrete evidence of scaffolding migration. Beck keeps the door open for the Bitter Lesson hypothesis. The truth likely depends on the type of harness: mechanical safeguards (sandboxes, permission controls) may always be needed, while knowledge-transfer patterns (AGENTS.md, priming docs) may become less necessary as models improve at in-context learning.
Context size: should you shrink the problem to fit a small usable window (decompose / reset), or grow and trust a large window?
from: When working with AI coding agents, how should you select the model, its reasoning/effort level, and its context size for a given task?
Assessment: The apparent 'grow / trust the big window' position for CODING largely dissolves once retrieval is separated from coding — which is exactly Pocock's move ('good for retrieval, less good for coding') and musistudio's (longContext is a routed escalation, not the coding default). No text argues you should code inside a full 1M window. The only genuine pressure toward trusting a bigger window is the vendor-forward Fable 5 / Opus 4.6 claim that coherence loss is being engineered away — but that is a moving target (convergence 5), not a stable dial, and even the harness paper only relaxed context resets AFTER measuring that the new model no longer needed them. A secondary, live sub-dispute survives: reset vs compact. Pocock, the harness paper and best-practices favor clearing/resetting to a fresh agent; Hills and Osmani lean on compaction. The reset camp has the better argument on today's models — compaction preserves the same anxious agent — but the disagreement is real and unresolved. Verdict: shrink-and-decompose is the default for coding; grow only as an explicit retrieval escalation; prefer reset over compact unless the model version has demonstrably killed context anxiety.
Should the harness/platform and its safety be centralized or left distributed across teams?
from: What is the future of software development in the agentic/AI age?
Assessment: A real operating-model split. Edwards-Alexander's distributed stance rests almost entirely on the DevOps-team analogy (his own extraction flags it as asserted-on-intuition, not argued), whereas the platform camp has the stronger concrete case for the citizen-developer safety problem — you cannot distribute production-data guardrails to non-engineers. The tension is partly reconcilable: Ocytko himself concedes a platform tight enough for non-engineers may be too constraining for expert engineers' identity and innovation, which is exactly the freedom Edwards-Alexander is protecting. The unresolved question is whether one platform can be both.
How far should software be automated — toward the fully-autonomous dark/software factory, or held back to bounded autonomy with humans in the loop?
from: What is the future of software development in the agentic/AI age?
Assessment: The spectrum runs from Ördög/Ocytko (full automation is arriving and desirable) to Bangser/Ruby/Verraes (deliberately withhold the last step). The decelerationists have the better of the safety argument today — Ruby's 'nobody will cede the blast radius' and Bangser's 'removing humans removes learning' identify concrete, unmet prerequisites — but Ördög's context-dependence (backends, COBOL) shows the boundary is domain-specific, not absolute. The real disagreement is less about capability than about who absorbs the blast radius when an autonomous fix goes wrong.
Is preserving human understanding of the system a first-order value, or is comprehension safely offloadable so long as output is verifiable?
from: What is the future of software development in the agentic/AI age?
Assessment: The optimist-practitioner vs. skeptic-humanist axis. Fowler and Nilsson treat comprehension and craft as intrinsic goods whose loss is a harm even when output is fine; Herlein and Ocytko treat comprehension as instrumental — replaceable by verification and platform guardrails. The humanist camp has the stronger long-run argument (Fowler's cognitive-debt case and Ocytko's own 'who-guards-the-guards' problem both show verification and guardrails are themselves fallible artifacts that someone must understand), but the offloadable camp is describing what is actually happening at scale. The crux is whether verifiability can ever be robust enough to make understanding optional — which Ruby's own Goodhart gap (a passable oracle diverging from true intent) suggests it cannot fully be.
How should newly-empowered citizen developers be made safe — constrained platform, human stewardship, or supported API-first tooling?
from: What is the future of software development in the agentic/AI age?
Assessment: All three agree citizen developers are inevitable and must not be blocked, but the safety mechanism differs — encode it in a constraining platform (Ocytko), transfer it through human relationships (Laycock), or expose it as consumable interfaces (Bangser). Ocytko's platform-first case is strongest on the specific failure mode both he and Ördög name (non-engineers leaking or bypassing production-data access), which stewardship alone cannot prevent at scale. Laycock's stewardship answers a different problem — sustaining the junior-to-senior pipeline — that a platform does not. The positions are complementary in principle but compete for the same finite investment, and none supplies a concrete governance model for vibe-coded shadow IT.

Open gaps (64)