Skip to content

Telegram: double messages (tool output + response body) for single user message #43835

@Jduio

Description

@Jduio

Description

User on Telegram sees two messages from Hermes for one of their messages — a terminal/output code block followed by the actual text response. This looks like "repeating" or "double responses" to the user.

Environment

  • Hermes Agent v0.16.0 (d1383a6)
  • Platform: Telegram (polling mode)
  • Model: DeepSeek v4 Pro
  • OS: Linux 6.8.0-48-generic
  • Python: 3.11.15

What we've tried (did NOT fix it)

  1. Tuned compression: threshold 0.5→0.7, target_ratio 0.2→0.3, protect_last_n 20→30
  2. Disabled MemOS memory plugin
  3. Gateway logs show each inbound message is processed exactly once (no transport-level duplication)

Observable behavior

  • Gateway log shows: "inbound message" once per user message ✓
  • Gateway log shows: "Suppressing normal final send... content_delivered=True" once per response ✓
  • But user receives TWO Telegram messages: a code block (terminal command output) + a text response

Display config (Telegram defaults)

  • tool_progress: "off" (correct)
  • interim_assistant_messages: True
  • long_running_notifications: True

Hypothesis

The terminal command output block might be delivered through the interim_assistant_messages path — like a tool-execution notification that surfaces before the final response. Even with tool_progress: off, the agent's tool output might be routed as an interim message.

Question

Is there a way to completely suppress tool output from being sent as separate Telegram messages? The user wants ONE response per message.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Medium — degraded but workaround existscomp/gatewayGateway runner, session dispatch, deliveryplatform/telegramTelegram bot adaptertype/bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions