Home→Glossary→Tool-Call Loop

Tool-Call Loop

Tool-Call Loop

An agent repeating the same failing action without making progress

✓ Concepts & Behavior
Talk to AY Automate ↗
Failure modeRepetition without progressNeeds a different approach, not another attempt

What is a Tool-Call Loop

A tool-call loop is a stuck pattern where an agent repeats the same failing tool call, or oscillates between two actions, without making real progress toward the goal and without recognizing on its own that it is stuck. A command fails, the agent tries the identical command again, it fails the same way, and the cycle continues.

It usually starts from a wrong assumption the agent never questions: the wrong file path, a misunderstood error message, a fix that addresses a symptom rather than the actual cause. Since the assumption itself does not change between attempts, neither does the outcome, no matter how many times the same call gets retried.

Breaking out of one rarely means trying harder at the same thing, it means stepping back and questioning the assumption behind the repeated action: reading the actual error more carefully, checking whether the target even exists, trying a genuinely different approach instead of a slight variation of the same failing one. A human or a hook that notices the repetition and interrupts it usually saves far more time than letting the loop run its course.

The loop, and what actually breaks it

Retrying the same call again keeps the cycle going. The exit is a step outside the loop: questioning the assumption behind the failing call.

AY Automate

Build your own agent skills, not just prompts.

We design, build, and ship the Claude Code skill libraries production teams actually run on.

Talk to AY Automate ↗

Key properties

✓The same call, or a small oscillation between two calls, repeats
✓The agent does not recognize on its own that it isn't progressing
✓Usually needs a different approach, not simply another retry