openclaw - 💡(How to fix) Fix Discord plugin posts each agent message twice in v2026.4.22 (regression from v2026.4.12) [1 comments, 2 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#71406Fetched 2026-04-26 05:13:12
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Timeline (top)
cross-referenced ×2closed ×1commented ×1

After updating from 2026.4.12 to 2026.4.22, every message the main agent posts to a Discord thread appears twice in the channel, with timestamps 4–20 seconds apart. The gateway log shows only one send event, but Discord's API returns two separate messages with near-identical content from the same bot user.

Root Cause

After updating from 2026.4.12 to 2026.4.22, every message the main agent posts to a Discord thread appears twice in the channel, with timestamps 4–20 seconds apart. The gateway log shows only one send event, but Discord's API returns two separate messages with near-identical content from the same bot user.

Fix Action

Workaround

None yet. Downgrading to 2026.4.12 is not viable (brings back a different issue: ERR_MODULE_NOT_FOUND: subagent-registry.runtime.js on subagent cleanup). Intermediate versions 2026.4.20/.21 not tested.

Happy to attach more logs or test a patch.

Code Example

17:09:42 NACHARBEITIgnaz v6.1 QA: 7/9 bestanden …
17:09:38 NACHARBEITIgnaz v6.1 QA: 7/9 bestanden    (identical text)
17:07:12 v6.1 Legal-Hardening live auf …
17:07:12 v6.1 Legal-Hardening live auf                (same second)
17:06:52 v6.1 Legal-Hardening live auf …
17:06:52 v6.1 Legal-Hardening live auf                (same second)

---

Apr 24 17:09:41 node[989672]: 2026-04-24T17:09:41.868+00:00 NACHARBEITIgnaz v6.1 QA: 7/9 bestanden …
RAW_BUFFERClick to expand / collapse

Summary

After updating from 2026.4.12 to 2026.4.22, every message the main agent posts to a Discord thread appears twice in the channel, with timestamps 4–20 seconds apart. The gateway log shows only one send event, but Discord's API returns two separate messages with near-identical content from the same bot user.

Environment

  • OpenClaw 2026.4.22 (commit 00bd2cf)
  • Node.js on Ubuntu 24.04 (Hetzner VPS)
  • Discord plugin enabled, agent model openrouter/anthropic/claude-opus-4-6
  • Heartbeat every 30m, isolatedSession: true, target discord
  • Gateway ready, no plugin-load errors from core (acpx plugin failure is unrelated — tracked separately)

Reproduction

  1. Agent (main) posts a structured response in a Discord thread (e.g. QA verdict, status update)
  2. Discord receives two separate messages with the same content but different message IDs
  3. Gateway journal shows a single post-event line for the same content

Example timestamps from /channels/{threadId}/messages:

17:09:42 NACHARBEIT — Ignaz v6.1 QA: 7/9 bestanden …
17:09:38 NACHARBEIT — Ignaz v6.1 QA: 7/9 bestanden …   (identical text)
17:07:12 v6.1 Legal-Hardening live auf …
17:07:12 v6.1 Legal-Hardening live auf …               (same second)
17:06:52 v6.1 Legal-Hardening live auf …
17:06:52 v6.1 Legal-Hardening live auf …               (same second)

Gateway journal for the 17:09 event:

Apr 24 17:09:41 node[989672]: 2026-04-24T17:09:41.868+00:00 NACHARBEIT — Ignaz v6.1 QA: 7/9 bestanden …

(single line, but two messages reach Discord)

Expected behavior

Each agent response should produce exactly one Discord message.

Actual behavior

Each agent response produces two messages, either within the same second or a few seconds apart.

Observations that may help narrow this down

  • Was not present on 2026.4.12
  • Both duplicate messages come from the same bot user account, so this is not a multi-bot / webhook race
  • The gateway log only shows one write event → the second send appears to happen without logging, suggesting a streaming/finalize pattern where both an intermediate and a final post are being sent
  • Works consistently for both short replies and long multi-line messages (i.e. not dependent on chunking)

Workaround

None yet. Downgrading to 2026.4.12 is not viable (brings back a different issue: ERR_MODULE_NOT_FOUND: subagent-registry.runtime.js on subagent cleanup). Intermediate versions 2026.4.20/.21 not tested.

Happy to attach more logs or test a patch.

extent analysis

TL;DR

The issue can be addressed by investigating and potentially modifying the message sending logic in the Discord plugin to prevent duplicate messages.

Guidance

  • Review the Discord plugin code to identify any changes between 2026.4.12 and 2026.4.22 that could be causing the duplicate messages.
  • Investigate the "streaming/finalize pattern" mentioned in the observations to see if both an intermediate and a final post are being sent, resulting in duplicate messages.
  • Check the gateway log configuration to ensure that all write events are being logged, which could help identify why the second send event is not being logged.
  • Consider testing intermediate versions 2026.4.20 and 2026.4.21 to see if the issue is present in those versions as well.

Example

No code snippet is provided as the issue does not include specific code that can be modified to fix the problem.

Notes

The issue seems to be specific to the Discord plugin and the change from 2026.4.12 to 2026.4.22. Downgrading to 2026.4.12 is not a viable solution due to another issue that it introduces.

Recommendation

Apply a workaround by modifying the Discord plugin to prevent duplicate messages, as downgrading to 2026.4.12 is not a viable solution due to the introduction of another issue.

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

Each agent response should produce exactly one Discord message.

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 Discord plugin posts each agent message twice in v2026.4.22 (regression from v2026.4.12) [1 comments, 2 participants]