Skip to content

[Feishu] Duplicate message delivery after gateway restart #31541

@Li-Qingyun

Description

@Li-Qingyun

Bug Report

Reported via: OpenClaw (automated issue via agent)

Summary

When the OpenClaw gateway is restarted, the Feishu channel re-delivers the most recently unacknowledged message, causing it to be processed again by the agent. The deduplication logic does not consistently prevent this.

Steps to Reproduce

  1. Have a conversation with the OpenClaw agent via Feishu DM
  2. Restart the gateway (openclaw gateway restart)
  3. Observe that the last message from the previous session is re-delivered and processed again

Expected Behavior

After gateway restart, previously processed messages should be reliably deduplicated and not re-processed.

Actual Behavior

The last message is re-delivered by Feishu (at-least-once delivery) and processed again as if it were a new message. This was observed multiple times in the same session today.

Log Evidence

Gateway log shows deduplication sometimes works:

feishu: skipping duplicate message om_x100b55666a33c428c3b3791789633b8

But in other restart cycles, the same message was processed again without being skipped.

Environment

  • OpenClaw version: 2026.2.26
  • Channel: Feishu (DM)
  • OS: macOS (Darwin 24.6.0 arm64)
  • Node: v25.6.1
  • Gateway mode: local (LaunchAgent)

Additional Context

Feishu uses an at-least-once delivery model for webhooks/long-polling. On gateway reconnect, Feishu re-pushes recent unacknowledged messages. The deduplication window or message ID tracking may not persist across gateway restarts, causing the duplicate processing.

A fix could involve persisting the set of recently processed message IDs to disk (or a short-lived cache) so they survive gateway restarts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions