
From Prompt to Loop: Four Paradigm Shifts in AI Engineering, Across My Three Years of College
They were never four things. They are one thing, growing outward in layers around a single frozen function.
I started college in the autumn of 2023. That year, everyone was talking about prompts. Sophomore year, it was context. In the spring of my junior year, open-source agent harnesses caught fire and everyone started saying harness. And at the very moment I'm writing this — June 2026 — the word loop has just been formally named.
Three years of college, four paradigms of AI engineering — almost one a year. But the deeper I look, the more certain I am of one thing: these are not four different things. They are one thing, growing outward layer by layer around a single frozen function.
Prologue: one me, four languages
When I first arrived in 2023, the way you got work out of a model was called "writing a prompt." I really would agonize over a single sentence — "You are a senior…", "Let's think step by step", "Do not output anything extra." It was a near-magical craft: you didn't know why a phrase worked, but it did, so you enshrined it.
Three years later, I barely hand-write prompts anymore. I write loops — a cycle that lets the model trigger its own reasoning, decompose its own tasks, call its own tools, and verify its own results. My job went from talking to a model to designing a runtime that lets the model do the work itself.
In between sat four shifts: prompt → context → harness → loop. Plenty of articles narrate this history — the timeline, the papers, the milestones are all searchable. But almost no one explains the question that matters most:
Why these four? Why this order? And which part of an agent's performance does each one actually move?
This piece braids three things together: the history itself (kept to primary sources wherever I could); the mechanism behind each layer — why it can move the model's behavior at all; and my own three years, standing at the scene of each shift as it happened.
But before the history, I owe you one governing principle. Once it's standing, the four paradigms are all just corollaries.
First, a nail in the wall: the model is a frozen function
To understand all of this, you only need to accept one fact:
A large language model is, at bottom, a frozen function: P(next token | the tokens that came before).
At inference time, not a single byte of its weights changes. It has no memory, no hands, no sense of time. Everything it does is this: look at the string of tokens in the context window, emit a probability distribution over the next token, append that token, and emit the next. That's all.
This has an enormous corollary: the only thing you can touch about the model itself is what goes into the context window. Nothing else. You can't change its weights, can't steer its "thoughts" — all you decide is which tokens to feed it.
So what is "agent engineering" actually engineering? Everything outside this frozen function. And outside, there are only two faces to touch:
- The input face — which tokens enter the window.
- The output face — what you do with the tokens it emits: turn them into a real action? feed the action's result back into the window? call the model again based on it?
The four paradigms are just these two faces, quartered:
- Prompt — input face, the instruction tokens. How to make it understand you.
- Context — input face, the knowledge tokens. Feed it the right information.
- Harness — output face, single turn: turn output into action, turn the result back into tokens. Make its decisions land.
- Loop — output face, across turns: how the window evolves between many round-trips. Let it act over and over without diverging.
This is why they wrap each other instead of replacing each other — they were never fighting over the same ground. They simply divide up everything controllable around a frozen function.
Here's the unifying formula. Everything about why each layer moves performance hangs off it:
P(task succeeds) ≈ P(intent understood) × P(knowledge present) × P(action reliable) × P(error stays bounded over N steps)
Note that it's multiplication. Each paradigm lifts one of these factors. Multiplication means: if any one factor collapses, the whole thing collapses. That's why a real production system can't be missing any layer — a missing layer isn't a lost garnish, it's a lost multiplier.
With the nail in the wall, let's walk the three years.
Year one · Prompt: when English became the hottest programming language
Prehistory: the completion machine of 2019
Four years before I enrolled, one detail is worth remembering. In 2019, OpenAI released GPT-2 and refused to publish all the weights at once, citing danger — releasing in stages, 117M first, then 345M, until the full 1.5B version on November 5, 2019.
It sounds a little silly now. But the bigger point: GPT-2 was not an assistant. It was a text-completion machine. No concept of conversation, no instruction-following, no "system prompt." To summarize an article, you typed "TL;DR:" at the end and let it continue; to translate, you wrote a few translation examples and appended the sentence for it to "guess" the next line.
This was the most primitive form of a prompt: you weren't talking to an assistant, you were handing completion material to an imagined author. The relationship was unequal — you had to accommodate the model, organizing your input in the form it could understand, rather than just saying what you wanted.
GPT-3 and the capability that got discovered
On May 28, 2020, OpenAI submitted Language Models are Few-Shot Learners — the 175-billion-parameter GPT-3. The core finding in one sentence: without updating a single weight, give the model a few examples in the input and it can "learn" a new task. Brown et al. named it in-context learning, in zero-, one-, and few-shot flavors.
The significance wasn't "the model got stronger." It was that this revealed a new programming paradigm: controlling a computer not by writing code, but by writing natural language to control a model. The blogger Gwern Branwen ran a frenzy of GPT-3 experiments in mid-2020 and named the practice prompt programming; one rule he distilled still holds today: sometimes you just need, literally, to ask for what you want.
But the piece that cut to the bone was Laria Reynolds and Kyle McDonell's Prompt Programming for Large Language Models (CHI '21, February 2021). They offered the perspective I still consider the most important:
*The role of a few-shot example is not to make the model "learn" a new task — it is to locate, within the model's existing space of abilities, a task it already learned in pre-training but hasn't yet activated.*
That sentence rewired how I think about prompts. Pre-training compresses a vast latent space of ability into the weights, but any single inference lights up only a tiny region of it. Writing a prompt isn't teaching — it's finding the way. A bad prompt locates a fuzzy region and the output is fuzzy; a good prompt lands precisely and the output is sharp. "You are a senior lawyer" works not because the sentence empowers the model, but because it locates the model onto a more expert region of the distribution already inside the weights.
The "magic sentences" I enshrined in my first year — that's the mechanism. They aren't magic. They're coordinates.
Chain-of-Thought: the one hardcore breakthrough of the prompt era
2022 was the year prompt engineering truly matured, and its hardest piece was Chain-of-Thought.
In January 2022, Google's Jason Wei et al. submitted Chain-of-Thought Prompting Elicits Reasoning in Large Language Models (NeurIPS 2022): adding intermediate reasoning steps to the prompt significantly improves complex reasoning. That May, Kojima et al.'s Large Language Models are Zero-Shot Reasoners went further — no examples at all, just one line appended to the prompt: "Let's think step by step." MultiArith accuracy jumped from 17.7% to 78.7%; GSM8K from 10.4% to 40.7%.
Those seven English words may be the single highest-impact prompt in history. But what I want to explain is why it works, because this is the mechanism most worth understanding at the prompt layer:
CoT is, at heart, adding inference-time compute to an autoregressive model.
The model is autoregressive — its only scratch paper is the tokens it has already emitted. If you don't let it write intermediate steps, it has to compute the answer in one shot within a fixed network depth (a fixed number of layers). For hard problems that depth simply isn't enough. Letting it "think step by step" turns fixed depth into arbitrary depth: every reasoning token it emits is one extra forward pass, and the earlier reasoning becomes input to the later reasoning.
So CoT isn't mysticism. It's the model using its own generated tokens as external working memory, splitting a problem it can't finish into a chain of problems it can. This also explains the counterintuitive constraint — CoT only helps on large enough models (roughly 50B+); on small models it can make things worse. Because you can't locate what isn't there: that latent reasoning ability only exists in the big models.
Later work — Self-Consistency (sample many paths and vote), Tree of Thoughts (expand the chain into a searchable, backtrackable tree; the Game-of-24 solve rate jumped from GPT-4's 4% to 74%) — all extends this same line: finding ways to give the model more, and more structured, paper to think on.
Careers, a bubble, and my freshman year
In early 2023, Anthropic posted a job that lit up the internet: Prompt Engineer and Librarian, $175K–$335K, no coding experience required — just strong language skills and interest in AI. On January 24, 2023, Karpathy tweeted: "The hottest new programming language is English." Searches for "prompt engineering" jobs on Indeed peaked in April 2023.
That was the year I enrolled. As a freshman I genuinely believed "being good at prompts" was a hard skill you could live on. And I did pour huge amounts of time into tuning the wording of a single sentence — this version adds a role, that version changes the tone, the next asks it to think before answering. I hadn't yet realized that all of that effort was locked inside the first factor of the formula: P(intent understood).
Then the bubble began to deflate. LinkedIn data showed the number of profiles with the "Prompt Engineer" title fell nearly 40% from mid-2024 to early 2025. In April 2025 the Wall Street Journal reported a Microsoft executive saying flatly: two years ago everyone said Prompt Engineer would be a hot job; it turned out not to be.
It's not that prompts stopped mattering. Two things happened at once: one, the models themselves got better and no longer needed so many tricks to be coaxed into understanding; two, the genuinely hard problem moved.
The boundary of the prompt layer
This is the ceiling of the prompt layer, and the formula says it cleanly: the best prompt in the world can only summon what the model already knows. It can push P(intent understood) very high, but it's powerless over the other three factors. A model whose training finished in 2022 doesn't know my university lab's internal docs, doesn't know today's stock price, doesn't know what the user said three turns ago. Those facts aren't in the weights and aren't in the window, and no prompt wizardry can conjure them.
P(knowledge present) — the prompt can't touch it. The bottleneck got pushed outward. In my sophomore year, I started hearing a new word everywhere: context.
Year two · Context: engineering signal-to-noise on attention
A thread even older than prompt engineering
Curiously, the technology that solves "knowledge present" showed up earlier than prompt engineering. In 2017, FAIR's Danqi Chen et al. built DrQA, establishing the two-stage "retrieve, then read" skeleton. In February 2020, Google's REALM first baked differentiable retrieval into a language model's pre-training. Then came the paper that defined everything — on May 22, 2020, Patrick Lewis et al.'s Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks (NeurIPS 2020) gave RAG its name.
It nailed the idea with one pair of concepts: parametric memory (knowledge stored in the weights, fixed at inference) vs non-parametric memory (an external knowledge base, accessed dynamically at inference). RAG stitches them: a retriever finds relevant passages, a generator turns the question plus passages into an answer. Result: Natural Questions 36.6% → 44.5%, TriviaQA 50.1% → 56.8% — and the knowledge base can be updated anytime, no retraining.
Note the dates: RAG is May 22, 2020; GPT-3 is May 28, 2020. Two foundational papers six days apart, each opening a track — the GPT-3 route is "make the model bigger, smarter, learn in-context," the RAG route is "let the model access external knowledge anytime." The two lines have been entwined — competing and merging — ever since.
Why "just stuff it in" isn't enough: long context and lost-in-the-middle
On May 11, 2023, Anthropic expanded Claude's context window from 9K to 100K tokens (the industry's largest at the time; GPT-4 was 32K). The demo was dazzling: stuff the entire Great Gatsby (72K tokens) in, change one line, and Claude found the edit in 22 seconds — a human reader would need over five hours.
So a belief spread: why bother with complicated RAG? Just stuff the whole codebase, the whole manual, into the window.
In July 2023, Stanford's Nelson Liu et al. poured cold water with Lost in the Middle: models don't use long context uniformly — performance is best when relevant information sits at the very start or end, and drops significantly when it's in the middle, even for models that advertise long context.
This is the mechanism I think matters most in the whole Context paradigm, and its root is in the Transformer's attention:
Attention is a softmax, and total attention mass is conserved.
The model distributes attention across every position in the window; after normalization, the total is fixed. Every chunk of irrelevant content you stuff in dilutes the share that goes to the key information. So "Lost in the Middle" — and what Anthropic later named Context Rot (as tokens grow, the model's ability to accurately extract information from them degrades) — is at bottom not the model "slacking off," but a signal-to-noise problem: the relevant signal gets diluted by irrelevant tokens in the attention distribution, and the more central the position, the worse the dilution.
That makes the essence of context engineering clear: it is signal-to-noise optimization on the attention mechanism. Maximize the density of task-relevant information in the window, minimize the interference. "Stuffing it in" is nowhere near enough — what to select, how to order, where to place, whether to compress or keep is the engineering. Gemini 1.5 later pushed the window to 1M tokens (99.7% needle-in-a-haystack recall), and the industry's eventual consensus wasn't "long context replaces RAG" but that they complement each other: static complete documents go in long context; dynamic data and cost-sensitive cases use RAG; the mainstream is RAG-retrieve first, then feed into long context.
There's also a memory layer. October 2023's MemGPT made a brilliant analogy: treat the context window as RAM (fast but limited) and external storage as disk (slow but unlimited), and shuttle dynamically between them via "virtual context management" — essentially an OS's virtual memory, giving the model the feeling of unlimited memory. A wave of dedicated memory-layer products followed — Mem0, Zep — all positioned as "framework-independent persistent memory, called like an API."
"Context engineering": a term that erupted in a matter of days
The practice had existed for years, but it got its name across a few days in June 2025. On June 19, 2025, Shopify CEO Tobi Lütke tweeted that he preferred the phrase "context engineering" because it more accurately described the core skill: providing the right context for a task so an LLM can plausibly solve it. The tweet got 1.9M views. Six days later, on June 25, Karpathy reposted +1 and gave the most-shared definition — in every industrial-grade LLM app, context engineering is the delicate art and science of filling the context window.
It spread fully within two days: Simon Willison; LangChain's Harrison Chase (who explicitly called prompt engineering a subset of context engineering); Philipp Schmid (proposing a seven-element framework for the window: system prompt, user prompt, short-term conversation, long-term memory, RAG content, tools and schema, structured output format). The first systematic survey appeared in July 2025; in September, Anthropic's engineering blog gave an official definition and introduced Context Rot and just-in-time retrieval. Gartner named 2026 "the year of context."
This naming storm meant far more than a relabel. It marked a collective awakening: getting information into the model correctly is itself an engineering discipline that needs systematic method — not a side gesture you make while writing a prompt.
Sophomore year was exactly the two years this term surfaced from practice and finally got nailed down. I remember it clearly: my focus visibly shifted from "how do I phrase this sentence" to "which information, in what order, do I feed in." Without noticing, I'd walked from the formula's first factor to its second.
The boundary of the context layer
But context solves P(knowledge present). And there's something it can never touch: the model knows what to do — but who does it?
The model can say in its output "I should query the database," "I should call that API," "I should edit this file" — but it can't. It only emits text. Query a database, call an API, run code, edit a file, send an email — it can do none of them. P(action reliable) — context can't touch it either.
Once again the bottleneck got pushed outward. This time onto the output face. In the spring of my junior year, I solved this hands-on for the first time. That same semester, open-source agent harnesses caught fire.
Year three, spring · Harness: wiring the model into the real world
What a harness is: turn output into action, turn the result back into tokens
The two prior layers all circled the input face. Harness is the first step onto the output face: how the tokens the model emits become a real-world action, and how that action's result becomes tokens fed back in.
This external system that wraps the model, connects tools, and controls execution is the harness. But the word itself was only clearly named in 2025–2026 — people had been doing it since late 2022, just without a shared term.
From WebGPT to ReAct: stitching action and reasoning together
The earliest systematic exploration of "let an LLM use tools" was OpenAI's WebGPT (December 2021): fine-tune GPT-3 into a model that operates a text browser — search, click links, cite sources. But its tool ability was fine-tuned into the weights; every new tool meant retraining — far too heavy.
The paradigm-setter was ReAct (Yao et al., October 2022, ICLR 2023). Its core is a three-part loop: Thought → Action → Observation, then Thought, Action, Observation again, until the task is done.
Why is this better than pure CoT or pure action? Here is the most critical mechanism by which a harness moves agent performance, hiding inside that Observation:
The result a tool returns re-enters the window as new tokens.
This is ground truth from reality that the model could not have generated itself. Its role isn't just "did a thing" — it lays a foundation under the model's reasoning. Pure CoT reasons inside static knowledge; when it's wrong it can't correct, and it walks further and further down its own hallucination. Every real Observation yanks the model from imagination back to reality and re-anchors it.
So on the surface a harness "gives the model hands," but its real value is building a loop that turns output back into input — letting reality's feedback periodically pour into the context window. In the end it loops back to the input face.
Function Calling: the real watershed
ReAct is a paradigm, but engineering-wise it was fragile — you had to make the model generate structured JSON and then hard-parse it with code, extremely brittle. On June 13, 2023, OpenAI shipped the Function Calling API and standardized it: the developer describes functions in the request (name, parameter schema, purpose), the model only decides (whether to call, how to fill the arguments), and the call itself is executed by the caller.
The whole pattern got fixed: developer defines tools → model decides when and how to use → developer executes → feed the result back for the model to keep reasoning. From that moment, "giving an LLM tools" no longer needed fine-tuning or a special framework — it became a standard operation any developer could do with an API call. This was the first time P(action reliable) was held up steadily by a general-purpose interface.
There's a framework story in the middle. In October 2022 Harrison Chase built LangChain, which exploded in early 2023 (Benchmark led a $10M seed, Sequoia a $20M Series A, valuation past $200M). But backlash came fast — Octomind publicly explained why they dropped LangChain: over-abstraction, framework lock-in, frequent breaking API changes, and debugging that shifted from "why did the model output this" to "what did the framework even do before calling the model." The backlash produced a plain philosophy: don't reach for a framework on simple tasks — call the SDK directly, handle tool calls with clean sequential code. A framework is an educational resource, not production infrastructure.
MCP: collapsing N×M into N+M
Tools worked, but every time you connected a model to a new data source (GitHub, Slack, a database), you wrote a bespoke integration for that model. N models × M data sources = N×M implementations — hell.
On November 25, 2024, Anthropic released MCP (Model Context Protocol), borrowing the idea from LSP (the standard that lets editors talk to language servers): define one JSON-RPC communication format; a tool provider writes one MCP server, and any MCP-capable client can use it. N×M collapses to N+M. Then came rapid standardization: OpenAI adopted it in its Agents SDK in March 2025, Google followed in April, and in December MCP was donated to the Linux Foundation. A private protocol became an open industry standard within a year.
Meanwhile, observability grew into its own track — traditional APM (Datadog, New Relic) simply can't catch the failures specific to LLM apps: how did the output change when the prompt changed? at which step did the model hallucinate? which step of a multi-step agent went wrong? how much did this run cost? LangSmith, Langfuse, Helicone, and Arize Phoenix were born from this.
The naming, and my junior spring
On April 19, 2026, Addy Osmani (former lead of Google Chrome DevTools) published Agent Harness Engineering on O'Reilly, giving this layer its cleanest formula:
Agent = Model + Harness.
A month later, Hugging Face sliced the concept finer: Scaffold (defines how the model "sees the world" — system prompt, tool descriptions, memory), Harness (calls the model, handles tool calls, decides when to stop), Orchestrator (coordinates multiple agents' harnesses).
This was exactly my junior spring. And in that same semester, open-source agent harnesses caught fire overnight — a framework that reads a codebase on its own, runs its own commands, edits its own files and then verifies them, turning "a model plus a shell can do real work" from papers and big-company demos into something anyone could clone and run.
I wrote my first harness right then. I remember the feeling exactly: before that, all my effort had gone into "how to talk to the model"; in that moment I suddenly saw that the genuinely hard and genuinely valuable part is the whole ring of stuff outside the model's mouth — how tools get registered, how failed calls are caught, how state is managed, how logs are kept, how cost is watched. My engineering object changed completely, from "a sentence" to "a system."
The things I built afterward — honeypot detection, doing GEO for content — all live in this layer and the one outside it: not teaching the model what to say, but designing the environment and loop around it. That shift began in my junior spring.
The boundary of the harness layer
But a harness governs one turn. Decide → act → observe, one beautiful tool use. And then? It has no concept of "a task that runs two hours, fifty steps, each step depending on the last." No backtracking, no checkpoints, no graceful stopping condition, no "recover from here when something breaks." You give the model a tool, it calls once, returns a result, the conversation ends — that's the whole of a harness.
But real-world tasks are exactly the ones that walk many steps in a row. P(error stays bounded over N steps) — the harness can't touch it. The bottleneck got pushed out one last time. Onto time. Recently, loop appeared.
Now · Loop: catching compounding error across many turns
Boris Cherny's line
Anthropic staff engineer Boris Cherny said something, quoted by Addy Osmani in June 2026 to define the fourth paradigm:
"I don't really prompt Claude anymore. I have a bunch of loops running that prompt Claude, that figure out what to do next. My job is to write the loops."
That line holds the thing the harness lacked: continuity.
A good harness lets the model complete one tool use. But if a task needs 50 tool calls, each step's result deciding the next step's direction, the whole thing running two hours — that's no longer "one tool use." It's a continuously running system of intelligent behavior. Designing that system is loop engineering.
Why long tasks are so hard: a multiplication problem
This is the layer most worth stating mathematically, because its difficulty is compounding. Suppose each step is 95% reliable. Sounds high, right? But a real task walks 50 steps, each depending on the last:
0.95 ^ 50 ≈ 0.077 — that is 7.7%.
This is why on the WebArena benchmark (July 2023), the strongest GPT-4 agent of the time scored just 14.41% on real web tasks, while humans scored 78.24%. Not a 2× gap — a 5× gap. No single step is especially dumb; the tiny per-step unreliability gets exponentially amplified over a long trajectory.
AutoGPT, which went viral on March 30, 2023 (16 days after GPT-4's release; Toran Bruce Richards pushed it to GitHub, 30K stars in 13 days, past 100K within weeks), had failure modes — infinite loops, context exhaustion, error propagation, cost blowups, an inability to stop — that are all this same compounding shown from different angles. Error propagation is especially lethal: step 3 goes wrong, its bad output enters the window as tokens, and steps 4 through 50 are all built on a poisoned context, with no backtracking mechanism.
AutoGPT wasn't a demonstration of agent success. It was the first time the whole industry saw clearly: an agent with no good loop design spins out of control. (Yohei Nakajima's 100-line BabyAGI — written in three hours over 50 GPT-4 iterations — was more valuable: it stripped the agent loop to its cleanest structure — decompose tasks → execute → generate new tasks from results → re-prioritize → loop.)
What loop engineering does: interrupt the compounding
So the whole job of this layer is to keep 0.95^50 from actually happening. How do you interrupt it?
- State machines / directed graphs (LangGraph, January 2024): represent execution as a state machine on a directed graph — nodes are operations, edges can carry conditions. The graph has explicit terminal nodes and backtracking paths, so infinite loops are structurally eliminated, execution paths are finite, and error stops propagating without bound.
- Checkpoints: persist the graph's state to a database after each node; if it crashes, recover from the last checkpoint instead of erroring from the top.
- Verification sub-agents: a dedicated agent that catches an error before it propagates — effectively inserting a correction term into that multiplication chain, pulling one step back up to high reliability.
- Human-in-the-loop / interrupt: stop and wait for a human before irreversible actions (sending email, deleting files, committing code). Anthropic's December 2024 Building Effective Agents took this to the root — least privilege: request only necessary permissions, prefer reversible actions, and when uncertain, do less and confirm with the user. Because an agent operates in real systems, one wrong irreversible action is real money lost. The core of loop engineering was never just "get the agent running" — it's "keep the loss bounded when the agent errs."
(In passing, Devin pushed SWE-bench to 13.86% in March 2024 — seven times the prior unaided SOTA. The number itself isn't high; 86% of tasks still failed. But it proved coding-agent loops had crossed a usability threshold, no longer just toys.)
One more, more fundamental view
Think this layer all the way through and you find something lovely:
Every turn of the loop is re-assembling the context window for the next model call.
So loop engineering is, at bottom, context engineering across time — managing how the context window evolves over a long trajectory, so that at step 30 it hasn't squeezed out the goal stated at step 1 (that's Context Rot at the loop level).
See? After a long detour, the fourth layer bites back into the second. Not a coincidence. It's exactly what the governing principle said: you are only ever moving one thing — the tokens that enter the window. Prompt moves its instruction part, Context moves its knowledge part, Harness moves the "turn reality's result back into tokens" step, Loop moves "how these tokens flow through time." One frozen function, four control points.
This is where I stand now
The moment I'm writing this is June 2026; the word loop has just been formally named, and I'm about to finish my junior year. My work now really is what Boris Cherny described: I don't hand-write many prompts anymore — I write loops, letting them trigger reasoning, decompose, call tools, and verify on their own. What I think about daily is: when should this loop stop? how does it recover when a step fails? at which node should a human step in? which actions must be made reversible?
From the freshman who agonized half a day over one sentence's wording, to the me who now designs loop structures — what sits in between is exactly these four shifts.
The 2026 cross-section: four layers stacked, none removable
Pull the lens back from history to right now. On this cross-section of June 2026, the four paradigms coexist and stack. Their fundamental difference is in what, exactly, you are optimizing:
- Prompt optimizes a single language instruction — vocabulary, structure, examples, format constraints.
- Context optimizes the content of the context window — which information is present, in what order, retrieved live or preloaded, history compressed or kept.
- Harness optimizes the model's runtime system — tool registration, permission control, state management, error handling, observability.
- Loop optimizes sustained intelligent behavior — when to stop, how to recover from error, how to hold the goal consistent, whether it's still trustworthy after many turns.
Back to the formula from the start, and you see why a production system can't miss any layer — because it's multiplication: P(intent understood) is Prompt, P(knowledge present) is Context, P(action reliable) is Harness, P(error stays bounded) is Loop.
- Remove Prompt: the model can't even read the tool descriptions; the first factor goes to zero.
- Remove Context: the model works in an information vacuum; the second factor goes to zero.
- Remove Harness: the model's decisions can't land; the third factor goes to zero.
- Remove Loop: the system can only finish a single shot; the fourth factor goes to zero on long tasks.
Any one factor at zero, and the product is zero. The four layers together are a real AI work system — not just a chat box.
Careers track this line too: 2023 was the peak of "Prompt Engineer" (standalone role, six-figure pay, no coding required); 2024 folded it into "AI Engineer" (now you write the deployment, monitoring, and evaluation code too); 2025–2026's frontier roles are "Agentic Systems Engineer" or "AI Infrastructure Engineer" — designing and maintaining the whole infrastructure the model runs in. Karpathy's "Software 3.0" caught the essence: the "program" is less and less a single prompt, and more and more the entire Context–Harness–Loop system.
Closing: boundary encounters, and a starting point that never disappears
Every shift is not a revolution but a boundary encounter
Looking back over the four, there's a pattern: each new paradigm appeared not because the previous one "failed," but because the previous one had done all it could within its own boundary — so a new paradigm grew outside that boundary.
- Prompt wasn't overthrown by Context — it's that with a model as strong as GPT-3, people genuinely wanted to use it on real knowledge bases, and hit the wall of "the model doesn't know your company's docs." The wall appeared; that's when you needed a retrieval layer.
- Context wasn't overthrown by Harness — it's that with the model strong enough, people wanted it to query databases and call APIs, and found it could think of what to do but had no hands to do it.
- Harness wasn't overthrown by Loop — it's that reasoning got strong enough to believe the model could push complex tasks forward continuously, but the exposed problems (infinite loops, error propagation, cost blowups) showed that "tools connected" was only the necessary condition; "loop controlled" is the sufficient one.
In the formula's terms: once each layer lifts its own multiplication factor close to 1, the bottleneck gets pushed onto the next factor. Intent clear (Prompt) → knowledge absent (Context) → can't act (Harness) → acting much makes it diverge (Loop). The bottleneck migrated outward all the way — from "the words I type," to "the information present," to "whether it can act," to "whether acting repeatedly stays stable."
I bet the pattern continues. Loop's current boundary — the trustworthiness of long tasks, the coordination overhead of multiple agents, enterprise compliance auditing, users' psychological trust in "a black-box agent operating autonomously" (Anthropic's June 2025 Agentic Misalignment research said it outright: current safety training can't reliably prevent agentic misalignment) — will likely force out a fifth layer. I'd guess its core question is: "How do you build trust and coordination across multiple agents, multiple loops, multiple organizational boundaries?" Some kind of Agent Governance, or Multi-System Orchestration. But that's not today's problem.
The historical starting point never disappeared
In 2019, someone typed "TL;DR:" at the end of an article in the GPT-2 Playground, hit enter, and watched the model emit a summary. That was the most primitive prompt.
In 2026, Boris Cherny no longer hand-writes prompts; he writes a set of loops that auto-trigger reasoning, decompose tasks, call tools, verify results.
But the most primitive question — "how do you make the model understand intent" — never disappeared. It got wrapped inside the loop, inside the harness, inside the context, but it's still there, the innermost core of the whole system. At the very center of every model call, there's still a prompt waiting to be interpreted.
This is the evolutionary logic of AI engineering: expanding outward from the model, layer by layer — first control the input (Prompt), then the information environment (Context), then the execution system (Harness), then the continuity of behavior (Loop). No layer abolished the one before; they stack.
And whenever a new layer appears, it demotes everything before it to infrastructure — no longer needing special attention, only correct configuration. Prompt engineering was once an enormous deal; now it's the basic move you get right on every call, no dedicated engineer required. Context engineering is going through the same thing. Harness and Loop will too.
This is the fate of paradigm evolution: today's frontier is tomorrow's plumbing.
My three years of college happened to walk this whole road — freshman year enshrining prompts as magic, sophomore year learning to feed the right context, junior spring writing my first harness, and now starting to write loops. By the time I graduate, the frontier will probably have moved one layer further out, and the things I find hardest and coolest today will be the scaffolding the next cohort takes for granted.
But the nail underneath won't change. However many layers stack outside, the innermost thing is always the same frozen function, looking at that string of tokens in the context window, quietly emitting the next.
The evolution of AI engineering is, fundamentally, a shift from "make the model answer" to "make the system act." And I've been lucky enough to be present exactly as it happened.
Appendix: key primary sources
- Brown et al., Language Models are Few-Shot Learners (GPT-3) — NeurIPS 2020
- Reynolds & McDonell, Prompt Programming for Large Language Models — CHI 2021
- Wei et al., Chain-of-Thought Prompting — NeurIPS 2022
- Kojima et al., Large Language Models are Zero-Shot Reasoners — NeurIPS 2022
- Lewis et al., Retrieval-Augmented Generation (RAG) — NeurIPS 2020
- Guu et al., REALM — ICML 2020
- Liu et al., Lost in the Middle — TACL 2024
- Packer et al., MemGPT
- Yao et al., ReAct — ICLR 2023
- Nakano et al., WebGPT
- Yao et al., Tree of Thoughts — NeurIPS 2023
- Anthropic, Introducing 100K Context Windows — 2023-05-11
- The "context engineering" naming: Tobi Lütke · Andrej Karpathy, 2025-06
- Anthropic, Effective Context Engineering for AI Agents — 2025-09-29 (Context Rot / just-in-time retrieval)
- OpenAI, Function Calling and other API updates — 2023-06-13
- Anthropic, Model Context Protocol (MCP) — 2024-11-25
- Addy Osmani, Agent Harness Engineering — O'Reilly, 2026-04-19 (Agent = Model + Harness)
- Hugging Face, Harness, Scaffold, and the AI Agent Terms Worth Getting Right — 2026-05-25
- Anthropic, Building Effective Agents — 2024-12-19
- Addy Osmani, Loop Engineering — 2026-06-08
- Benchmarks & agents: WebArena (2023) · Devin (Cognition, 2024-03-12) · AutoGPT (2023-03-30) · BabyAGI (2023-04-01) · LangGraph (2024-01)
- Anthropic, Agentic Misalignment — 2025-06


