Skip to content

[Bug]: Discord bot sends duplicate replies to the same message #37844

@lht0747

Description

@lht0747

Bug type

Regression (worked before, now fails)

Summary

Discord bot sends duplicate replies to the same message (same message_id triggers two responses)

Steps to reproduce

  1. Configure Discord as a messaging channel
  2. Send a message to the bot (direct message or group)
  3. Observe that the bot sends two replies instead of one

Expected behavior

The bot should send exactly one reply to each incoming message.

Actual behavior

The bot sends two replies to the same message. Both replies have the same message_id. The second reply is often more detailed than the first, suggesting the first attempt may have timed out or been truncated.

OpenClaw version

2026.3.2

Operating system

macOS 25.3.0 (arm64) - Apple M2

Install method

npm global

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

Logs

Duplicate Tool Execution

2026-03-06T12:38:47.345Z error [tools] exec failed: ...
2026-03-06T12:38:47.349Z error [tools] exec failed: ...  (4ms later)

Slow Listener

Slow listener detected: duration 74.2 seconds
Slow listener detected: duration 81.1 seconds
Slow listener detected: duration 147.7 seconds

Root Cause

  1. Tools are executed twice within 2-4ms intervals
  2. Message processing takes 40-147 seconds (should be <5s)
  3. Session queue bottleneck with 100+ active sessions

Suggested Fixes

  1. Fix duplicate tool execution
  2. Optimize Discord message listener
  3. Add deduplication for replies

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingregressionBehavior that previously worked and now fails

    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