OpenClaw operations guide

OpenClaw keeps repeating tool calls: diagnose a stuck run

Short answer. Find the tool calls keeping an OpenClaw run busy and test loop detection against both a failing task and a working one. Use this when one run keeps calling tools but makes no progress toward its requested output. Test changes on a scratch agent or in an isolated profile with no external write tools.

Last updated · Published

By CWYN · Reviewed November 17, 2026 · Check command help for your installed version before changing a running system

Use this when one run keeps calling tools but makes no progress toward its requested output. Test changes on a scratch agent or in an isolated profile with no external write tools.

1. Capture the active run and stop repeated work

Record the agent, session, run if shown, and last useful result. Stop the active turn from its client or use the supported /stop command where available. If an automation launched it, pause the trigger while you investigate and check for separately started background work before retrying. Retain the transcript and keep it private.

2. Compare the tool outcomes within that run

Review a sequence of calls in order and compare the tool name, arguments and actual result. Look for identical errors, unchanged results or alternating calls that add no information. Track what was still missing at the end. Legitimate polling may repeat while a job is making progress, so use the underlying job status to distinguish waiting from a loop.

3. Check the guard your installed version provides

In the v2026.11.5 reference, the rolling-history detectors are off by default. The identical-error guard operates independently and the post-compaction guard has its own activation conditions. On that version, enable the rolling detectors with tools.loopDetection.enabled or the documented override for only the test agent. Check the docs for your installed tag before applying this setting because defaults and diagnostics can differ by release.

4. Run a bounded failure case and a healthy control

Use the same small synthetic task and tool permissions for both trials. For the failure case, use a read-only fixture that reproduces the pattern you observed. For example, if a successful status check kept returning the same stale state, use a fixture whose status never changes. For the control, use a fixture that reaches the expected state and verify the output. Set a time limit for both runs and stop manually if needed. Record which detector logged a warning or block, the final outcome, and any reported model usage. An identical-error block verifies only that narrow guard.

5. Repair the repeated failure before restoring automation

Fix the dependency or permissions problem that made the original result repeat, or give the task a clear exit when that dependency is unavailable. Replay once with side effects disabled and verify completion or a bounded error. Compare elapsed time, usage and useful output with the earlier run. Review supported controls in the public loop-detection reference before broadening the change to other agents.

Get your free CWYN Score to choose your next setup improvement.

Next steps

Trace the cost of repeated calls

Use the spend-audit checklist in the OpenClaw Token Bill Kit ($24.95), an optional paid kit, to compare the work your run completed with the model usage on the bill.
Kit details as of Nov 22, 2026