Skip to content

Loop detection in openclaw not working with MCP tools — upstream already fixed (openclaw#34574) #2601

@DungDT94

Description

@DungDT94

Description

Issue here: openclaw/openclaw#34574 (closed)


Environment

  • NemoClaw version: v0.0.9-24-gcd1950 (OpenClaw v2026.3.11)
  • MCP tools connected via mcporter

Problem

Agent calls the same MCP tool (with mcporter mcp_server tool) repeatedly with identical results. loopDetection is enabled but does not detect or stop the loop. The agent keeps going until the context window fills up.

Config has aggressive thresholds and it still doesn't trigger:

{
  "tools": {
    "loopDetection": {
      "enabled": true,
      "historySize": 20,
      "warningThreshold": 1,
      "criticalThreshold": 2,
      "globalCircuitBreakerThreshold": 3,
      "detectors": {
        "genericRepeat": true,
        "knownPollNoProgress": true,
        "pingPong": true
      }
    }
  }
}

Upstream status

This looks like a known upstream issue that's already been fixed on OpenClaw main: openclaw/openclaw#34574 (closed), commit e9bce3f.

Has anyone else hit this?

Curious if others running MCP tools via mcporter have seen the same looping behavior.

For now I'm working around it with prompt-level rules in TOOLS.md/SOUL.md to limit repeated tool calls, but it's not reliable — the model tends to ignore them under pressure. If anyone has a better workaround I'd love to hear it.

Might be worth syncing with the upstream fix or backporting the patch — just a thought.

Reproduction Steps

See description above.

Environment

NemoClaw version: v0.0.9-24-gcd1950 (OpenClaw v2026.3.11)

Debug Output

Logs

Checklist

  • I confirmed this bug is reproducible
  • I searched existing issues and this is not a duplicate

Metadata

Metadata

Assignees

No one assigned

    Labels

    No fields configured for Enhancement.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions