hermes - 💡(How to fix) Fix Telegram edit-overflow continuations should preserve topic metadata [1 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…

Fix Action

Fixed

Code Example

Overflow split: first-chunk edit failed: Flood control exceeded ...
Progress edits disabled due to flood control
RAW_BUFFERClick to expand / collapse

Bug Description

Telegram edit-overflow continuations can lose the originating topic/thread routing metadata.

When an edited Telegram message grows past the 4096 UTF-16 code-unit limit, TelegramAdapter.edit_message() falls into _edit_overflow_split(): it edits the original message with chunk 1 and sends the remaining chunks as fresh continuation messages. Those continuation sends currently call bot.send_message() directly with reply_to_message_id, but without the original message_thread_id / metadata routing hints.

In forum/topic chats this can make the continuation bubble appear in the main chat/general lane instead of the topic where the original agent/tool message was being edited.

Steps to Reproduce

  1. Use Telegram gateway inside a forum topic/thread.
  2. Produce a streamed/progress/edit-based message that exceeds Telegram's single-message limit.
  3. Let the adapter split the oversized edit into continuation messages.

Expected Behavior

Continuation messages created by the edit-overflow split stay in the same Telegram topic/thread as the original message.

Actual Behavior

The continuation messages are sent without topic metadata, so Telegram may place them outside the originating topic.

Notes

Related but distinct from #26207 / #26242, which roll over tool-progress bubbles before hitting the message limit. Even with rollover, the adapter-level overflow fallback should be topic-safe for streamed responses and defensive fallback paths.

Live gateway logs showed the adapter overflow path being hit:

Overflow split: first-chunk edit failed: Flood control exceeded ...
Progress edits disabled due to flood control

Environment

  • Platform: Telegram gateway
  • Component: gateway/platforms/telegram.py, gateway/run.py, gateway/stream_consumer.py

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