Every agent runs the same basic cycle: look at the situation, decide what to do, do it, look at the result. Repeat until finished. Everything else is elaboration on that.
What happens in one cycle?
- The model sees. The goal, history and last result.
- It decides. A tool to call or a conclusion.
- The system acts. Executing the tool.
- The result returns. Into the conversation.
Where does the intelligence sit?
Entirely in the decision step. The loop is trivial code; whether the agent works depends on whether the model chooses sensible actions given what it can see.
Why does the context grow?
Because each cycle adds to the history. A long-running agent accumulates every tool call and result, which is what makes agents expensive and what eventually causes them to hit limits.
What happens when it grows too large?
Either failure or summarisation. Well-built agents condense their own history as it grows, which preserves the ability to continue and loses detail from earlier steps.
Why do agents repeat themselves?
Because the same situation produces the same decision. An agent that cannot make progress will try the same thing repeatedly, which is the most visible failure mode and why iteration caps exist.
What happens between cycles?
Whatever the surrounding system does, which is where products differ most. Some check permissions, filter tool output, summarise history or apply policy rules, and some do none of that.
That layer is invisible from outside and determines most of the experience. Two products on the same model, with the same tools, behave completely differently depending on what happens between the model deciding and the action occurring.
What does an iteration cap do?
Stops the loop after a set number of cycles regardless of completion. That is a blunt protection against runaway cost and it is the reason agents sometimes stop mid-task.
What is reflection?
A step where the agent evaluates its own progress before continuing. It improves results on longer tasks and adds cost, since it is another model call producing no direct output.
How many cycles does a real task take?
Anything from three to several dozen depending on the work. Each one is a model call with a growing context, which is the arithmetic behind agent costs being much higher than conversation.
What should you look at first in a trace?
The first two or three decisions. Assumptions appear early, and a misunderstanding at step one is both the most damaging failure and the cheapest to catch.
After that, jump to any step where the agent changed direction. Those moments are where it either recovered from a problem or drifted from the goal, and both are worth understanding before trusting the run.
What does a trace actually show?
The sequence of decisions, tool calls, arguments and results. Reading one is the single most informative thing you can do with an agent, and most people never open it because the summary appears sufficient.
It is also where the interesting failures live. An agent that reached the right answer through three wrong turns will fail on a slightly different input, and that fragility is invisible in the output and obvious in the trace.
Can you see the loop running?
In well-designed products, yes, and it is worth watching. The sequence of decisions is where a wrong assumption becomes visible, and a summary at the end conceals it.
Why is understanding this useful?
Because it explains everything else. Cost, latency, failure modes and the value of a good stopping condition all follow directly from the shape of the loop.