Skip to content

Telegram integration doesn't pass reply_to_message context to Hermes Agent #8

@perejaslav

Description

@perejaslav

When a user replies to a previous Hermes Agent message in Telegram, the agent doesn't receive information about which message is being quoted/replied to. This breaks conversational continuity and makes it impossible to maintain context across messages.

Steps to Reproduce:

  1. Hermes Agent sends a message to a Telegram user
  2. User long-presses that message and selects "Reply"
  3. User types their response and sends it
  4. Hermes Agent receives the new message but has no access to the original message being replied to

Expected Behavior:

Hermes Agent should receive:

  • reply_to_message_id - ID of the message being replied to
  • quoted_message_text - Full text of the quoted message

This allows the agent to understand the context of the conversation.

Actual Behavior:

The agent only receives:

  • The new user message text
  • Standard Telegram message fields (user_id, timestamp, etc.)

No information about which previous message is being referenced.

Impact:

  • Users must manually copy-paste context or describe what they're referring to
  • Multi-turn conversations become frustrating
  • The agent cannot provide coherent follow-up responses

Suggested Solution:

Update the Telegram gateway/integration to pass reply_to_message information through to the Hermes Agent context system. This could be implemented as:

  1. Add reply_to_message_id field to message metadata
  2. Optionally include the quoted message text (retrieved from message history)
  3. Store this in the conversation context so subsequent messages reference it

Environment:

  • Hermes Agent version: latest
  • Telegram integration via gateway
  • Platform: Telegram Desktop

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions