openclaw - 💡(How to fix) Fix Telegram bot-to-bot /command@TargetBot is dropped by mention gate in groups [2 pull requests]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

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…

Telegram now supports bot-to-bot communication in groups using /command@TargetBot and replies to bot messages. In OpenClaw, a group message like /ping@TargetBot can still be skipped by the Telegram mention gate as no-mention, so the target bot account does not produce a response even when it is configured for the group/topic and the sender is allowlisted.

This report is intentionally sanitized: no real chat IDs, bot usernames, user IDs, local paths, tokens, screenshots, or private logs are included.

Root Cause

Telegram now supports bot-to-bot communication in groups using /command@TargetBot and replies to bot messages. In OpenClaw, a group message like /ping@TargetBot can still be skipped by the Telegram mention gate as no-mention, so the target bot account does not produce a response even when it is configured for the group/topic and the sender is allowlisted.

This report is intentionally sanitized: no real chat IDs, bot usernames, user IDs, local paths, tokens, screenshots, or private logs are included.

Fix Action

Fixed

Code Example

/ping@BotB

---

telegram-auto-reply reason=no-mention skipping group media before download
gateway/channels/telegram/inbound Inbound message telegram:group:<redacted>:topic:<redacted> -> @BotA (group, 22 chars)
RAW_BUFFERClick to expand / collapse

Summary

Telegram now supports bot-to-bot communication in groups using /command@TargetBot and replies to bot messages. In OpenClaw, a group message like /ping@TargetBot can still be skipped by the Telegram mention gate as no-mention, so the target bot account does not produce a response even when it is configured for the group/topic and the sender is allowlisted.

This report is intentionally sanitized: no real chat IDs, bot usernames, user IDs, local paths, tokens, screenshots, or private logs are included.

Environment

  • OpenClaw CLI/Gateway: 2026.5.18
  • Telegram channel with multiple bot accounts configured
  • Group/supergroup with topics enabled
  • Target bot is a member of the group
  • Target bot account has can_read_all_group_messages: true according to Telegram getMe
  • OpenClaw group/topic allowlist includes the target bot account
  • OpenClaw config uses requireMention: true for the target bot account in that group/topic

Reproduction steps

  1. Configure two Telegram bot accounts in OpenClaw, for example Bot A and Bot B.

  2. Add both bots to the same Telegram group or forum topic.

  3. Configure Bot B for that group/topic with groupPolicy: allowlist, requireMention: true, and the test sender allowlisted.

  4. From a human account in the group/topic, send:

    /ping@BotB
  5. Observe OpenClaw gateway logs and Bot B session activity.

Expected behavior

OpenClaw should treat Telegram bot_command entities of the form /command@TargetBot as an explicit mention/addressing signal for TargetBot, equivalent to an explicit bot mention for ingress-gating purposes. Bot B should pass the mention gate and route to the configured Bot B agent/session.

Actual behavior

The message is skipped by the mention gate as no-mention. No Bot B agent/session response is produced. In the observed run, the message was visible to the OpenClaw Telegram layer, but the target account path did not result in an agent turn.

Representative sanitized log shape:

telegram-auto-reply reason=no-mention skipping group media before download
gateway/channels/telegram/inbound Inbound message telegram:group:<redacted>:topic:<redacted> -> @BotA (group, 22 chars)

Notes

This appears to be a mismatch between Telegram Bot API command entities and OpenClaw mention detection. Telegram represents /command@TargetBot as a bot_command, not necessarily as a separate mention entity. OpenClaw mention gating appears to rely on mention detection and does not currently treat addressed bot commands as a valid explicit mention for the target bot.

Possible fix area: Telegram ingress / mention-gating should parse bot_command text containing @<current bot username> and set wasMentioned or equivalent for the target bot account before applying requireMention.

Privacy

This issue deliberately omits private identifiers and raw logs. I can provide more detail in a sanitized follow-up if needed.

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…

FAQ

Expected behavior

OpenClaw should treat Telegram bot_command entities of the form /command@TargetBot as an explicit mention/addressing signal for TargetBot, equivalent to an explicit bot mention for ingress-gating purposes. Bot B should pass the mention gate and route to the configured Bot B agent/session.

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 Telegram bot-to-bot /command@TargetBot is dropped by mention gate in groups [2 pull requests]