Interactive Simulator

OpenClaw Tool Loop Detector

Simulate agent tool call sequences and watch the no-progress loop detector in action. Configure thresholds, compare detection strategies, and export a ready-to-use YAML config. Based on OpenClaw PR #80668 that upgraded generic repeat detection from warning to critical abort.

Why Use the Tool Loop Detector

Understand and configure loop detection before deploying — based on the critical abort upgrade shipped in OpenClaw PR #80668 on May 11, 2026.

Live Loop Simulation

Build a sequence of tool calls and run the simulation step by step. Watch the detector track identical no-progress outcomes and escalate from warning to critical abort.

Configurable Thresholds

Set the criticalThreshold that controls when warnings become blocking. PR #80668 defaults to 20 identical no-progress outcomes before aborting.

Detector Comparison

Understand the three detector types: generic repeat (new critical path), poll detector, and ping-pong detector. See which fires for your tool call pattern.

No-Progress vs Retry Detection

Same tool + same args + identical results = no-progress abort. Same tool + same args + changing results = warning only. See the difference in real time.

Preset Scenarios

Load common loop patterns — stuck file-read, repeated search, failing API calls, legitimate polling — and see how each triggers (or avoids) the detector.

One-Click YAML Export

Copy the generated loop detection config and paste it into your OpenClaw config.yaml. Includes threshold annotations and detector toggles.

Simulate Tool Call Loops

Build a tool call sequence, configure detection settings, run the simulation, and see exactly when the detector fires.

Frequently Asked Questions

What is a no-progress tool loop in OpenClaw?

A no-progress tool loop occurs when an agent calls the same tool with the same arguments and gets identical results repeatedly. This means the agent is stuck — each retry produces no new information, wasting tokens and compute. PR #80668 upgraded the generic repeat detector to hard-abort these loops instead of just warning.

How does the criticalThreshold work?

The criticalThreshold defines how many consecutive identical no-progress outcomes the detector tolerates before escalating from warning to critical abort. The default is 20. Setting it lower catches loops faster but risks false positives on legitimate retry patterns. Setting it higher is more tolerant but wastes more tokens on genuine loops.

What is the difference between the generic repeat, poll, and ping-pong detectors?

The generic repeat detector catches any tool called repeatedly with identical args and results. The poll detector handles intentional polling patterns (e.g., checking job status) with configurable intervals. The ping-pong detector catches two tools alternating endlessly. PR #80668 only changed the generic repeat detector to add critical abort — poll and ping-pong already had critical paths.

Will this break legitimate retry patterns?

No. The key distinction is identical vs changing outcomes. If you retry a tool call and get different results each time (e.g., a flaky API eventually succeeding), the detector stays at warning level. Only truly stuck loops — same args, same results, every time — trigger the critical abort.

How does this interact with the global circuit breaker?

The global circuit breaker is a fallback safety mechanism that caps total tool calls regardless of detection. Before PR #80668, no-progress generic loops would waste resources until hitting this global limit. Now the specific detector catches them earlier at criticalThreshold, saving tokens and compute while the circuit breaker remains as a backstop.

Where do I paste the generated YAML?

Copy the generated YAML and paste it into your OpenClaw config.yaml under the tools.loopDetection key. If you are using DeployClaw, paste it into the Config Editor in the dashboard — it will be validated and applied on the next agent restart.