---
id: "concept-agentic-queues"
type: "concept"
source_timestamps: ["00:32:59", "00:36:29"]
tags: ["agent-orchestration", "system-design"]
related: ["claim-queues-over-loops", "contrarian-queues-not-loops", "entity-ralph", "action-implement-agent-queues"]
definition: "Managing autonomous agents via a deterministic backlog of scoped tasks rather than infinite, open-ended while loops."
---
# Agentic Queues vs. Loops

## Two architectures for autonomous agents

**Loop-based** (e.g., [[entity-ralph]], Auto-GPT, BabyAGI): an agent is given a broad prompt and wrapped in a `while True` loop. It plans, acts, reflects, and decides when (or if) to stop.

**Queue-based** (Pocock's preferred): work is decomposed upfront into a backlog of discrete, scoped tasks (typically GitHub issues). An agent picks one task, executes it inside a sandbox, submits a PR, and *stops*.

## Pocock's critique of loops

[[entity-matt-pocock|Pocock]] argues loop-based architectures are:

- **Non-deterministic** — different runs of the same prompt produce wildly different outcomes.
- **Hard to debug** — failures occur at unpredictable points in long chains.
- **Catastrophically expensive** — runaway loops can burn massive token budgets.
- **Prone to cascading failure** — one bad decision compounds across the loop.

## Why queues win for engineering

This position is formalized in [[claim-queues-over-loops]] and [[contrarian-queues-not-loops]]. The queue model:

- Mirrors how **human engineering teams operate** (Kanban, ticketed work).
- Provides **clear boundaries** for each unit of work.
- Makes **progress tracking** trivial.
- Allows **parallelization** across multiple agents working different issues simultaneously.
- **Isolates failures** — a bad task fails its own PR; it doesn't take down a continuous process.
- Aligns with **decades of distributed-systems wisdom** (message queues, worker pools, idempotent jobs, CI pipelines).

The operational directive is [[action-implement-agent-queues]].

## Where loops still make sense

Long-lived persistent agents — monitoring systems, trading bots, game-playing agents — where the work isn't cleanly decomposable into isolated tasks. Pocock's claim is specifically about **software engineering workflows**, where queue-based design dominates.
