Close Menu
AIToday7

    Subscribe to Updates

    Get the latest creative news from FooBar about art, design and business.

    What's Hot

    How Much Does a Local LLM Actually Cost to Run? I Measured Every Watt on Apple Silicon

    July 28, 2026

    Discovering cryptographic weaknesses with Claude

    July 28, 2026

    Are you struggling to find a tech job on the West Coast?

    July 28, 2026
    Facebook X (Twitter) Instagram
    Trending
    • How Much Does a Local LLM Actually Cost to Run? I Measured Every Watt on Apple Silicon
    • Discovering cryptographic weaknesses with Claude
    • Are you struggling to find a tech job on the West Coast?
    • How AI Is Helping Teen Entrepreneurs Launch Startups
    • 12 keychain gadgets worth carrying every day (and why they’re worth it)
    • More than 30 Minnesota water systems targeted in cyberattack
    • Alaina Lamberson, Recognized by Influential Women, Serves as API Integration Specialist and Prompt Engineer at Portable
    • Elon Musk’s xAI sues to stop Minnesota law banning nudification technology
    Facebook X (Twitter) Instagram Pinterest Vimeo
    AIToday7
    • Home
    • AI News
    • Tech News
    • AI Guides
    • Chatbots
    • Cybersecurity
    • Gadgets
    • More
      • Generative AI
      • Startups
    AIToday7
    Home»AI Guides»What Is Loop Engineering? The New AI Coding Shift Explained
    AI Guides

    What Is Loop Engineering? The New AI Coding Shift Explained

    aitoday7By aitoday7July 24, 2026No Comments8 Mins Read
    Share Facebook Twitter Pinterest LinkedIn Tumblr Reddit Telegram Email
    What Is Loop Engineering? The New AI Coding Shift Explained
    Share
    Facebook Twitter LinkedIn Pinterest Email

    What Is Loop Engineering? The AI Coding Shift Everyone’s Talking About

    In the first week of June 2026, a two-sentence post on X from Peter Steinberger, creator of OpenClaw and engineer at OpenAI,accumulated millions of viewsand split the developer community. The post urged engineers to stop prompting AI coding agents manually and start designing systems that prompt the agents on their behalf. Days later, Google Cloud engineer Addy Osmanipublished an essaygiving the practice a formal name and a parts list. He called itloop engineering.

    The timing was not random. Boris Cherny, head of Claude Code at Anthropic, had already told an audience at the WorkOS Acquired Unplugged event onJune 2, 2026that his daily workflow had changed at a fundamental level. Hedescribed running hundreds of agentsthat read his GitHub, Slack, and other signals to decide what to build next, with no manual prompting involved. Three engineers from three competing organizations reached the same conclusion within the same week, and the term entered mainstream developer vocabulary almost overnight.

    What Is Loop Engineering

    Loop engineering is the practice of designing automated systems that prompt AI coding agents, verify their output, and decide whether to continue or stop, all without a human entering each instruction manually. Instead of writing prompts one at a time and reading the results yourself, you write a program that handles the entire cycle.

    A loop finds a task, gives the agent the relevant context, lets the agent execute, checks whether the result meets a defined standard, and either marks it complete or sends updated context for another attempt. The developer’s role shifts from being inside the process to designing the system that runs it.

    Osmaniframed it on O’Reilly Radaras replacing yourself as the person who prompts the agent and designing the system that does it instead. He added a less widely quoted caveat that he remains skeptical and that developers need to be careful about token costs, which can vary wildly depending on usage patterns.

    From Ralph Loops to a Named Discipline

    The practice predates the name by roughly a year. InJuly 2025, Australian developer Geoffrey Huntley published a technique he called the Ralph Wiggum loop, named after the Simpsons character known for relentless persistence despite limited awareness. The idea was a bash one-liner thatwrapped Claude Code in an infinite loop, feeding the same prompt file to fresh sessions until the task was done. Each session read the codebase from disk, picked up where the last one left off, and ran until completion or failure.

    The technique went viral in late 2025 after developers reported shipping entire features overnight. Anthropic noticed and formalized it. ByDecember 2025, Cherny’s team had packaged it into an official ralph-wiggum plugin for Claude Code, and the company later shipped built-in/loopand/goalcommands as supported equivalents.

    Steinberger’s June 7 post crystallized the shift for a broader audience. Osmani’s essay the next day, later republished by O’Reilly Radar, provided the structure. What had been an informal hack used by power users now had a name, a parts list, and endorsements from engineers at OpenAI, Anthropic, and Google.

    The Five Building Blocks

    Osmani’s essay broke loop engineering into five components that both Claude Code and OpenAI’s Codex now support as shipping features.

    • Automationsschedule the loop to run on a cadence, turning a single run into a persistent system. Codex calls these Automations; Claude Code supports equivalent scheduling through scripting.
    • Worktreesgive each agent an isolated copy of the codebase, preventing parallel runs from overwriting each other’s changes.
    • Skillsare reusable files, often stored as CLAUDE.md or SKILL.md documents, that encode project knowledge so every future session inherits past decisions.
    • Connectorsintegrate external tools through protocols like MCP (Model Context Protocol), linking agents to GitHub, Slack, databases, and CI systems.
    • Subagentsprovide independent verification. One agent writes code while a separate agent reviews it, with no access to the writer’s reasoning.

    A sixth element sits underneath all five. External state, typically stored as markdown files or a task board, allows progress to survive between sessions. Without persistent state, each iteration starts from scratch.

    Loop Engineering vs Prompt Engineering and Context Engineering

    Loop engineering does not replace the earlier layers. It sits on top of them.Prompt engineeringshapes the individual instruction.Context engineeringdetermines what information the model sees and when. Loop engineering determines what keeps running after the first call.

    Each layer addresses a different failure mode. A bad output on a single call points to the prompt. A model that misses relevant information or hallucinates facts points to the context. A workflow that requires multiple iterations, verification gates, and autonomous decisions about what to do next points to the loop.

    A newer concept, harness engineering, focuses on the scaffolding that contains the agent and enforces safety constraints. Some practitioners treat it as a subset of loop engineering. Others view it as a separate discipline concerned with boundaries rather than task orchestration.

    The practical difference matters. A developer who improves a prompt is optimizing a single interaction. A developer who designs a loop is building a system that runs many interactions autonomously, each dependent on the outcome of the last.

    Production Results and the Skeptic Response

    The most cited production result comes from PostHog, the open-source analytics platform. At a team offsite in Lisbon, PostHog’s engineering team pointed an AI agent at their ClickHouse query engine, fed it slow production queries, andlet it run overnight. By morning, the agent had found a bug that had existed for nearlythree years, in which every query with a timestamp filter failed to use ClickHouse’s primary key correctly. The fix reduced the number of granules scanned by62%on the benchmark query and delivered an11% overall performance improvement, with no human intervention.

    PostHog credited the technique to Andrej Karpathy’s autoresearch method, published inMarch 2026, which involves giving an agent a system, a benchmark, and a budget, then letting it loop through proposed changes while keeping what helps and discarding what does not.

    The skeptic response has been equally grounded in data. Steinberger’s own API usagerevealed$1.3 millionin OpenAI token costs over 30 days, covering603 billion tokensacross7.6 million requestsgenerated by roughly 100 Codex instances running continuously. OpenAI covered the bill because Steinberger works there. The figure sparked a wider debate about what developers now call “tokenmaxxing,” where token throughput becomes a performance metric disconnected from shipped output.

    Developer communities on Hacker News and Reddit have raised separate concerns about agent drift, in which unattended loops accumulate small errors that compound over time. Several practitioners reported reverting to human-in-the-loop workflows after finding that the verification cost of reviewing autonomous output exceeded the time saved by automating the prompting.

    The gap between PostHog’s result and Steinberger’s bill points to what may be the most important and least discussed factor in loop engineering. The value of a loop depends almost entirely on the quality of its verification step. A loop with a strong exit condition, like a test suite that catches regressions, produces results like PostHog’s. A loop without one burns tokens and ships mistakes with equal confidence. The technique itself is neutral. The engineering discipline applied to the verification mechanism is what separates a useful system from an expensive one.

    What Comes Next

    Loop engineeringarrived at a moment when AI coding agents are already reshaping how software teams operate. Whether it matures into a lasting discipline or gets absorbed into broader agent infrastructure depends on two unresolved factors.

    The first is cost. Token pricing continues to fall, but loop-based workflows consume tokens at rates that can exceed standard chat usage by4x for single agentsand15x for multi-agent setups, according to figures cited in community discussions after Steinberger’s disclosure. Teams paying their own API bills face fundamentally different economics than engineers working inside the labs that sell the tokens.

    The second is tooling. Claude Code’s/goaland/loopcommands, Codex’s Automations tab, and third-party orchestration layers are all early implementations. If designing a reliable loop becomes significantly easier than it is today, broad adoption will likely follow. If loops remain fragile and expensive to debug, the practice may stay confined to teams with large token budgets and high risk tolerance.

    The underlying shift is already visible regardless of what happens to the vocabulary. Developers are spending less time typing prompts and more time designing systems that run autonomously. Whether the industry settles on loop engineering, agent orchestration, or another label, the workflow has moved.

    What is loop engineering in AI?

    Loop engineering is the practice of building automated systems that prompt AI coding agents, verify their output, and iterate until a task meets defined criteria. The developer designs the system rather than entering each prompt manually. The term was formally introduced by Addy Osmani in June 2026.

    How is loop engineering different from prompt engineering?

    Prompt engineering focuses on crafting a single instruction to get a better AI response. Loop engineering focuses on designing a system that sends many prompts automatically, checks results against tests or benchmarks, and decides whether to continue or stop. Loop engineering builds on prompt engineering rather than replacing it.

    Is loop engineering just a renamed cron job?

    The comparison is common in developer discussions but incomplete. A cron job runs a task on a schedule. A loop in the loop engineering sense includes verification, context management, and autonomous decision-making about what the agent should do next based on its own output.

    What are the risks of loop engineering?

    The primary risks are token cost, agent drift, and unverified output. Unattended loops can consume large volumes of API tokens quickly. Without strong verification steps, loops can accumulate errors that compound across iterations. The quality of the exit condition determines whether a loop produces reliable results or expensive mistakes.

    Coding Engineering Loop Shift What
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
    Previous ArticleOpen Weights and American AI Leadership
    Next Article How AI guardrails are impeding the work of offensive cybersecurity researchers
    aitoday7
    • Website

    Related Posts

    AI Guides

    Alaina Lamberson, Recognized by Influential Women, Serves as API Integration Specialist and Prompt Engineer at Portable

    July 28, 2026
    AI Guides

    AI Applications in Finance: A Practical Use Case Guide

    July 28, 2026
    Generative AI

    What Google has teased about Gemini 4

    July 27, 2026
    Add A Comment
    Leave A Reply Cancel Reply

    Top Posts

    How Much Does a Local LLM Actually Cost to Run? I Measured Every Watt on Apple Silicon

    July 28, 20260 Views

    Discovering cryptographic weaknesses with Claude

    July 28, 20260 Views

    Are you struggling to find a tech job on the West Coast?

    July 28, 20260 Views
    Stay In Touch
    • Facebook
    • YouTube
    • TikTok
    • WhatsApp
    • Twitter
    • Instagram
    Latest Reviews
    Chatbots

    OpenAI bets on families as ChatGPT goes deeper into households

    aitoday7July 11, 2026
    Generative AI

    MUSIC COMMUNITY INTRODUCES NEW LABELING PROGRAM TO DISTINGUISH GENERATIVE AI IN SOUND RECORDINGS

    aitoday7July 11, 2026
    AI News

    Safe from AI: which jobs will help you thrive in the future?

    aitoday7July 11, 2026

    Subscribe to Updates

    Get the latest tech news from FooBar about tech, design and biz.

    Most Popular

    How Much Does a Local LLM Actually Cost to Run? I Measured Every Watt on Apple Silicon

    July 28, 20260 Views

    Discovering cryptographic weaknesses with Claude

    July 28, 20260 Views

    Are you struggling to find a tech job on the West Coast?

    July 28, 20260 Views
    Our Picks

    OpenAI bets on families as ChatGPT goes deeper into households

    July 11, 2026

    MUSIC COMMUNITY INTRODUCES NEW LABELING PROGRAM TO DISTINGUISH GENERATIVE AI IN SOUND RECORDINGS

    July 11, 2026

    Safe from AI: which jobs will help you thrive in the future?

    July 11, 2026

    Subscribe to Updates

    Get the latest creative news from FooBar about art, design and business.

    Facebook X (Twitter) Instagram Pinterest
    • About Us
    • Get In Touch
    • Disclaimer
    • Privacy Policy
    • Terms and Conditions
    © 2026 AIToday7. All Rights Reserved.

    Type above and press Enter to search. Press Esc to cancel.