Skip to content

feat(telegram): Surface incoming message reactions as session events for lightweight RLHF #15077

Description

@mmartoccia

Summary

Telegram Bot API 9.3+ supports MessageReactionUpdated events, allowing bots to receive emoji reactions on messages. OpenClaw's Telegram plugin currently supports sending reactions (reactions: true in channel capabilities) but does not receive or surface incoming reaction events to agent sessions.

Motivation

Emoji reactions are the lowest-friction feedback mechanism available. Users already react to messages naturally -- surfacing these as session events enables Reinforcement from Human Learning (REHL):

  • 👍 = positive signal (good response, do more of this)
  • 👎 = negative signal (adjust approach)
  • ❤️ = high value (worth remembering)
  • 😂 = humor landed
  • 🔥 = exceptional output
  • 🤔 = needs deeper thinking

This creates an implicit preference signal without requiring users to type explicit feedback. Over time, agents can learn communication style preferences, identify which response patterns are valued, and flag negative reactions as self-improvement triggers.

No other agent framework currently uses emoji reactions as an RLHF signal -- this would be a differentiator.

Technical Details

Telegram Bot API requirements:

  • Add "message_reaction" to allowed_updates in webhook registration or getUpdates polling
  • Handle MessageReactionUpdated objects containing: chat, message_id, date, old_reaction, new_reaction, user

Current state in OpenClaw:

  • extensions/telegram/src/channel.ts line 96: reactions: true (send-only capability)
  • No handler for incoming message_reaction update type

Proposed implementation:

  1. Add "message_reaction" to allowed_updates array in webhook/polling setup
  2. Create handler for MessageReactionUpdated events
  3. Surface to agent session as a system event, e.g.: [reaction] User reacted 👍 to message_id:4267
  4. Optionally include the original message text/summary for context

Event format suggestion:

{
  "type": "reaction",
  "channel": "telegram",
  "messageId": "4267",
  "userId": "5727573728",
  "oldReaction": [],
  "newReaction": ["👍"],
  "timestamp": "2026-02-12T19:01:00Z"
}

Configuration -- could be gated behind a channel config flag:

{
  "channels": {
    "telegram": {
      "receiveReactions": true
    }
  }
}

Prior Art

Impact

Low implementation effort (webhook config + event handler), high user value. Enables an entirely new feedback loop between humans and agents without any UX changes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions