-
-
Notifications
You must be signed in to change notification settings - Fork 56.2k
Closed
Description
Feishu WebSocket Message Replay After Service Restart
Summary
After restarting the OpenClaw gateway service, Feishu WebSocket connection replays previously processed messages, causing duplicate responses to users.
Environment
- OpenClaw Version: 2026.2.2-3
- Channel: Feishu (WebSocket mode)
- Model: deepseek/deepseek-chat (custom provider)
- OS: OpenCloudOS (Linux)
Steps to Reproduce
- User sends a message to OpenClaw via Feishu at 16:19
- OpenClaw processes and responds to the message successfully
- Restart OpenClaw service at 16:19:57 (
systemctl --user restart openclaw-gateway.service) - OpenClaw reconnects to Feishu WebSocket at 16:20:08
- At 16:25:01, the same message from 16:19 is replayed and processed again
Expected Behavior
Messages that have been successfully processed should not be replayed after service restart or WebSocket reconnection.
Actual Behavior
The Feishu provider replays the message approximately 5 minutes after reconnection, causing:
- Duplicate agent responses
- Confusion for users who didn't send a second message
- Wasted API calls and processing
Log Evidence
First message (16:19:42):
2026-02-05T08:19:42.975Z [feishu] received message from ou_xxx in oc_xxx (p2p)
2026-02-05T08:19:42.977Z [feishu] dispatching to agent (session=agent:main:main)
2026-02-05T08:19:51.155Z [feishu] deliver called: text=Understood. I will only reply to messages you send directly to me...
2026-02-05T08:19:51.806Z [feishu] dispatch complete (queuedFinal=true, replies=1)
Service restart (16:19:57):
2026-02-05T08:19:57.572Z [gateway] signal SIGTERM received
2026-02-05T08:19:57.573Z [gateway] received SIGTERM; shutting down
2026-02-05T08:19:57.593Z [feishu] abort signal received, stopping WebSocket client
Reconnection (16:20:08):
2026-02-05T08:20:08.186Z [feishu] starting WebSocket connection...
2026-02-05T08:20:08.191Z [feishu] WebSocket client started
2026-02-05T08:20:09.098Z [info]: [ '[ws]', 'ws client ready' ]
Message replay (16:25:01 - same message, different response):
2026-02-05T08:25:01.733Z [feishu] received message from ou_xxx in oc_xxx (p2p)
2026-02-05T08:25:01.743Z [feishu] dispatching to agent (session=agent:main:main)
2026-02-05T08:25:13.934Z [feishu] deliver called: text=Got it. I will only respond to messages you send me directly.
2026-02-05T08:25:14.575Z [feishu] dispatch complete (queuedFinal=true, replies=1)
Note: Same user ID and chat ID, but slightly different response text proves the message is being reprocessed by the LLM.
Impact
- Severity: Medium
- Frequency: Every service restart/reconnection
- User Experience: Confusing duplicate responses
- Cost: Wasted API calls to LLM providers
Configuration
Feishu channel is configured in WebSocket mode with standard settings (no custom event handling).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels