openclaw - 💡(How to fix) Fix [Bug]: All channel messages are injected twice into agent context after 2026.4.24 update (duplicate turns, double token cost) [4 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#71761Fetched 2026-04-26 05:08:43
View on GitHub
Comments
4
Participants
3
Timeline
8
Reactions
1
Timeline (top)
commented ×4cross-referenced ×2closed ×1marked_as_duplicate ×1

Fix Action

Fix / Workaround

This may be related to session replay or message dispatch being called twice.

Code Example

OpenClaw 2026.4.24 (cbcfdf6)

---

04:03  User: 狂三小姐?
04:03  Agent: (reply 1)
04:03  User: 狂三小姐?    ← DUPLICATE
04:03  Agent: (reply 2)DUPLICATE REPLY

---

04:26  User: 唔姆……好像有消息重复bug呢
04:27  Agent: (reply 1)
04:27  User: 唔姆……好像有消息重复bug呢    ← DUPLICATE
04:27  Agent: (reply 2)

---

04:18  User: napcat和openclaw napcat qq插件状态如何
04:19  Agent: (reply 1)
04:19  User: napcat和openclaw napcat qq插件状态如何    ← DUPLICATE (NapCat)
04:19  Agent: (reply 2)
RAW_BUFFERClick to expand / collapse

Describe the bug

After updating from 2026.4.23 to 2026.4.24, every inbound message — from WebChat (Control UI) and NapCat (QQ plugin) — is injected twice into the agent transcript, causing the agent to reply twice and consuming 2× tokens per turn.

This is not a NapCat-specific issue. WebChat direct messages are also duplicated.

Version

OpenClaw 2026.4.24 (cbcfdf6)

Updated via pnpm from 2026.4.23.

Steps to reproduce

  1. Run OpenClaw 2026.4.24 (after upgrading from 2026.4.23)
  2. Gateway was restarted after the update
  3. Send any message via WebChat (Control UI) or NapCat QQ
  4. Observe the raw transcript

Actual behavior

Every user message appears twice in the session transcript, with the agent replying to each duplicate independently:

04:03  User: 狂三小姐?
04:03  Agent: (reply 1)
04:03  User: 狂三小姐?    ← DUPLICATE
04:03  Agent: (reply 2)   ← DUPLICATE REPLY

Multiple examples from the raw transcript:

04:26  User: 唔姆……好像有消息重复bug呢
04:27  Agent: (reply 1)
04:27  User: 唔姆……好像有消息重复bug呢    ← DUPLICATE
04:27  Agent: (reply 2)
04:18  User: napcat和openclaw napcat qq插件状态如何
04:19  Agent: (reply 1)
04:19  User: napcat和openclaw napcat qq插件状态如何    ← DUPLICATE (NapCat)
04:19  Agent: (reply 2)

Expected behavior

Each user message should be injected into the agent context exactly once per turn.

Impact

  • 2× token cost for every conversation turn
  • 2× reply messages sent back to users (spam)
  • Affects all channels: WebChat (Control UI) and NapCat (QQ plugin) confirmed; likely affects other channels too
  • The bug survived a gateway restart after the upgrade

Suspected cause

The changelog for 2026.4.24 mentions changes to restart continuation and session delivery queue:

Gateway/restart continuation: durably hand restart continuations to a session-delivery queue before deleting the restart sentinel, recover queued continuation work after crashy restarts, and fall back to a session-only wake when no channel route survives reboot.

This may be related to session replay or message dispatch being called twice.

Environment

  • OS: Linux (WSL2) · node 24.14.0
  • Channel: WebChat Control UI, NapCat QQ plugin
  • Updates: pnpm · npm latest 2026.4.24
  • Gateway: systemd installed, enabled, running

extent analysis

TL;DR

Downgrade to version 2026.4.23 to avoid duplicated messages until the issue is resolved in a future version.

Guidance

  • Review the changelog for 2026.4.24 to understand the changes made to restart continuation and session delivery queue, which may be causing the issue.
  • Verify that the duplication occurs consistently across different channels, such as WebChat and NapCat QQ plugin.
  • Test if the issue persists after restarting the gateway multiple times to rule out any transient issues.
  • Consider reaching out to the OpenClaw development team for further assistance, as this issue may require a patch or a new version release.

Notes

The provided information suggests that the issue is related to changes in the 2026.4.24 version, but without access to the code or more detailed logs, it's difficult to provide a more specific fix.

Recommendation

Apply workaround: Downgrade to 2026.4.23 to avoid the duplicated message issue until a fixed version is released. This is because the issue seems to be introduced in the 2026.4.24 version, and downgrading to a previous version may provide a temporary solution.

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 user message should be injected into the agent context exactly once per turn.

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]: All channel messages are injected twice into agent context after 2026.4.24 update (duplicate turns, double token cost) [4 comments, 3 participants]