Hi,👋 we have updated the app and fixed multiple bugs. We are lacking funds, request to free user not to use Adblock. Ads are non intrusive. 😊

✨ Visual Editor

close

Thread Truncated

Only the first 20 tweets are shown to ensure high-quality rendering and prevent image size issues.

palette Canvas & Background

Gradient:arrow_forward
Text Color:
135°

style Card Style

40px
16px

text_fields Typography

16px
Dan Farrelly | Inngest.com
@djfarrelly
Everyone's asking "WTF is a loop?" Here's the question nobody's asking: what runs the loop?
Thread image
Dan Farrelly | Inngest.com
@djfarrelly
The AI discourse has converged on loops as a core primitive of agentic systems. Matt Van Horn (@mvanhorn) traced the from ReAct to tool-use to orchestration loops to loops supervising loops. Addy Osmani (@addyosmani) broke down the building blocks inside loops: automations, worktrees, skills, connectors, sub-agents. Van Horn landed on durability, arguing that loops which can't survive a restart aren't loops. Osmani's key thread was orchestration: design the system that prompts the agent instead of you.
Dan Farrelly | Inngest.com
@djfarrelly
I want to take their points further. Durability isn't just a property of the loop. It's the entire execution layer underneath it. The important fact is that durable orchestration is fundamental to building your agent loop architecture. Let's break down that architecture.
Dan Farrelly | Inngest.com
@djfarrelly
# Where loops break
Dan Farrelly | Inngest.com
@djfarrelly
The /loop and /goal patterns handle single-agent, single-session work well. An agent loops until a task is done. That covers a lot of ground. But the next stage (Stage 5 in Van Horn's framing) is where it falls apart:
Dan Farrelly | Inngest.com
@djfarrelly
• Loops supervising other loops
Dan Farrelly | Inngest.com
@djfarrelly
• Loops running on schedules, not just triggered by a human
Dan Farrelly | Inngest.com
@djfarrelly
• Loops that survive process restarts, deploys, and crashes
Dan Farrelly | Inngest.com
@djfarrelly
• Loops that spawn sub-agents and wait for results (sometimes hours later)
Dan Farrelly | Inngest.com
@djfarrelly
• Loops that need to be observable after the fact
Dan Farrelly | Inngest.com
@djfarrelly
That's not a prompting problem. That's an infrastructure problem.
Dan Farrelly | Inngest.com
@djfarrelly
Van Horn cites @runes_leo: "The costliest thing in AI coding is no longer writing code, it's managing the agent loop." A while True in a terminal doesn't give you any of this. Neither does a long-running process on a VM or sandbox.
Dan Farrelly | Inngest.com
@djfarrelly
Think about what happens when you run an agent loop on a server. The process will die or restarts. A deploy, an OOM, a spot instance reclamation. The loop restarts. But what was it doing? Which step was it on? Did it already send that Slack message? Did it already invoke the sub-agent?
Dan Farrelly | Inngest.com
@djfarrelly
You don't know. It starts over. Re-fetches data it already had. Re-calls the LLM for decisions it already made. Sends a duplicate notification. Spawns a duplicate sub-agent. You wake up to three identical Slack messages and a confused team.
Dan Farrelly | Inngest.com
@djfarrelly
The fix isn't "better error handling" — it's an execution model where each step is checkpointed, each decision is persisted, and recovery means resuming from the last successful step.
Dan Farrelly | Inngest.com
@djfarrelly
# The agent loop architecture in three layers
Dan Farrelly | Inngest.com
@djfarrelly
Three layers. Each one maps to a concrete primitive.
Dan Farrelly | Inngest.com
@djfarrelly
## Layer 1: The Loop
Dan Farrelly | Inngest.com
@djfarrelly
A loop is a cron plus a decision-maker. It runs on a schedule (or a trigger), evaluates state, and decides what to do next.
Dan Farrelly | Inngest.com
@djfarrelly
This is Van Horn's definition made concrete: what cron never had is the decision in the middle. The agent decides, not you. The cron is the heartbeat. The LLM is the decision-maker. Steps are the durable execution that checkpoint progress.
Generated by Thread Navigator
100%
view_carousel Carousel Studio NEW
Press ⌘ + S to quick-export