ACPpotamia

Features / Loop detection

Stop runaway AI agent loops in seconds.

An agent that calls the same tool with the same arguments, gets the same error and tries again can run all night. ACPpotamia compares every call with the agent's recent calls and stops the session when it repeats itself too often in a short window.

How it works.

Compares what matters

The last messages, tool calls and tool results are compared, with timestamps, counters and IDs ignored, so a loop is caught even when those change.

Exact and near matches

An exact fingerprint and a similarity score catch both identical retries and near-identical ones.

Per session

Name each task with X-ControlPlane-Session-Id; one stuck task stops without stopping the rest of your agents.

Revive when fixed

A stopped session gets HTTP 429 until you revive it from the console or the API.

Questions.

What counts as a loop?

By default, five matching requests in the same session within 60 seconds. You can change the count, the window and how similar requests must be.

Does it work with the OpenAI Responses API and tool calling?

Yes. Function calls and their outputs are part of the comparison on chat completions, the Responses API and Anthropic messages.

Related features.