hermes - 💡(How to fix) Fix Telegram streaming flood control can leave partial message and send duplicate final response [1 comments, 2 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
NousResearch/hermes-agent#16668Fetched 2026-04-28 06:51:48
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Timeline (top)
labeled ×4commented ×1

When Telegram streaming/editing hits Telegram flood control, Hermes can leave an incomplete streamed/edited message visible and then send a second full final response. The user sees two messages: a partial draft followed by the complete answer.

Error Message

In a Telegram group session with long responses, gateway logs showed repeated flood-control warnings around message send/edit operations, e.g.:

Root Cause

This is disruptive in Telegram because the partial message looks like a broken answer and the full answer appears as a duplicate.

Fix Action

Fix / Workaround

Local mitigation that worked

Code Example

Telegram flood control
Telegram flood control on send
retrying in xx seconds

---

display:
  platforms:
    telegram:
      streaming: false
RAW_BUFFERClick to expand / collapse

Summary

When Telegram streaming/editing hits Telegram flood control, Hermes can leave an incomplete streamed/edited message visible and then send a second full final response. The user sees two messages: a partial draft followed by the complete answer.

Observed behavior

In a Telegram group session with long responses, gateway logs showed repeated flood-control warnings around message send/edit operations, e.g.:

Telegram flood control
Telegram flood control on send
retrying in xx seconds

User-visible result:

  1. First Telegram message: incomplete streamed/edit preview, often ending mid-template or mid-paragraph.
  2. Second Telegram message: complete final response duplicated as a new message.

This is disruptive in Telegram because the partial message looks like a broken answer and the full answer appears as a duplicate.

Expected behavior

Hermes should not emit both an incomplete streamed message and a separate complete final message for the same assistant turn.

Possible acceptable outcomes:

  • Preferably keep editing the streamed message until it becomes the final response.
  • Or, if edit/send fails under flood control, mark/suppress the partial and send exactly one final message.
  • Or disable/auto-fallback streaming for Telegram when flood-control is detected.

Local mitigation that worked

We disabled Telegram-specific streaming locally:

display:
  platforms:
    telegram:
      streaming: false

After gateway restart this should make Telegram wait for the complete response and send once, avoiding the partial-plus-final duplicate path.

Suggested fix direction

The Telegram gateway streaming/finalization logic likely needs a stronger final-send suppression/idempotency guard:

  • Track whether a streamed message already exists for the turn.
  • If a partial streamed message exists, finalization should prefer editing that message rather than sending a fresh final message.
  • If editing fails or is delayed due to flood control, avoid immediately sending a duplicate final unless the partial is deleted/explicitly superseded.
  • Add tests for Telegram flood-control/retry behavior around streaming edit + final response.

Environment notes

  • Platform: Telegram gateway
  • Trigger: long responses plus Telegram flood-control during streaming/edit operations
  • Impact: duplicate visible assistant replies and one incomplete reply

extent analysis

TL;DR

Disable Telegram-specific streaming or implement a stronger final-send suppression/idempotency guard to prevent duplicate messages.

Guidance

  • Review the Telegram gateway streaming/finalization logic to ensure it tracks existing streamed messages and prefers editing over sending fresh final messages.
  • Implement a mechanism to suppress or delete partial streamed messages when a final message is sent, especially under flood control conditions.
  • Consider adding tests for Telegram flood-control/retry behavior around streaming edit + final response to ensure the fix works as expected.
  • As a temporary workaround, disable Telegram-specific streaming by setting display.platforms.telegram.streaming to false in the configuration.

Example

display:
  platforms:
  telegram:
    streaming: false

This configuration change can be used as a local mitigation until a more robust fix is implemented.

Notes

The suggested fix direction requires modifications to the Telegram gateway streaming/finalization logic, which may involve significant changes to the codebase. Additionally, the fix should be thoroughly tested to ensure it works correctly under various flood control scenarios.

Recommendation

Apply workaround: Disable Telegram-specific streaming until a more robust fix is implemented, as it provides a simple and effective solution to prevent duplicate messages.

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

Hermes should not emit both an incomplete streamed message and a separate complete final message for the same assistant turn.

Possible acceptable outcomes:

  • Preferably keep editing the streamed message until it becomes the final response.
  • Or, if edit/send fails under flood control, mark/suppress the partial and send exactly one final message.
  • Or disable/auto-fallback streaming for Telegram when flood-control is detected.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING

hermes - 💡(How to fix) Fix Telegram streaming flood control can leave partial message and send duplicate final response [1 comments, 2 participants]