Skip to content

[Bug]: All channel messages are injected twice into agent context after 2026.4.24 update (duplicate turns, double token cost) #71761

@WhiteGiverMa

Description

@WhiteGiverMa

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

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