Skip to content

[Bug] Discord channel: agent generates response but never sends it via message tool — reply invisible to users #76996

@sierralx

Description

@sierralx

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 [Bug]: Discord routing / mention-gating issue in OpenClaw #44502 (routing/mention-gating) — the message reaches the agent, the agent processes it, but the response never leaves

Related (but different)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions