Here we are again with yet another AI term: loop engineering. Not long ago it was harness engineering. So is loop engineering just marketing hype, or is there something real underneath it? The clearest way to answer that is to walk up the ladder from prompt engineering, one layer at a time, and see exactly why each new layer got added. By the end you will know what loop engineering actually means, how it differs from the layers below it, and whether it is something your team needs to think about yet.
Key Takeaways
- Loop engineering is scaffolding that lets an AI agent prompt itself, acting on a schedule or trigger instead of waiting for a person to ask each time.
- It sits on top of three earlier layers: prompt engineering (the ask), context engineering (the agent gathers its own information), and harness engineering (managing context from the outside).
- Loops are not new. Context and harness engineering already run on loops. Loop engineering removes the human from the please-do-this-again step.
- Writer and engineer Addy Osmani describes it through six components: automation, worktrees, skills, plugins and connectors, sub-agents, and state.
- Most teams are still building solid habits at the prompt engineering layer, and the fastest way up is to close the gap in order rather than jumping to loops everywhere at once.
Prompt Engineering: Telling the Model What to Do
Prompt engineering is the layer everyone already knows: telling the model what to do. Ask a model to draft a polite reminder email to a client whose invoice is three weeks overdue, and it can write a reasonable draft using nothing but what it already knows about tone and structure. Nothing external is needed. That is prompt engineering doing its job entirely on its own.
Context Engineering: When the Agent Gathers Its Own Information
Context engineering is what happens when the agent is given the autonomy to fill its own context window, rather than a person pasting information in ahead of time. A prompt lives inside the model’s context window, and there is usually a lot of room left in that window to fill with something more useful. The agent can read files, call MCP tools, query a database, or search the web, based on what the prompt actually requires.
Ask a model what this month’s government subsidy rate is for a 32-year-old enrolling in a professional course, and it cannot reason its way there from training data, because subsidy rates and eligibility rules get revised. It has to go and check the current published rate before it can answer accurately. That is context engineering: the agent bringing in live, external information on its own.
Harness Engineering: Managing Context From the Outside
Harness engineering is a system outside the context window that manages that window from the outside in, breaking a big request into a stable sequence of smaller steps the agent can execute. It exists because context engineering has a real limitation: it tends to fall apart on tasks that run longer than five or ten minutes. Longer tasks need more context than fits in the window, and while an agent can keep summarising its own context as it fills up, that process is leaky. Important details quietly get lost at every round of summarisation.
Ask an agent to reconcile an entire quarter’s expense claims across five regional offices, cross-check every line against receipts, and flag anomalies, and you are well past context-engineering territory. The task spans too many files and too many steps for one context window to hold together, so it needs an external harness managing the runtime and the task list as the work progresses.
Loops Were Never New
Loops were never new, which is the detail that is easy to miss. Context engineering already runs on a loop, the agent calling tool after tool until it decides it has enough to answer. Harness engineering runs on a loop too, working through a list of tasks outside the context window until the whole job is done. We have been stacking loop on top of loop for a while now. So the real question is what a layer called loop engineering adds on top of that.
So What Does Loop Engineering Actually Add?
Loop engineering adds scaffolding so the agent can prompt itself, deciding on its own that something needs attention without a person kicking it off each time. The honest answer is that it targets something different from execution: it targets the human doing the prompting. Everything described above still starts with a person asking a question or issuing an instruction.
A concrete way to picture this:
- Imagine a company running an online calculator that tells prospective learners how much government subsidy they would qualify for otn a course, built using prompt, context, and harness engineering together.
- Subsidy schemes and rates get revised periodically, and users occasionally report edge cases where the calculator gets it wrong: a self-employed applicant, say, or someone stacking three subsidies at once.
- Someone has to notice the change, or the bug report, and prompt the agent to fix it each time.
Loop engineering replaces that manual nudge with a scheduled check that watches official subsidy pages for updates, plus a separate self-guided process that picks up user-reported calculation errors and works through fixes on its own. The maintenance loop becomes self-guided rather than human-guided. Along the way, the agent can draw on existing rules and course data through installed skills and connectors, use sub-agents to double-check its own arithmetic against edge cases, and test fixes in isolated worktrees so multiple corrections do not interfere with each other.
The Six Ingredients of Loop Engineering
Writer and engineer Addy Osmani has described loop engineering in terms of six components, which map neatly onto that subsidy-calculator example. [External link to add: Osmani’s original piece, see Compliance Notes]
- Automation: the scheduled, self-triggering checks for rate changes.
- Worktrees: isolated workspaces so parallel bug fixes do not contaminate each other.
- Skills: packaged, reusable capabilities the agent can draw on.
- Plugins and connectors: the links out to official subsidy pages and internal course data.
- Sub-agents: smaller agents spun up to verify a specific calculation or fix.
- State: the running memory of what has been checked and what still needs attention.
Strip away the buzzword and this is really a description of an agent that can maintain something over time, not just respond to a single request.
Is Loop Engineering Just Hype?
It might be, and that is a fair worry. Plenty of people looking at loop engineering right now see it as another excuse to burn more tokens and produce lower-quality output rather than a real step forward. That skepticism is not unreasonable. Convincing, well-documented examples of loop engineering making a dramatic difference are still thin on the ground, and the subsidy-calculator example above is illustrative rather than proof of impact. Loop engineering, at this point, is closer to a plausible next step than an established practice.
What it does not do, importantly, is make prompt, context, or harness engineering any less necessary. Nothing underneath gets simpler once a loop is added on top. It is better understood as agents growing in scope, layer by layer, than as one layer replacing the ones before it.
Where Most Teams Actually Are Today
Most teams are still building solid habits at the prompt engineering layer, while the frontier conversation has already climbed three rungs further up. Workforce research from EY, IDC, and Workera points to a fairly consistent picture: 72% of employees already use AI at work, but only 33% have received formal training on it. Just 5% are working with AI in advanced workflows, and over 90% of organisations report a genuine AI skills gap. [Each statistic needs a specific source, year, and primary-source link before publishing, see Compliance Notes]
That gap is closable, and it closes in order: solid prompting first, then real context and tool literacy, then harness and agent design, then careful, supervised experiments with loops where judgment genuinely matters rather than everywhere at once. Teams that want a structured route through the first rungs can start with Heicoders Academy’s generative AI upskilling for individuals, and organisations upskilling a whole team can look at Heicoders Academy’s corporate AI training.
Frequently Asked Questions About Loop Engineering in AI
What is loop engineering?
Loop engineering is the practice of building scaffolding so an AI agent can prompt itself, acting on a schedule or trigger instead of waiting for a person to ask each time. It sits on top of prompt, context, and harness engineering, and focuses on removing the human from the please-do-this-again step.
How is loop engineering different from prompt engineering?
Prompt engineering is a person telling the model what to do in a single request. Loop engineering is about the agent deciding on its own that something needs attention and starting the work itself, so no one has to issue the instruction each time.
What is the difference between context engineering and harness engineering?
Context engineering is the agent gathering its own information to fill its context window, by reading files, calling tools, or searching. Harness engineering manages that context from the outside, breaking a long task into a stable sequence of smaller steps so details are not lost as the window fills up.
Is loop engineering just hype?
It is too early to say. Loop engineering is closer to a plausible next step than an established practice, and clear examples of it making a dramatic difference are still limited. It also does not replace the layers beneath it, since prompt, context, and harness engineering all remain necessary.
What are the six ingredients of loop engineering?
Addy Osmani describes six components: automation, worktrees, skills, plugins and connectors, sub-agents, and state. Together they describe an agent that can maintain something over time rather than respond to a single request.
Where should my team start if we want to build AI skills?
Most teams benefit from getting solid with prompting first, then building context and tool literacy, then harness and agent design, and only then experimenting carefully with loops. The gap tends to close in that order rather than all at once.
Ready to Go Further?
Working up this ladder is a skill, and like any skill it improves with structured practice and the right guidance. This is roughly the same progression we walk learners through, from prompting fundamentals through to giving an agent the context it needs to work reliably. Heicoders Academy’s Generative AI Course (GA100) is built for working professionals in Singapore who want to apply AI practically across their role, from writing better prompts to putting the layers below loop engineering into everyday use. If your team is confident with prompts but has not yet worked through context, harnesses, or agentic loops, the GA100 Generative AI Course is a place to build those foundations step by step.
Heicoders Academy specialises in tech and AI education for working professionals in Singapore. Our trainers are active practitioners in the tech sector, bringing real-world experience into every class.






