openclaw - 💡(How to fix) Fix Feature: Forward reply_to_message context in Telegram inbound metadata [1 participants]

Official PRs (…)
ON THIS PAGE

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…
GitHub stats
openclaw/openclaw#70576Fetched 2026-04-24 05:56:11
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
0
Participants
RAW_BUFFERClick to expand / collapse

Problem

When a user replies to a specific message in a Telegram chat, the OpenClaw agent does not receive the referenced message content. The Telegram Bot API provides reply_to_message in the update payload, but this information is not forwarded to the agent in the inbound metadata.

This means:

  • Agents cannot understand what message the user is replying to
  • Context from referenced messages is lost
  • Users expect agents to understand reply context naturally (as they would in a normal chat)

Proposed Solution

Include reply_to_message content in the inbound metadata JSON that gets passed to the agent session. This could include:

  • The text of the referenced message
  • The message_id of the referenced message
  • Media attachments info from the referenced message
  • Sender info of the referenced message

This data is already available in the Telegram Bot API update payload - it just needs to be forwarded through the OpenClaw gateway to the agent.

Use Case

User sends a reply to an old message saying "what about this?" - the agent should be able to read the referenced message content to understand the context, rather than asking the user to repeat or copy-paste.

Additional Context

OpenClaw version: 2026.4.15 Channel: Telegram direct message Currently the inbound metadata only includes sender info, chat_id, and message_id, but not reply_to_message data.

extent analysis

TL;DR

Include the reply_to_message content in the inbound metadata JSON passed to the agent session to enable context understanding.

Guidance

  • Verify that the Telegram Bot API update payload contains the reply_to_message information for the specific message being replied to.
  • Update the OpenClaw gateway to forward the reply_to_message data from the Telegram Bot API update payload to the agent session in the inbound metadata JSON.
  • Consider including relevant information from the reply_to_message object, such as text, message_id, media attachments, and sender info.
  • Test the updated inbound metadata with a sample reply message to ensure the agent receives the expected context information.

Example

No code snippet is provided as the issue does not contain specific implementation details.

Notes

The solution assumes that the OpenClaw gateway has access to the Telegram Bot API update payload and can modify the inbound metadata JSON. The exact implementation may vary depending on the OpenClaw architecture and version.

Recommendation

Apply workaround: Update the OpenClaw gateway to include reply_to_message content in the inbound metadata JSON, as this will enable agents to understand reply context without requiring a version upgrade.

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

openclaw - 💡(How to fix) Fix Feature: Forward reply_to_message context in Telegram inbound metadata [1 participants]