-
-
Notifications
You must be signed in to change notification settings - Fork 52.6k
Description
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
- Have a conversation with the OpenClaw agent via Feishu DM
- Restart the gateway (
openclaw gateway restart) - 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.