YTYK You think you know

Card 17 of 18 Agents ●●○ Working knowledge

Errors and cost compound per step

An agent loops: act, observe, decide again. Both the chance of going wrong and the token spend accumulate across steps, and because each step's context includes the previous ones, cost tends to grow faster than linearly with the number of steps.

Why it is like this

Per-step reliability that looks fine reads very differently over a long run. The arithmetic is unforgiving: a step that succeeds nineteen times in twenty fails about once in every two twenty-step runs.

Not to be confused with

A reason to make the model better. The lever is usually fewer steps — a shorter loop, a more capable single tool, or a deterministic pipeline for the part that does not need deciding.

In practice

It is also why agents need a step budget and a stopping condition. An agent without one does not fail; it keeps going, and you find out from the bill.

Source: OWASP Top 10 for Large Language Model Applications, 2025 — LLM10:2025 Unbounded Consumption. Read on .

The OWASP Top 10 for LLM Applications is © the OWASP Foundation and published under a Creative Commons licence; NIST AI 600-1 is a US Government work in the public domain. These cards are independent commentary written in our own words. ytyk.org is not affiliated with or endorsed by the OWASP Foundation or NIST.

Predict Check yourself

A twenty-step agent is unreliable end to end although each step looks solid in isolation. What is the most effective lever?

  1. Reduce the number of steps — compounding means per-step reliability has to be extremely high before a long chain is dependable.
  2. Increase the temperature so it explores more solutions.
  3. Add a retry at each step, which removes the compounding.
  4. Move to a larger model, which eliminates per-step error.
Show the answer

Reduce the number of steps — compounding means per-step reliability has to be extremely high before a long chain is dependable.

Retries help and do not remove compounding; a better model raises per-step reliability but the exponent is still there. Shortening the chain attacks the exponent.