Repaso
Español
LLMs, RAG & agentsIntermediateLLM-26

An agent keeps calling the same tool with the same arguments in a loop. Which control do you add first?

Options

  1. A higher temperature
  2. Removing all tools
  3. A larger context window
  4. A limit on steps and budget, detection of repeated calls, and clear error messages returned to the model (Correct option)

Answer

A limit on steps and budget, detection of repeated calls, and clear error messages returned to the model

Why

Agents run a loop: think, call a tool, read the result, repeat. Without a stop condition, a confused agent can loop until it burns your budget.

Hard limits (maximum steps, tokens, time and cost) stop the damage, and noticing repeated identical calls lets you break the loop or escalate to a person.

Clear tool errors also help, because a vague error leaves the model guessing.

Remember

Every agent loop needs hard limits.

Key terms

Practice this question in Repaso