AI Security

AI Agent Loop Detector

Paste an agent trace of tool calls and find exact repeats, cycles, oscillation between two states and stalled progress, with the step at which a stopping rule should have fired.

Last reviewed by the Radiatus Cloud team

Results appear here.

Securing AI in production?

We build guardrails, governance & compliance for AI systems.

Talk to an AI advisor

Agents fail by repeating, not by stopping

The characteristic failure of an autonomous agent is not that it gives up but that it does the same thing again. It calls a search that returns nothing, reasons about the empty result, and calls the same search with a trivially different query. Each individual step looks reasonable in isolation, which is why the loop survives code review and why it is usually discovered from a cost alert rather than from the logs. Detection is straightforward once you look at the sequence rather than at the steps.

Exact repeats are the easy case

The same tool called with the same arguments twice cannot produce new information unless the world changed in between, and for a read operation inside one agent run it almost never has. Blocking an exact repeat is a cheap and safe intervention: return the cached first result and tell the model it has already tried this. The harder cases are near-repeats, where the arguments differ trivially, and cycles, where the agent alternates between two or three states indefinitely, each transition looking like progress.

A step limit is a backstop, not a stopping rule

Capping an agent at twenty steps stops the bleeding and produces a truncated answer with no explanation. A stopping rule that detects the loop can do better: report that the agent is not making progress, return what it has, and say why it stopped. The difference matters because a truncation looks like a bug to the user while an explained halt looks like a limit, and the second is far easier to act on.

Related tools

Frequently Asked Questions

What counts as a loop?

An exact repeat of a tool call with the same arguments, a cycle where the agent returns to a state it has already visited, or oscillation between two states. All three mean the run is no longer producing new information.

Why do near-repeats matter?

Because an agent rewording a failing query is not making progress. The reword looks like a new action but explores the same space, and it is what turns a two-step failure into a fifty-step one.

Is a step limit enough?

It stops the cost but produces a truncated answer with no explanation, which looks like a bug. Detecting the loop lets the agent report that it is not progressing and return what it has, which is far easier to act on.

What should happen on an exact repeat?

Return the cached first result and tell the model it has already tried this call. That is cheap, safe for read operations, and usually enough to break the pattern.

Does this send my trace anywhere?

No. The analysis runs in your browser, which matters because agent traces routinely contain customer data in the tool arguments.

Privacy & Security

Everything runs in your browser; nothing is uploaded.

Data: None
Client-side-Side
Active
v1.0

How to Use

Paste your agent trace, one tool call per line, to find loops.

Disclaimer: This tool is provided "as is" without warranty of any kind. Results are for educational and utility purposes.