Search that does not tire
An agent loop is a search algorithm: propose an action, carry it out, read the result, adjust. Retrying is the part of search that exhausts a person, and it is the part a machine gets at the price of a model call.
An AI agent is a model running in a loop. The model proposes an action, a program carries the action out, the model reads the result, and then it decides what to do next. The loop continues until the task is done or the agent concludes it cannot be done. Anyone who has watched an agent work on a real task has seen what this looks like in practice: the agent tries a command, the command fails with an error, the agent reads the error and tries a variation, and when the variation fails too it tries a third approach, and a fourth.
This behavior has a name in computer science. A process that proposes candidate solutions, tests them, and uses the result of each test to choose the next candidate is a search algorithm. The agent loop is a search algorithm running over actions in the world. Each attempt is a probe into the space of things that might work, each failure rules out a region of that space, and each success opens the next step of the path. Dead ends are a normal product of search rather than a sign that something is wrong, and a searcher that never hits one was handed the answer in advance.
What a retry costs
The steps of this loop cost a person and a machine very different amounts. For a person, proposing an idea and trying it are not the expensive steps. The expensive step is returning to the problem after a failure. Every failed attempt costs attention and morale, both of those are finite, and neither is restored by trying again, so a person’s search stops when their determination runs out rather than when the space is exhausted. This is why persistence is treated as a virtue: it is scarce, and the problems worth solving usually require more of it than the first attempt suggests.
For a machine, a retry costs one more pass through the loop, which is one more model call. The failure enters the next call as information, and nothing else changes; the machine holds no discouragement between attempts.
This turns determination from a character trait into a purchasable quantity.
It is priced in compute, it is spent by the loop, and it is available in whatever amount the problem requires. Put more compute behind the loop and the search continues, hour after hour, pathfinding toward whatever the available tools make possible.
An engineer recently described a moment with his own agent that illustrates what this looks like at full speed. Someone sent him a voice message on Telegram, and within a few seconds his agent had found the message, transcribed it, and replied with an answer in generated voice. He had never programmed any of that behavior. The message was reachable, a transcription tool existed, a voice model existed, and a path connected them, so the agent walked the path. He was surprised. We are not, because finding an unplanned path through the space of what is possible is exactly what a search algorithm with tools does. The paths nobody drew in advance are still paths, and a tireless searcher will find them.
Divergence and convergence
The loop described so far searches one path at a time, retrying as it goes. Language models also support a second, wider form of search, and the two forms together account for most of what makes an agent system improve.
A language model can generate many candidate solutions to a problem for very little more than the cost of generating one: ten drafts of the same page, eight designs for the same component, twenty subject lines for the same email. A judge, which can be a person, a written check, or another model call, then compares the candidates and selects. We call the first half divergence and the second half convergence: generation spreads the search out across the space, and selection collapses it back to a point. Run once, this produces a better result than a single attempt would, for the ordinary reason that the best of twenty candidates beats the average of one.
The step that separates systems that improve from systems that do not is what happens to the selection afterward. When the reason a candidate won is written down as a rule, and every future run is required to read the rule before it starts, the next search begins from a smaller space, because candidates that would have violated the rule are never generated at all. Each round of generating and selecting shrinks the space the following round has to cover. A system built this way gets narrower and more precise with use. A single-attempt system, meaning one prompt, one output, and no record of what was chosen or why, searches the same space at the same width forever, because nothing carries over from one attempt to the next. Both systems can run on the same model. What separates them is whether the selections accumulate.
The outside judge
The selection step needs something real to select against. If the only judge available to the loop is the model itself, the search drifts. A model grading its own output against its own taste makes the output more internally consistent with each round rather than more correct, and the search converges on what the model already believes instead of on what works. Ten rounds of self-review produce an elaborate answer; they do not produce a tested one.
The correction has to come from outside the loop:
- A compiler rejects the code.
- A test fails.
- A customer does not reply.
- A measurement comes back lower than the prediction said it would.
Each of these contacts with the world eliminates candidates that no amount of internal reasoning would have eliminated, because the world holds information the model does not. A loop with reality contact converges on solutions that survive it. A loop without reality contact can run forever and converge on nothing, and the compute it burns buys elaboration rather than progress. Agent systems are sometimes dismissed on the ground that they produce careless work, and some do. A system wired to real feedback stops, because every careless output that fails in the world becomes a rule the next run must obey.
We build our own systems this way and run our own projects on them, and the same shape repeats in every one. The system generates more candidates than a person would have the patience to write, selects against written checks and recorded judgments, writes the reasons down where the next run must read them, and puts the result somewhere the world can grade it. The retries, the tenth attempt after nine failures, the returning to the problem each morning, all the parts of search that used to be paid for in a person’s determination, run on compute instead. What such a system asks for is the one input that can simply be bought more of.