openclaw - 💡(How to fix) Fix [Bug] Discord channel: agent generates response but never sends it via message tool — reply invisible to users [3 comments, 3 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#76996Fetched 2026-05-04 04:59:39
View on GitHub
Comments
3
Participants
3
Timeline
5
Reactions
2
Author
Timeline (top)
commented ×3closed ×1subscribed ×1

Code Example

{
  "interaction": {
    "didSendViaMessagingTool": false,
    "messageToolCallsCount": 0,
    "toolCallsCount": 29
  },
  "detectedRoutingSummary": {
    "noResponseTypesHandled": true,
    "noChannelDeclared": false,
    "private": true,
    "someInteractionHandled": true
  }
}
RAW_BUFFERClick to expand / collapse

Bug Description

Regression in Discord channel mode: The agent generates a complete assistant response internally, but the final text never appears in the Discord channel. The user sees only the typing indicator (Agent is typing...) and token usage increasing, but no actual message is delivered.

This appears to be a failure in the agent's message tool invocation: the LLM generates the response text as its final answer (which stays private), but fails to call message(action=send, channel=discord, ...) to actually post it to the channel.

Steps to Reproduce

  1. Configure OpenClaw to work with Discord channels (not DM)
  2. Send any message in a Discord channel where the OpenClaw agent is active
  3. Observe: Agent is typing... appears
  4. Observe: Token usage increases (agent is burning tokens)
  5. Expected: Assistant reply appears in the channel
  6. Actual: No message is ever posted. The typing indicator eventually disappears and the user receives nothing.

Evidence from Session Logs

From ~/.openclaw/logs/sessions/session/...:

{
  "interaction": {
    "didSendViaMessagingTool": false,
    "messageToolCallsCount": 0,
    "toolCallsCount": 29
  },
  "detectedRoutingSummary": {
    "noResponseTypesHandled": true,
    "noChannelDeclared": false,
    "private": true,
    "someInteractionHandled": true
  }
}

Key finding: didSendViaMessagingTool: false despite the agent generating a full response. The response exists in the .jsonl session file as "type": "assistant" entries, but they were never transmitted to Discord.

The system prompt correctly instructs:

"To post visible output here, use the message tool with action=send"

But the agent does not comply. It outputs the response as its final answer text instead of routing it through the messaging tool.

Environment

  • OS: macOS (server)
  • OpenClaw version: 2026.5.2 (upgraded on May 4 → regression started)
  • Previous working version: 2026.4.30 (worked fine before upgrade)
  • Platform: Discord (channels, not DM)
  • Model: synthetic/hf:moonshotai/Kimi-K2.6 (also reproduced with MiniMax M2.5)
  • Config: channels.discord configured with guild + channel routing

Regression Note

This worked perfectly before upgrading to 2026.5.2. The regression started immediately after the upgrade (May 4).

Additional Context

  • DM mode with the same agent works fine
  • openclaw.json does not contain any setting that controls message visibility auto-flush vs explicit tool use
  • The message tool is present in availableTools and the system prompt instructs its use
  • This is not the same as #44502 (routing/mention-gating) — the message reaches the agent, the agent processes it, but the response never leaves

Related (but different)

  • #44502 — Discord routing/mention-gating (deals with whether message reaches agent at all)
  • #76955 — Message handlers block indefinitely (closed today)
  • #76888 — Queued/orphaned user-message merge (stale reply, not missing reply)
  • #76740 — message_tool mode replies disappear from transcript (closed today)
  • #76703 — Response delivered to Discord but not persisted (opposite problem)

extent analysis

TL;DR

The agent's failure to call message(action=send, channel=discord, ...) after generating a response is likely the cause of the issue, and modifying the agent to use the messaging tool correctly may resolve the problem.

Guidance

  • Review the agent's code to ensure it is correctly using the message tool to send responses to Discord channels, as indicated by the system prompt.
  • Verify that the message tool is properly configured and available in the availableTools list.
  • Check the agent's logic for handling responses to ensure it is not mistakenly treating Discord channel responses as private or DM responses.
  • Investigate the changes made in the upgrade to version 2026.5.2 to see if any modifications to the messaging tool or agent behavior could be causing the regression.

Example

No code snippet is provided as the issue does not include specific code details, but the agent's code should be reviewed to ensure it includes a call to message(action=send, channel=discord, ...) when generating a response for a Discord channel.

Notes

The issue seems to be specific to Discord channels and not DMs, and the problem started after upgrading to version 2026.5.2, suggesting a regression introduced in the upgrade.

Recommendation

Apply a workaround by modifying the agent to correctly use the message tool for sending responses to Discord channels, as this is likely to resolve the issue and allow responses to be delivered correctly.

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