openclaw - 💡(How to fix) Fix [Bug]: Discord final reply can include stale recovered tool-failure warning after successful turn

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…

On OpenClaw 2026.5.27, a Discord channel turn can complete successfully and deliver the intended final assistant reply, while still appending a stale tool-failure warning from an earlier command that the agent recovered from.

Error Message

tool.result: shell/tool command exits non-zero for a recoverable invocation error

Root Cause

On OpenClaw 2026.5.27, a Discord channel turn can complete successfully and deliver the intended final assistant reply, while still appending a stale tool-failure warning from an earlier command that the agent recovered from.

Code Example

some_cli lookup --unsupported-flag
   # exits non-zero

---

some_cli lookup
   # exits 0

---

⚠️ 🛠️ `some_cli lookup --unsupported-flag (agent)` failed

---

tool.result: shell/tool command exits non-zero for a recoverable invocation error
tool.result: retry or alternate command exits 0
tool.result: later task commands exit 0
model.completed: final assistant text is a success response
session.ended: success
Discord final response: includes both the success answer and stale tool-failed warning
RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

On OpenClaw 2026.5.27, a Discord channel turn can complete successfully and deliver the intended final assistant reply, while still appending a stale tool-failure warning from an earlier command that the agent recovered from.

Steps to reproduce

  1. Start OpenClaw 2026.5.27 with Discord enabled.
  2. Use a Discord guild/channel conversation with normal final replies enabled, for example messages.groupChat.visibleReplies = "automatic".
  3. Ask the agent to perform a task that uses tools.
  4. During the turn, have one early shell/tool command fail for a recoverable reason, such as an unsupported flag or missing optional helper:
    some_cli lookup --unsupported-flag
    # exits non-zero
  5. Have the agent retry or take an alternate path successfully:
    some_cli lookup
    # exits 0
  6. Have later commands complete successfully and have the model produce a successful final answer.

Expected behavior

A recovered, non-terminal tool failure should not be appended to the user-visible Discord final response when the turn succeeds and a successful final assistant reply exists.

Actual behavior

Discord receives the successful final answer, but the message also includes a stale warning similar to:

⚠️ 🛠️ `some_cli lookup --unsupported-flag (agent)` failed

The warning refers to a non-terminal, recovered tool failure, not the final outcome of the turn.

OpenClaw version

2026.5.27

Operating system

NOT_ENOUGH_INFO

Install method

NOT_ENOUGH_INFO

Model

NOT_ENOUGH_INFO

Provider / routing chain

Discord channel -> OpenClaw agent runtime -> tool-using agent turn

Additional provider/model setup details

NOT_ENOUGH_INFO

Logs, screenshots, and evidence

Sanitized observed shape:

tool.result: shell/tool command exits non-zero for a recoverable invocation error
tool.result: retry or alternate command exits 0
tool.result: later task commands exit 0
model.completed: final assistant text is a success response
session.ended: success
Discord final response: includes both the success answer and stale tool-failed warning

Impact and severity

Affected: Discord users running tool-using agent turns.

Severity: Moderate. A successful operation can appear failed in the same Discord response.

Frequency: NOT_ENOUGH_INFO

Consequence: Users may not know whether the requested work succeeded or failed, especially when the stale warning references a command/tool call that was later recovered.

Additional information

Related to #39406, but this issue describes the current Discord behavior on 2026.5.27: a successful final response can still include a recovered stale tool-failure warning.

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…

FAQ

Expected behavior

A recovered, non-terminal tool failure should not be appended to the user-visible Discord final response when the turn succeeds and a successful final assistant reply exists.

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]: Discord final reply can include stale recovered tool-failure warning after successful turn