4.5 — The emergency brake (stopping rules)
🟢 In plain words — an agent acting in a loop can get stuck on the same failed action and repeat it endlessly. An “emergency brake” is a limit that stops it by force before the bill explodes.
The big danger of autonomous loops: the infinite loop. Your agent tries to connect with a wrong password → it retries 1,000 times overnight… and drains your API budget. (This is OWASP risk LLM10 — “Unbounded Consumption”.) The countermeasures:
- The iteration cap (Iteration Cap) — a maximum number of steps. “If you haven’t succeeded after 10 tries, stop and call a human.”
- No-progress detection — if the agent gets the same error 3 times, it should understand it’s stuck and stop.
- A capped budget — a token (the text units the AI bills for) / time / cost limit per mission, beyond which the agent cuts off automatically.
💸 Real no-code case: in n8n, each execution is billed; a loop that spins out of control means a bill that climbs and a useless agent. An iteration cap isn’t a luxury, it’s a budget protection.
✅ In short
- The infinite loop (LLM10) can drain your API budget in one night.
- Three brakes: iteration cap, no-progress detection, capped budget.
- In no-code (n8n billed per execution), a cap is a budget protection, not a luxury.
📝 My note
A training byBaxIA