openclaw - 💡(How to fix) Fix [Bug] Agent completes task but sends no reply to user (dispatch complete with queuedFinal=false, replies=0) [1 participants]

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…
GitHub stats
openclaw/openclaw#60607Fetched 2026-04-08 02:49:15
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
0
Author
Participants

Error Message

  1. User receives nothing — no reply, no error, no timeout message const runPromise = params.run(mergedAbortSignal).catch((error) => { if (!timedOut) throw error; // If timedOut is true, error is silently swallowed! return; // error not propagated
  2. After LLM timeout with exhausted fallbacks, emit a lifecycle error event that triggers a user-visible notification

Root Cause

In agent-runner.runtime-*.js, when replyPayloads.length === 0 (or payloadArray.length === 0), the function returns void 0 without sending any reply:

// Line ~2018 and ~2044 in agent-runner.runtime
if (replyPayloads.length === 0) return void 0;

Additionally, the timeouts-DQnDmNg_.js file swallows errors after timeout:

const runPromise = params.run(mergedAbortSignal).catch((error) => {
  if (!timedOut) throw error;
  // If timedOut is true, error is silently swallowed!
  params.onAbortAfterTimeout?.();
  return; // error not propagated
});

Fix Action

Fix / Workaround

When an agent completes a task but produces no replyable content (e.g., model returns empty response, or NO_REPLY token, or all renderable payloads are empty), the OpenClaw gateway logs dispatch complete (queuedFinal=false, replies=0) and the user receives no notification at all. This wastes the user's time as they wait for a response that will never come.

  1. Send a task to OpenClaw via any channel (Feishu/Telegram/etc.)

  2. Have the agent produce an empty response or trigger a condition that results in replyPayloads.length === 0

  3. Observe: dispatch complete (queuedFinal=false, replies=0) in gateway logs

  4. User receives nothing — no reply, no error, no timeout message

  5. When replyPayloads.length === 0, always send a fallback message to the user (e.g., "任务已完成,但未产生可回复内容" or similar)

  6. After LLM timeout with exhausted fallbacks, emit a lifecycle error event that triggers a user-visible notification

  7. Add a configuration option dispatch.requireReply: true to enforce this behavior

Code Example

// Line ~2018 and ~2044 in agent-runner.runtime
if (replyPayloads.length === 0) return void 0;

---

const runPromise = params.run(mergedAbortSignal).catch((error) => {
  if (!timedOut) throw error;
  // If timedOut is true, error is silently swallowed!
  params.onAbortAfterTimeout?.();
  return; // error not propagated
});
RAW_BUFFERClick to expand / collapse

Bug Description

When an agent completes a task but produces no replyable content (e.g., model returns empty response, or NO_REPLY token, or all renderable payloads are empty), the OpenClaw gateway logs dispatch complete (queuedFinal=false, replies=0) and the user receives no notification at all. This wastes the user's time as they wait for a response that will never come.

Steps to Reproduce

  1. Send a task to OpenClaw via any channel (Feishu/Telegram/etc.)
  2. Have the agent produce an empty response or trigger a condition that results in replyPayloads.length === 0
  3. Observe: dispatch complete (queuedFinal=false, replies=0) in gateway logs
  4. User receives nothing — no reply, no error, no timeout message

Expected Behavior

The user should always receive either:

  • The actual response content
  • Or an explicit message saying "I couldn't produce a response" / "Task failed" / "Task timed out"

Root Cause Analysis

In agent-runner.runtime-*.js, when replyPayloads.length === 0 (or payloadArray.length === 0), the function returns void 0 without sending any reply:

// Line ~2018 and ~2044 in agent-runner.runtime
if (replyPayloads.length === 0) return void 0;

Additionally, the timeouts-DQnDmNg_.js file swallows errors after timeout:

const runPromise = params.run(mergedAbortSignal).catch((error) => {
  if (!timedOut) throw error;
  // If timedOut is true, error is silently swallowed!
  params.onAbortAfterTimeout?.();
  return; // error not propagated
});

Impact

  • User experience: Users wait indefinitely for a reply that never comes
  • Transparency: No distinction between "task running" vs "task silently failed"
  • Trust: Repeated occurrences cause users to distrust the agent

Suggested Fix

  1. When replyPayloads.length === 0, always send a fallback message to the user (e.g., "任务已完成,但未产生可回复内容" or similar)
  2. After LLM timeout with exhausted fallbacks, emit a lifecycle error event that triggers a user-visible notification
  3. Add a configuration option dispatch.requireReply: true to enforce this behavior

Environment

  • OpenClaw version: 2026.4.2
  • Channel: Feishu (websocket mode)
  • Model: minimax/MiniMax-M2.7-highspeed with zai-2 fallbacks

extent analysis

TL;DR

Modify the agent-runner.runtime-*.js to send a fallback message when replyPayloads.length === 0 to ensure users receive a notification.

Guidance

  • Review the agent-runner.runtime-*.js file and update the logic to send a fallback message when replyPayloads.length === 0, such as "任务已完成,但未产生可回复内容".
  • Consider adding a configuration option dispatch.requireReply: true to enforce this behavior and ensure users always receive a notification.
  • Investigate the timeouts-DQnDmNg_.js file to determine why errors are being swallowed after timeout and modify the code to propagate the error or emit a lifecycle error event.
  • Test the changes with different scenarios, including empty responses and timeouts, to ensure users receive the expected notifications.

Example

// Example of sending a fallback message when replyPayloads.length === 0
if (replyPayloads.length === 0) {
  const fallbackMessage = "任务已完成,但未产生可回复内容";
  // Send the fallback message to the user
  return sendReply(fallbackMessage);
}

Notes

The suggested fix assumes that the sendReply function is available and can be used to send a message to the user. Additionally, the dispatch.requireReply: true configuration option may need to be implemented and tested to ensure it works as expected.

Recommendation

Apply the workaround by modifying the agent-runner.runtime-*.js file to send a fallback message when replyPayloads.length === 0, as this will provide a better user experience and ensure users receive notifications even when the agent produces no replyable content.

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