hermes - 💡(How to fix) Fix Feishu message replay replays stale messages on gateway restart [3 pull requests]

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…

After a gateway restart (container reset/upgrade/crash), the Feishu platform replays all queued inbound events without checking timestamps. Old messages from hours ago are treated as new, causing the agent to process outdated commands. In worst case this creates an infinite restart loop (user sends "restart" while gateway was down → gateway comes up → replays "restart" → restarts again).

Root Cause

Additional context

Root cause: gateway/platforms/feishu.py lines 2108-2167 (_on_message_event / _drain_pending_inbound_events). No timestamp filtering in _handle_message_event_data at line 2250. The Feishu SDK provides message.create_time but it's not checked

Fix Action

Fixed

RAW_BUFFERClick to expand / collapse

Description

After a gateway restart (container reset/upgrade/crash), the Feishu platform replays all queued inbound events without checking timestamps. Old messages from hours ago are treated as new, causing the agent to process outdated commands. In worst case this creates an infinite restart loop (user sends "restart" while gateway was down → gateway comes up → replays "restart" → restarts again).

To Reproduce

  1. Run Hermes v0.13.0 with Feishu connected
  2. Send a message like "reboot" or "restart"
  3. Restart the gateway (kill process or restart container)
  4. Gateway comes up and replays the "restart" message → restart loop

Expected behavior

Events sent before the gateway's current startup time should be skipped. Check message.create_time against gateway start time.

Hermes Version

v0.13.0 (2026.5.7)

Platform

Feishu (WebSocket via lark-oapi)

Additional context

Root cause: gateway/platforms/feishu.py lines 2108-2167 (_on_message_event / _drain_pending_inbound_events). No timestamp filtering in _handle_message_event_data at line 2250. The Feishu SDK provides message.create_time but it's not checked

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

Events sent before the gateway's current startup time should be skipped. Check message.create_time against gateway start time.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING