OpenClaw TTS Infinite Loop — 275 Messages in 10 Minutes

Published April 17, 2026 · Bug #67744 · Affects: 2026.3.13+ · Channel: Telegram (and others)

Here's a scenario you don't want to discover in production: a Telegram user messages your bot "I want to chat to you on voice." Your agent has TTS enabled in the config but no TTS provider is actually set up. Within 10 minutes, the agent has sent 275 identical messages. By the time context overflow hits, it auto-compacts — and then continues the loop.

This is a real incident documented in issue #67744. It's not a model problem — it's three stacked bugs in OpenClaw's TTS plugin that compound each other.

The Three Stacked Bugs

Bug 1 — TTS Plugin Reports Success on Hard Failure

When no TTS provider is configured, the plugin returns an error message in the content text — but critically sets isError: false in the tool result. The framework defaults to false when not explicitly set:

{
  "role": "toolResult",
  "toolName": "tts",
  "isError": false,   // ← should be true
  "content": [{
    "type": "text",
    "text": "TTS conversion failed: no provider registered; openai: not configured..."
  }],
  "details": {
    "error": "TTS conversion failed: ..."  // error IS here, but isError stays false
  }
}

Because isError is false, the model sees a "successful" tool call with error text in the response body. It doesn't recognize this as a terminal failure. It tries again.

Bug 2 — Turn Doesn't Terminate When a Tool Call Is Pending

Every one of the 275 looping messages contains both a <final> text block AND a tts tool call in the same assistant message. OpenClaw doesn't terminate the turn when a pending tool call is present alongside a final marker — so control never returns to the user, it just re-runs the tool.

Bug 3 — No Retry Backoff or Loop Detection

Even if bugs 1 and 2 were present, a sensible retry/backoff mechanism would catch the pattern: same tool, same arguments, same error, N times in a row. There's no such detection — the loop runs until context overflow.

Who's Affected

You're at risk if:

The bug was confirmed on 2026.3.13 with google/gemini-2.5-flash, but the three underlying issues are architectural and likely present across versions.

Immediate Fixes

Option 1: Actually Configure a TTS Provider (Recommended)

The cleanest fix — give the TTS plugin something to work with:

# OpenAI TTS (requires API key)
openclaw configure
# Select: tts → openai
# Enter your OpenAI API key

openclaw gateway restart

OpenAI TTS via the API costs ~$0.015/1K characters. For a typical voice message, that's a fraction of a cent.

Option 2: Disable the TTS Plugin Entirely

If you don't need voice, disable it so the tool isn't available at all:

# In your openclaw.json config:
{
  "plugins": {
    "disabled": ["speech-core"]
  }
}

Then restart: openclaw gateway restart

With the tool disabled, the model can't call it — no loop possible.

Option 3: Add a SOUL.md Instruction as a Temporary Guard

Not a real fix, but a quick mitigation while you configure properly:

# In your SOUL.md or system prompt:
"If a user asks for voice or TTS and it is not working, tell them voice is not available
and do NOT retry the tts tool more than once."

This works because the model does read tool-result error text — it just needs explicit instruction not to retry.

If You're Already in the Loop

If your bot is currently looping:

  1. Stop the gateway immediately: openclaw gateway stop
  2. Implement one of the fixes above
  3. Clear the session before restarting — the compacted context may still have the looping pattern. Use /new or delete the session file for the affected user.
  4. Restart: openclaw gateway start

Track the Fix

The upstream fix requires: (1) isError: true when details.error is set, (2) turn termination logic when a final marker is present alongside a tool call, and (3) loop detection for repeated identical tool calls. Track at issue #67744.

Bottom Line

If TTS is enabled but not configured, a single voice request can spin your bot into a 275-message loop in 10 minutes. Either configure a TTS provider or disable the plugin. Don't leave it in the half-configured state.

If you need help configuring TTS, disabling plugins, or auditing your SOUL.md for loop-prevention instructions, ClawReady covers all of this in our setup service.

← Back to blog