The AI World is Getting 'Loopy'
What Are AI Loops?
At Meta's @Scale conference, Claude Code creator Boris Cherny introduced the concept of "loops" as the next evolution in AI development. Unlike traditional agentic AI that requires human oversight for discrete tasks, loops authorize swarms of AI agents to work continuously in the background—endlessly.
Key Technical Insights
The Evolution of AI Development
Cherny outlined the progression:
- Two years ago: Developers wrote source code by hand
- Current state: AI agents write the code
- Next phase: Agents prompt other agents that then write code
"As big as the step from source code to agents was, loops are just as important and as big a step," Cherny explained.
How Loops Work in Practice
Cherny shared specific examples of loops running continuously in his own work:
- Architecture improvement agent: Constantly looks for ways to improve code architecture
- Abstraction unification agent: Searches for duplicated abstractions that can be unified
- Both agents submit pull requests autonomously like human developers
- Because code is constantly changing, these agents never stop running
Technical Foundation
Connection to Classical Computing
Loops aren't entirely new—they build on recursive loops from intro computer science:
- Traditional recursive loops call themselves to repeat actions with a stopping condition
- AI loops use non-deterministic logic: a subagent decides when to stop instead of a predefined condition
The Ralph Loop Pattern
One popular implementation is the "Ralph Loop" (named after Ralph Wiggum):
- Summarizes all work the model has completed
- Asks if the goal has been accomplished
- Bounces the model back and forth until the task is complete
- Prevents AI models from getting lost during long-running tasks
Test-Time Compute Strategy
Loops align with OpenAI researcher Noam Brown's observation:
- Contemporary models can solve nearly any problem with enough compute
- Loops keep throwing compute at problems until they're finished
- Particularly effective for hill-climbing problems like improving codebases
- Models make incremental improvements until reaching a threshold—or indefinitely
Business Considerations
Cost Implications
Token consumption is significant:
- Like agentic AI, loops burn through tokens faster than Q&A chatbots
- Since loops run continuously, there's no ceiling on spending
- Fine for token-selling companies like Anthropic
- Potentially expensive for end users
Value Proposition
Despite costs, benefits could be substantial:
- With proper oversight of token spend, drift, and AI issues
- For the right problems and setups
- Returns could outweigh operational expenses
Industry Significance
This represents a fundamental shift in how developers interact with AI:
- From writing code manually
- To managing AI agents writing code
- To AI agents managing other AI agents that write code
The loop paradigm places significant trust in AI systems but could be the breakthrough needed for AI to handle real, continuous production work.