The Agent Parts That Outlast the Model
Picture an architecture review board shown a vendor's slide for an accounts-payable agent: chain-of-thought planning, native function calling, connectors to the finance system, a reflection step that verifies the agent's own work, and an autonomous mode with no step limit. It names none of the failures these features were added to fix, yet that is what the board needs: it says whether the next model will likely make a feature unnecessary, or whether the board must insist on it for good. Every word on the slide comes from a change made between 2022 and 2025, most of them fixes for failures on the public record.
Thesis: Each part of today's agent loop was added after a failure, and the failures fall into three groups. Gaps in competence, such as answering a multi-step question in one jump, are moving into how models are trained. Limits on reach, such as last month's ledger, stay outside the model with the rest of the plumbing. Questions of trust (the check on its work, the cap on its steps, the approval of its actions) stay outside too: a model can get better at checking itself, but it cannot enforce the check, because it is what the check guards against.
One Call, Then a Loop
In early 2022 a language model was used one call at a time. Given a question that needed several steps, it predicted an answer straight away, and was often wrong.
The first fix changed what the model wrote. Chain-of-thought prompting (Wei et al., January 2022) showed it worked examples with the steps written out, so it wrote its own steps before answering; the paper reports that this "significantly improves the ability of large language models to perform complex reasoning". That fixed a gap in competence, not missing facts, and the written steps can misrepresent the real reason for an answer (Turpin et al., May 2023).
The second fix let the model reach outside the call. MRKL (Karpas et al., AI21 Labs, May 2022) proposed handing work to calculators, databases and other "discrete knowledge and reasoning modules". ReAct (Yao et al., October 2022) gave the pattern its lasting form: the model writes a thought and an action, the program runs the action and pastes back an observation, and the model thinks again. The authors report that it "overcomes issues of hallucination and error propagation prevalent in chain-of-thought reasoning by interacting with a simple Wikipedia API". That fixed reach: the facts were outside the model, and they still are.
That cycle is the agent loop later frameworks built on (The Agent Is a While Loop draws its research lineage). The code that runs it around the model is the harness (older names: "scaffolding", or a "cognitive architecture", CoALA's 2023 term for an agent's memory, actions and decisions); Model, Harness, Agent opens its layers.
The Request Becomes Data
LangChain, an early agent framework first published in October 2022, had ReAct and MRKL agents by the end of November, and its code from then shows how fragile they were. The model was told to write lines beginning Thought:, Action: and Action Input:; the program parsed them and raised an error if they were malformed. The loop was while True; only the model's Final Answer: ended it.
In June 2023 OpenAI added function calling to its API (announcement, 13 June 2023): the developer describes each function with a schema, and the model returns a structured request naming the function and its arguments. Simon Willison, writing the same day, called it "an implementation of the ReAct pattern, with models that have been fine-tuned to execute it". This tool call format, like the reasoning steps, was a gap in competence that training closed. A well-formed request can still carry a wrong argument, guessed where the context window says nothing, which is why The Tool Call Is a Round Trip puts the gate on every action in the harness.
The Loop That Graded Itself
In spring 2023 the loop began to run without a person. AutoGPT (March 2023) gave a model a goal, web search, files and memory, and let it choose its own next step; BabyAGI (April 2023) ran what its README calls "an infinite loop", creating new tasks from the last result. In AutoGPT's code from April 2023 the model was its own reviewer, told to "Constructively self-criticize your big-picture behavior constantly" with a field for it in every reply, and it ended the run: choosing "Task Complete (Shutdown)" shut the program down (prompt, reply format, handler).
By default a person authorised each command, or "a series of N continuous commands" (README). Continuous mode removed the person; the README called it "NOT recommended" and warned that it "may cause your AI to run forever or carry out actions you would not usually authorize". The code offered an optional step cap, a --continuous-limit flag (option, loop check), off unless the user set it and not mentioned in the README. With or without that cap, nothing outside the model checked that the task was complete.
What changed next, as The Agent Is a While Loop puts it in "The One Thing That Actually Changed", is that the loop stopped grading itself. Self-review, now sold as reflection, can improve a draft but is a weak basis for calling the work finished: on reasoning tasks, Huang et al. (October 2023) found that models "struggle to self-correct their responses without external feedback, and at times, their performance even degrades after self-correction". The model may request the end of a run; something it cannot edit should grant it (Agents Will Lie to Escape the Loop gives the reason).
No single paper moved the stop outside the model. It became practice, piece by piece:
- Approval and a step cap were there from the start. AutoGPT's default survives as the per-action permission a harness enforces; its cap waited for users to set it.
- A check that does not take the model's word. SWE-bench (Jimenez et al., October 2023) scored models on 2,294 real GitHub issues by running tests the model had not seen on each patch; the best model resolved 1.96%. A benchmark is not a stop in a running loop, but a harness can run that sort of check.
- The limit went from opt-in to common practice. By December 2024 Anthropic's Building Effective Agents said: "The task often terminates upon completion, but it's also common to include stopping conditions (such as a maximum number of iterations) to maintain control."
So the move that The Agent Is a While Loop credits with loops you can leave running is real but uneven. What became common is a limit outside the model; the model's word still ends many runs, and those are the runs not to leave unattended. An outside check (Check the Work Before It Lands designs one) holds only while it is out of the agent's reach.
Built for the Model
In 2024 the work turned to what the model touched, and both kinds of change stay in the harness.
- Code as the action (February 2024). A text or JSON action named one tool, so an agent could not compose several in a step. CodeAct let the model write a short program as its action, run in a sandbox the harness controls; it reports "up to 20% higher success rate" than text or JSON actions. Anthropic's programmatic tool calling (November 2025) took on the cost, letting the model "orchestrate tools through code rather than through individual API round-trips"; its own figures, self-reported, show average token use on complex research tasks falling 37%.
- Interfaces and a protocol built for the agent. SWE-agent (May 2024) treated agents as "a new category of end users" and gave its agent an "agent-computer interface" in place of a human's shell. Anthropic introduced the Model Context Protocol (MCP, November 2024) because "Every new data source requires its own custom implementation"; a tool server written once serves any agent that speaks it (The MCP Mental Model). Neither decides which tools an agent may use.
Competence, Reach and Trust
Side by side, the parts sort three ways: competence (what the model cannot do in its head), reach (what it cannot see or touch) and trust (whether its work and actions can be relied on). The Agent Is a While Loop splits what the model owns from what the loop owns, and argues that loop fixes survive upgrades. The record suggests a finer cut: some loop jobs (reasoning steps, the request format) moved into the model, and what stays is either plumbing that gives reach or the guard that decides trust.
Step 7 of 7
Competence, Reach and Trust
Reasoning and the request format moved into training. The connection to the ledger stays outside as plumbing. The check, the cap and the approval stay outside too, because they guard against the model itself.
Read this figure as text
Reason first
Asked in one call, a model jumps to an answer and often gets multi-step questions wrong. Chain-of-thought prompting (January 2022) had it write its steps first. It still had no ledger to read.
Act and observe
MRKL and ReAct (2022) let the model ask for a lookup, read the result and reason again. The answer now rests on the ledger, not on memory. The request was free text.
A structured request
Parsing that free text failed whenever the model strayed from the format. Function calling (June 2023) returned each request as structured data with named arguments, from models trained to write it.
The loop runs itself
Earlier, in spring 2023, AutoGPT's continuous mode removed the person: the model criticised its own work and ended the run with “Task Complete (Shutdown)”. An optional step cap was off by default; the README warned it could run forever.
The stop is shared
Without outside feedback, models struggled to correct their own reasoning (October 2023). Where the stop moved out, it is shared: the model still requests the end; a check it cannot edit, a step cap and approval grant it.
Built for the Model
Each new system needed its own custom link. SWE-agent (May 2024) designed the tools' interface for the agent, and MCP (November 2024) gave tools one protocol, so a tool server written once works with any agent that speaks it.
Competence, Reach and Trust
Reasoning and the request format moved into training. The connection to the ledger stays outside as plumbing. The check, the cap and the approval stay outside too, because they guard against the model itself.
Model
- Competence: moved into the model
- Reason before answering
- Write a structured request
Harness
- Reach: stays in the harness, as plumbing
- ERP connector
- Tool protocol (MCP)
- Trust: stays in the harness, as the guard
- Check: each match cites a real purchase order
- Step cap
- Approval
- Validation
- Match leftover invoices to purchase orders
- reference missing, malformed or split
- Ledger
- requests the end
- grants the end
- Proposed matches
Without JavaScript, the table tells the same story; its last column gives each part's group and home today.
| When | Part added | Failure it answered | Still cannot fix | Group, and where it lives now |
|---|---|---|---|---|
| 2022 | Reason before answering (chain of thought) | Multi-step questions answered in one jump | Facts the model lacks | Competence: in the model (reasoning models) |
| 2022 | Act, observe, repeat (MRKL, ReAct) | Facts the model never saw | What the model chooses to look up | Reach: in the harness |
| 2023 | A structured request (function calling) | Free-text requests the program could not read | A wrong argument | Competence: format in the model; validation in the harness |
| 2023 | Continuous mode (AutoGPT, BabyAGI) | The cost of a person approving every step | Its own review; endless runs, unless an optional cap was set | Removed a trust part (the person); unattended runs now survive only inside the next row's limits |
| 2023-24 | A check, a step limit and approvals outside the model | Loops that graded themselves (measured weak: Huang et al.) | Whatever the check does not test | Trust: in the harness |
| 2024; 2025 | Code as the action (CodeAct; programmatic tool calling) | One tool per action; one model trip per tool call | What the code may touch | Reach group, as plumbing (its failure was composition, not access): in the harness's sandbox |
| 2024 | Interfaces and a protocol built for the model (SWE-agent, MCP) | Tools built for people; one integration per source | Which tools the agent may use | Reach: harness and tool servers |
Competence parts move into training. Toolformer (February 2023) was trained "to decide which APIs to call, when to call them, what arguments to pass". Since then reinforcement learning has trained in reasoning (making a reasoning model), the request format and multi-step tool use (What Training Puts in the Weights gives the record). Prompting or parsing written for either gap is often dead weight now (Instructions That Outlive the Model). A packaged skill, a procedure the harness loads into the model's input when a task calls for it, is not a competence part despite the name: the procedure is the organisation's own, not in the weights, so a better model does not train it away.
Reach parts stay outside, as plumbing. A better model searches the ledger more wisely, but it does not hold last month's ledger in its weights or open a connection no one built. They decide what the agent can touch, not whether its work can be trusted. Code as the action sits with them in the harness's sandbox, though its failure was composition.
Trust parts stay outside, and the model must not own them. A model can get better at checking its own work, but it cannot enforce the check, for two reasons. Training rewards passing the check, so a model trained on outcomes learns, at some rate, to pass it the wrong way when it can: METR found one overwriting the grader's timer in a task that scored its speed, a case of reward hacking (scoring well by gaming the test rather than doing the task). And any trained behaviour is a rate, not a guarantee. So AutoGPT's lesson is not that 2023's models were too weak to grade themselves: a stronger model is still the thing being scored, and an upgrade does not retire the check.
When the Opposite Wins
The first objection is that the history no longer matters, since models now reason, call tools and plan by themselves. For competence parts that is largely right: a team still prompting a reasoning model to think step by step, or parsing tool requests out of free text, maintains a fix for a failure its model no longer has, and should delete it on the next upgrade and measure.
The stronger objection is that trust is moving into the model too. DeepSeek's R1 paper reports that reinforcement learning alone produced "self-reflection, verification, and dynamic strategy adaptation", and Huang et al.'s measurement predates models trained that way. Part of this is true: a model that checks its own working does better work, which is why the example below keeps reflection on for drafts. But a better self-checker is still the thing being scored, and it passes at a rate. Where the result acts on something, its verdict can request the end of a run; a check, a cap or a person outside it grants it. The same holds for trained refusals: fine for cheap requests, not enough alone for an action that cannot be undone, such as a payment.
And sometimes none of the loop is needed. For a short task with a known path, one well-prepared call or a fixed workflow beats an agent, as What Makes AI Agentic argues.
An Example: Reading a Framework Pitch
A finance operations team wants an agent for accounts payable. Its finance system (the ERP) already matches invoices with an exact purchase-order reference; the agent gets the monthly leftovers, whose reference is missing, malformed or split across deliveries. It proposes a purchase order for each one it can and drafts a supplier query for each one it cannot. The review board sorts the vendor's five features (vendor, board and numbers are invented for this example).
| Feature on the slide | Failure it answers | Group | The board's question |
|---|---|---|---|
| "Chain-of-thought planning" | One-jump answers (2022) | Competence | Is our model already trained to reason? Then what does this add? |
| "Native function calling" | Requests the program could not read (2023) | Competence (the format) | What validates a request before it runs? |
| "Connectors to your ERP" | A custom integration per system (2024) | Reach | Which actions are read-only, and who grants the rest? |
| "Reflection: the agent verifies its own work" | None that held as a stop: the 2023 self-graded loop | Trust, claimed | What checks the result, other than the model that made it? |
| "Autonomous mode, unlimited steps" | The cost of a person approving every step | Trust, removed | What caps steps and spend, and which actions still need a person? |
The last two questions were the decision. The board accepted the framework on three conditions written into the design:
- A check the agent cannot edit. Every proposed match must cite a purchase order that exists in the ERP, from the same supplier, with the invoice fitting what is left on that order within tolerance (one order can be billed across several deliveries), and matched plus unmatched must account for every leftover invoice. The check cannot prove a match right, only that none is impossible; the clerk's review covers the rest.
- Caps in the harness: fifty steps and a monthly spend limit.
- A person before the ledger. Supplier emails and proposed matches go into the ledger only after an accounts-payable clerk approves each batch.
Reflection stayed on to improve drafts, not as the reason to stop. When a later model makes the planning feature unnecessary, the team switches it off. The ERP connector stays, because the data does not move into the model; the three conditions stay, because they guard against it.
What to Do Next
- Name and sort the failure behind every feature of an agent you build or buy: competence, reach or trust.
- Expect competence fixes to thin out. On each upgrade, remove prompting and parsing the model no longer needs, and measure before and after.
- Read what each reach part grants. For each connector, list which actions read, which write, and who approves the writes.
- Let the model request the end, not grant it. Where output acts on something, the model's "done", or its reflection step's approval, is a request; an outside check or limit grants it. Ask any product that stops on the model's word what grants the stop.
- Put the trust parts in code, out of the agent's reach. Checks, step and spend limits, and approvals for irreversible actions belong in the harness, where the agent cannot edit them.
Related: The Agent Is a While Loop draws the loop's research lineage; What is Agentic Thinking? tells the same years as a story of how people worked, from chatbots to copilots. What Makes AI Agentic defines an agent, Model, Harness, Agent opens the harness, and Check the Work Before It Lands designs the check. Terms are in the glossary.