openclaw - 💡(How to fix) Fix Bug: Tool-only turns produce no message delivery to Telegram (continuation of #22834)

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Root Cause

The root cause identified in #22834 remains in the current source:

Code Example

if (payloadArray.length === 0 && hadToolCalls) {
  return finalizeWithFollowup({ text: "Done." }, ...);
}
RAW_BUFFERClick to expand / collapse

Continuation of #22834 — Silent drop when model outputs only tool calls with no final text

This is a continuation of #22834, which was closed without the proposed fix being merged. The bug persists in OpenClaw 2026.5.4.


The Original Bug (Still Present)

When a model turn consists entirely of tool calls (file edits, memory writes, exec commands) with zero visible text in the response, the user sees nothing delivered to Telegram. The operations complete successfully, but no message appears in the chat. The turn is effectively invisible.

Why This Is Still Broken

The root cause identified in #22834 remains in the current source:

  • normalize-reply.ts (lines 49-52): Empty responses are skipped: if (!trimmed && !hasMedia && !hasChannelData) { opts.onSkip?.("empty"); return null; }
  • **agent-runner.ts (lines 1430-1431):** Zero payloads produce no delivery: if (payloadArray.length === 0) { return returnWithQueuedFollowupDrain(undefined); }`

No completion acknowledgment is injected when tools ran successfully but produced no text.

Reproduction

  1. User sends a message via Telegram
  2. Assistant responds with only tool calls (e.g., edit file, memory_add write) and no text content
  3. Tool calls complete successfully
  4. Nothing appears in the Telegram chat — user has no way to know the work happened

Why This Matters for Agent UX

This is particularly corrosive because the user cannot distinguish between:

  1. The agent is still working
  2. The agent's response was lost
  3. The agent ignored the message

In all three cases, the user has to ask again or ping the agent, wasting tokens and trust. The gateway has improved at showing tool use in preview text, but this specific case — a turn with ONLY tool calls and zero assistant-visible text — still produces no delivery at all.

Proposed Fix (Same as #22834)

Inject a completion acknowledgment when tools ran but no text was produced:

if (payloadArray.length === 0 && hadToolCalls) {
  return finalizeWithFollowup({ text: "Done." }, ...);
}

This is minimal, non-breaking, and solves the problem at the source. Alternative approaches could include surfacing a tool-call preview or a configurable fallback message, but the simplest fix is a short acknowledgment that the agent completed its work.

Environment

  • OpenClaw: 2026.5.4
  • Channel: Telegram (direct)
  • Model: ollama/glm-5.1:cloud

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix Bug: Tool-only turns produce no message delivery to Telegram (continuation of #22834)