Repository navigation
Closed
Closed
Copy link
Labels
P2Medium — degraded but workaround existsMedium — degraded but workaround existscomp/gatewayGateway runner, session dispatch, deliveryGateway runner, session dispatch, deliverycomp/toolsTool registry, model_tools, toolsetsTool registry, model_tools, toolsetsplatform/telegramTelegram bot adapterTelegram bot adaptertype/bugSomething isn't workingSomething isn't working
Description
Bug Description
Telegram rich-message delivery was still running pipe tables through the shared formatter, which rewrote them into bullet groups before final send.
That means:
- rich Telegram replies could lose native table rendering
- the standalone
send_messageproxy path could also flatten tables unless the formatter was explicitly told not to rewrite them
Steps to Reproduce
- Enable Telegram rich messages in the gateway.
- Send a message containing a Markdown table (
|/---). - Observe the gateway logs and the final Telegram message.
Expected Behavior
Rich Telegram sends should preserve raw table markdown so Bot API rich rendering can display it natively.
Standalone send_message should preserve MarkdownV2 escaping, but must not flatten pipe tables into bullets.
Actual Behavior
The shared formatter rewrites pipe tables into bullet groups before delivery.
Relevant log signatures:
Markdown table detected; rewriting to bullet groups (rows=N caller=format_message:...)
Markdown table rewrite completed
Affected Component
- Gateway (Telegram)
- Tools (
send_messageproxy path)
Messaging Platform
- Telegram
Debug Report
hermes debug share --local --lines 80
Relevant excerpt:
version: 0.16.0 (2026.6.5) [fca84fe2]
os: Linux 6.12.86+deb13-amd64 x86_64
python: 3.11.15
profile: default
hermes_home: ~/.hermes
model: gpt-5.4-mini
provider: openai-codex
terminal: local
features:
gateway: running (systemd (user), pid 1225772)
platforms: telegram, whatsapp
Proposed Fix
- Make
TelegramAdapter.format_message()accept an explicitrewrite_tablesflag. - Default it to legacy behavior only when rich messages are disabled.
- Call it with
rewrite_tables=Falsefor rich Telegram sends. - Call it with
rewrite_tables=Falseintools/send_message_tool.py. - Keep table rewriting only on the legacy MarkdownV2 path.
- Add regression tests for both rich gateway sends and standalone
send_message.
Notes
I also reproduced the failure mode in the gateway logs while checking the issue:
sendRichMessage attempt ... has_table=TruesendRichMessage success ...- and the table rewrite log should not appear on the rich path
If the rewrite log appears on a rich-enabled send, the wrong code path is still active.
Metadata
Metadata
Assignees
Labels
P2Medium — degraded but workaround existsMedium — degraded but workaround existscomp/gatewayGateway runner, session dispatch, deliveryGateway runner, session dispatch, deliverycomp/toolsTool registry, model_tools, toolsetsTool registry, model_tools, toolsetsplatform/telegramTelegram bot adapterTelegram bot adaptertype/bugSomething isn't workingSomething isn't working
Activity
abner-augusto commentedon Jun 13, 2026
Adding a fuller debug-share snapshot here for the issue thread.
Command:
Relevant excerpt:
The full local command also captured the gateway logs around the rich-message path and the earlier permission failure when I tried to create the issue with labels. The issue itself is already open, so this is just the debug-share context for maintainers.
liuhao1024 commentedon Jun 13, 2026
This is fixed by #45327 — fix(telegram): preserve pipe tables on rich-message and standalone send paths.
abner-augusto commentedon Jun 22, 2026
Already fixed upstream by #45327 (preserve pipe tables on rich-message and standalone send paths). Closing.