From Prompt to Loop to Graph: AI Coding's Three Paradigm Leaps

On July 18, Peter Steinberger posted a question on X: “Are we still discussing loops, or have we moved to graphs?”

Two days, 2.6 million views. Six weeks earlier, another post of his — “design loops you can prompt agents with” — pulled 8.4 million views and made developers worldwide realize the prompt-engineering era was closing and loop engineering was the new direction. Together the two posts drew 11 million-plus views and pushed AI coding’s hottest debate to an inflection point. This time, the question itself contains its own answer.

The Rise of Loops: When Prompting Became Designing

Look back over the year and AI coding’s paradigm has moved faster than most expected. In July 2025, engineer Geoffrey Huntley proposed a method he called “Ralph” — a bare Bash loop making Claude repeat a task until the goal is met:

while :; do cat PROMPT.md | claude-code ; done

Ralph’s essence is dodging the context window. Mainstream models then capped at 200K tokens — nowhere near enough for complex tasks. The fix was plain: split the agent’s run into smaller units, start each with fresh context, and persist completed work to the filesystem in compressed form. Huntley built an entire programming language from zero this way, proving feasibility — but the method only spread once stronger models arrived.

Loops went mainstream on the push of Anthropic’s and OpenAI’s own core developers. Boris Cherny, creator of Claude Code, said it flatly at a developer conference: “I don’t prompt Claude anymore. I run loops that prompt Claude and decide what to do next. My job is writing loops.” Former Google engineer Addy Osmani followed with an essay naming the practice: “Loop engineering is removing yourself from the position of prompting the agent, and designing a system that does it for you.”

Concept, name, infrastructure — all arrived in sequence. April to May 2026, Codex, Claude Code, and Hermes shipped the /goal command, productizing the hand-written loop into one instruction. Codex’s docs put it: “Goal means: keep working until this result holds.” A normal request processes the instruction, reports, and waits. With Goal, a persistent objective attaches to the thread; after execution the completion condition is checked automatically, and unfinished work continues. Example: “Reduce p95 latency on the checkout benchmark below 120ms while keeping the correctness test suite green” — a clear enough ending condition that the agent splits tasks, spawns sub-agents, and keeps running until done.

Graphs Arrive: When Designing Loops Becomes Designing Collaboration

Steinberger’s latest post points further down the road. A year ago, prompt engineering was the core skill; through 2025 into early 2026 the center of gravity moved to designing loops; now the next stage is visible — designing graphs of multiple loops, each agent running its own, connected by dependencies.

“Loops have a lot of tolerance for sloppiness. Graphs force you to admit how much of your workflow was never really modeled at all.” — Luis Catacora, in the thread

That line captures the paradigm difference: loops let you postpone architecture — let one agent swallow everything until it chokes; graphs demand the structure up front — who owns what, which tasks depend on which, what happens when a branch fails. Loops defer decisions. Graphs make them early.

Two Graphs: the Org Graph and the Work Graph

Google senior AI product manager Shubham Saboo — author of the Awesome LLM Apps repo with 124,000+ GitHub stars — offered the sharpest decomposition:

“A long-lived org graph defines who owns which domain and retains context; a work graph defines what needs doing now, and can split, merge, reorder, or vanish based on evidence.”

Production multi-agent systems therefore run two graphs simultaneously. The org graph — who owns what — consists of long-lived agents, each with a fixed domain, retaining that domain’s context, expertise, and tool permissions; relatively stable, like a company’s org chart. The work graph — what to do now and how work flows — shifts with every task and new piece of evidence: splitting, merging, reordering, or cancelling. It resembles a project plan generated in real time. They run on different clocks: the org graph is designed and deployed ahead of time; the work graph is generated per task and discarded when the task ends.

The Continuous Ascent of Developer Skill

The key to reading this chain is a clear migration of capability: Prompt → Loop → Graph → dynamic graphs. Each stage moves the developer one step further from talking to AI personally, one step closer to designing how AIs collaborate:

  • Prompt engineering: you write prompts and talk to the model directly.

  • Loop engineering: you design a loop that prompts the agent — you’ve retreated to the system level.

  • Graph engineering: you design the collaboration structure of multiple agents, each running its own loop, work organized by dependencies.

  • Dynamic graphs (the future): the graph itself becomes programmable — rewriting its own structure mid-execution.

Preston Holmes’s summary lands it: “Loops make agent behavior programmable. Graphs make agent organizations programmable.” The competitive moat is shifting from “who uses AI better” to “who designs better multi-agent collaboration systems.”

Three Entry Points Into the Graph Paradigm

1. Put /goal to work. If you are still sending Codex or Claude Code instructions one by one, change the habit today. Write one clear Goal and let the agent plan, execute, and check itself. That is not laziness — it is adopting the new paradigm.

2. Start separating “organization” from “work.” In multi-agent scenarios, ask two questions first: which agents should be long-lived, and what does each own? What temporary agents does the current task need, and how does work flow between them? Draw those two graphs — even crudely — and you are already ahead of one giant loop.

3. Watch where the tools go. Prefer tools supporting Goal-level instructions, and track platforms adding multi-agent topology management. The next AI coding tool war will not be over whose prompt templates are nicer — it will be over whose agent collaboration architecture is more elegant.

Steinberger’s post does not declare loops dead; it marks their maturity. When a paradigm gets named, debated, and generates volumes of methodology and infrastructure, it has already paved the road for the next one. From writing good prompts, to designing loops, to building graphs, the center of capability keeps climbing — developers increasingly need not know how to talk to a single agent, but how to design the collaboration between them. This is not an iteration of technique. It is a reshaping of what it means to be a developer.

Related News