openclaw - 💡(How to fix) Fix [Bug] Telegram messages delivered multiple times (duplicate message_id injection) [1 participants]

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…
GitHub stats
openclaw/openclaw#72702Fetched 2026-04-28 06:33:17
View on GitHub
Comments
0
Participants
1
Timeline
1
Reactions
0
Participants
Timeline (top)
cross-referenced ×1

Telegram messages are being delivered to agent sessions multiple times (2-4x) with identical content and message_id. This wastes context window tokens and confuses models about which message to respond to.

Root Cause

Telegram messages are being delivered to agent sessions multiple times (2-4x) with identical content and message_id. This wastes context window tokens and confuses models about which message to respond to.

RAW_BUFFERClick to expand / collapse

Summary

Telegram messages are being delivered to agent sessions multiple times (2-4x) with identical content and message_id. This wastes context window tokens and confuses models about which message to respond to.

Observed Behavior

  • Main/Shodan: 19 duplicated user messages in recent session (9 pairs of identical background task updates)
  • Cylena: msg_id 6259 delivered 4×; other messages 3× each
  • Duplicates appear in session .jsonl files with identical timestamps and content

Impact

  • Context window consumed by redundant content
  • Models may respond to stale duplicates instead of latest message
  • Amplifies existing prompt bloat issues

Steps to Reproduce

  1. Send a message to any agent via Telegram
  2. Check the session .jsonl log
  3. Observe the same message_id appearing multiple times

Environment

  • OpenClaw 2026.4.23
  • Channel: Telegram
  • Multiple agents affected (main, cybera, cylena)

Expected Behavior

Each Telegram message should be injected into the session exactly once, deduplicated by message_id.

extent analysis

TL;DR

Implementing message deduplication based on message_id in the Telegram message processing pipeline is likely to fix the issue of duplicate messages being delivered to agent sessions.

Guidance

  • Investigate the Telegram message processing pipeline to identify where duplicates are being introduced, focusing on the handling of message_id.
  • Verify that the message_id is correctly being passed and logged in the session .jsonl files to ensure consistency.
  • Consider implementing a cache or set to keep track of recently processed message_ids to filter out duplicates before injecting messages into the session.
  • Review the OpenClaw 2026.4.23 documentation to see if there are any built-in mechanisms for handling message deduplication that can be leveraged.

Example

No specific code example can be provided without more details on the implementation, but a simple deduplication mechanism might involve checking a set of recently seen message_ids before processing a new message.

Notes

The solution may require modifications to the existing message processing pipeline and could potentially involve updating the OpenClaw version if a fix is available in a later release. However, without more specific information about the pipeline's implementation, it's difficult to provide a precise fix.

Recommendation

Apply a workaround by implementing message deduplication based on message_id in the Telegram message processing pipeline, as this directly addresses the observed issue of duplicate messages being delivered to agent sessions.

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…

Still need to ship something?

×6

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

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix [Bug] Telegram messages delivered multiple times (duplicate message_id injection) [1 participants]