Repository navigation
Description
Summary
Telegram /status slash command can fail to deliver its final reply when Telegram rich messages are enabled. The Gateway appears to execute the slash command, but the final Telegram send goes through sendRichMessage and Telegram rejects it with RICH_MESSAGE_EMAIL_INVALID.
This leaves the user with no /status response in Telegram.
Environment
- OpenClaw:
2026.6.10(aa69b12) - npm latest checked at report time:
2026.6.10 - OS: Linux x64
- Node:
22.22.2 - Channel: Telegram direct chat
- Config:
channels.telegram.richMessages = true
Reproduction
-
Configure Telegram channel with rich messages enabled:
channels.telegram.richMessages = true -
In Telegram, send:
/status -
Observe that Telegram receives no status reply.
Actual behavior
The slash command is handled, but final reply delivery fails in the Telegram rich-message path:
[telegram] sendRichMessage failed: Call to 'sendRichMessage' failed! (400: Bad Request: RICH_MESSAGE_EMAIL_INVALID)
[telegram] slash final reply failed: GrammyError: Call to 'sendRichMessage' failed! (400: Bad Request: RICH_MESSAGE_EMAIL_INVALID)
This reproduced multiple times in the same session when /status was sent.
Expected behavior
/status should return a status reply in Telegram.
If the rich-message payload is rejected by Telegram, the slash-command final reply should either:
- sanitize/fix the invalid rich email entity before sending, or
- fall back to a plain text Telegram message instead of dropping the reply.
Notes
I searched open and closed issues for RICH_MESSAGE_EMAIL_INVALID and did not find an exact existing report.
Related but not identical issues include:
- Telegram /status slash command does not respond while Discord /status works #95525 - Telegram
/statusslash command does not respond while Discord/statusworks - Telegram rich messages: /status card collapses into one run-on line (newlines lost) on 2026.6.9 #95538 - Telegram rich messages:
/statuscard collapses into one run-on line - Telegram rich final reply fails with RICH_MESSAGE_URL_INVALID for local Markdown link hrefs #94117 - Telegram rich final reply fails with another rich-message validation error (
RICH_MESSAGE_URL_INVALID)
This report is specifically for RICH_MESSAGE_EMAIL_INVALID on /status final reply delivery when richMessages=true.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
clawsweeper commentedon Jun 24, 2026
Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed June 24, 2026, 6:10 AM ET / 10:10 UTC.
Summary
Keep open: current main and the latest release still lack a Telegram rich-message email/entity guard or rich-send fallback for this
/statusfailure, while #95900 is an open proof-positive candidate fix for the same behavior and should be reviewed or landed before closing this issue.Reproducibility: yes. at source level and from reporter logs:
/statusstatus text can include OAuth profile/email labels, current rich delivery sends them throughsendRichMessage, and non-quote rich-send failures propagate without a plain fallback. I did not run an independent live Telegram reproduction in this read-only pass.Root-cause cluster
Relationship:
canonicalCanonical: #96363
Summary: This issue is the canonical open report for the Telegram
/statusrich-messageRICH_MESSAGE_EMAIL_INVALIDdrop; one open PR is a direct candidate fix, while nearby Telegram rich-message issues cover sibling URL, newline, and quote behaviors.Members:
fixed_by_candidate: fix(telegram): keep OAuth emails out of rich entity detection #95900 - The open PR directly targets OAuth/email-like rich-message text, adds shared rich-message builder logic, and has positive ClawSweeper/Mantis proof but is not merged.partial_overlap: Telegram rich final reply fails with RICH_MESSAGE_URL_INVALID for local Markdown link hrefs #94117 - That closed issue covers a sibling rich-message validation failure for unsupported URL hrefs, not the current email-entity rejection.partial_overlap: Telegram rich messages: /status card collapses into one run-on line (newlines lost) on 2026.6.9 #95538 - That open issue covers/statusrich-message newline collapse, a different rendering symptom in the same Telegram rich path.partial_overlap: [Bug]: Telegram rich-message delivery prevents selected-text Quote/Quote & Reply #95835 - That open issue covers selected-text quote behavior caused by using sendRichMessage, not this/statusemail-entity send rejection.partial_overlap: fix(telegram): fall back to sendMessage when rich content has no esse… #95990 - That open PR targets quote-preserving content-aware fallback for another issue and may incidentally avoid some rich sends, but it is not the exact email-entity candidate.Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.
Next step
Do not queue a new repair while the exact open candidate PR is available; maintainers should review, land, or reject that PR first.
Review details
Best possible solution:
Land #95900 or an equivalent central Telegram rich-message email guard with focused tests and live Telegram proof, then close this issue after the fix reaches main.
Do we have a high-confidence way to reproduce the issue?
Yes, at source level and from reporter logs:
/statusstatus text can include OAuth profile/email labels, current rich delivery sends them throughsendRichMessage, and non-quote rich-send failures propagate without a plain fallback. I did not run an independent live Telegram reproduction in this read-only pass.Is this the best way to solve the issue?
Yes: the best narrow fix is a shared Telegram rich-message builder guard for email-like tokens, as in the open candidate PR, because durable sends, drafts, and reply delivery all pass through that boundary. A broader plain-text fallback can be considered separately but is not required to keep this exact invalid email entity from dropping
/status.AGENTS.md: found and applied where relevant.
Remaining risk / open question:
/statusfailure was not independently reproduced in this read-only review; confidence comes from the issue logs, current source path, and the proof-positive open candidate PR.Codex review notes: model internal, reasoning high; reviewed against 8242923fe393.
Label changes
Label changes:
P1: A current-release Telegram direct-chat/statuscommand can complete internally but drop the final user-visible reply when rich messages are enabled.impact:message-loss: The reported failure loses the final Telegram slash-command response after Telegram rejects the rich payload.issue-rating: 🦞 diamond lobster: Current issue advisory state selects this label.clawsweeper:source-repro: Current issue advisory state selects this label.Label justifications:
P1: A current-release Telegram direct-chat/statuscommand can complete internally but drop the final user-visible reply when rich messages are enabled.impact:message-loss: The reported failure loses the final Telegram slash-command response after Telegram rejects the rich payload.Evidence reviewed
What I checked:
sendRichMessagerejection withRICH_MESSAGE_EMAIL_INVALIDon OpenClaw v2026.6.10 and no Telegram/statusresponse.richMessagesenabled,sendTelegramTextbuilds one rich payload and callssendRichMessage; only native quote errors are retried, soRICH_MESSAGE_EMAIL_INVALIDpropagates instead of falling back tosendMessage. (extensions/telegram/src/bot/delivery.send.ts:124, 8242923fe393)buildTelegramRichHtmlemitsskip_entity_detectiononly when the caller explicitly setsskipEntityDetection, so email-like status text can still be entity-detected by Telegram in rich payloads. (extensions/telegram/src/rich-message.ts:170, 8242923fe393)buildStatusTextpassesselectedModelAuthandactiveModelAuthinto status rendering, andresolveModelAuthLabelformats OAuth auth asoauth (<label>); auth profile config explicitly allows an email shown in status/profile surfaces. (src/status/status-text.ts:646, 8242923fe393)buildTelegramRichMarkdownpassing options through andbuildTelegramRichHtmlchecking onlyoptions.skipEntityDetection === true; it does not contain the email-token skip from the open candidate PR. (extensions/telegram/src/rich-message.ts:162, aa69b12d0086)extensions/telegram/src/rich-message.ts, setsskip_entity_detectionfor rich sends/drafts/replies, includes focused tests, and has a ClawSweeper/Mantis proof-positive review trail, but it is still open and not a main/release implementation. (extensions/telegram/src/rich-message.ts:96, 86cf722a57f1)Likely related people:
extensions/telegram/src/format.ts,extensions/telegram/src/rich-message.ts,extensions/telegram/src/bot/delivery.send.ts)extensions/telegram/src/rich-message.ts,extensions/telegram/src/send.test.ts,extensions/telegram/src/draft-stream.test.ts)extensions/telegram/src/rich-message.ts,extensions/telegram/src/send.ts)extensions/telegram/src/send.ts,extensions/telegram/src/rich-message.ts,extensions/telegram/src/bot-message-dispatch.ts)RICH_MESSAGE_URL_INVALIDlocal-href failure, which is the nearest shipped sibling to this email-entity report. (role: adjacent validation-error fix author; confidence: medium; commits: 0922ee9955ae; files:extensions/telegram/src/format.ts,extensions/telegram/src/send.test.ts)How this review workflow works
@clawsweeper re-reviewcomments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.@clawsweeper re-reviewor@clawsweeper re-runon an open PR or issue to request a fresh review only.@clawsweeper reviewto request a fresh review only.@clawsweeper autofix,@clawsweeper automerge,@clawsweeper fix ci, or@clawsweeper address review.@clawsweeper explainto ask for more context, or@clawsweeper stopto stop active automation.aaajiao commentedon Jun 24, 2026
Confirming an independent reproduction on stable 2026.6.10 (
aa69b12) — identical failure:Environment (differs from the original report, so it's not arch/Node-specific):
channels.telegram.richMessages = trueThis matches the root cause in #95900 (
fix(telegram): keep OAuth emails out of rich entity detection): the runtime text carries the OAuth profile label (openai:<email>), Markdown linkification turns it into an invalidmailto:openai:<email>rich entity, and Telegram rejects the whole rich payload. The OAuth-subscription setup makes this reliably reproducible, since effectively every reply carries that label.Inbound + agent execution are unaffected — only the rich send fails, so from the user's side the bot goes silent (message-loss). Setting
channels.telegram.richMessages = falserestores delivery immediately.+1 for landing #95900.
obviyus commentedon Jun 25, 2026
Thanks for the clear report and the extra repro confirmation. This is fixed on
mainby #95900 / 2aa9d67, which keeps OAuth email-like labels out of Telegram rich entity detection so/statusreplies are delivered normally.Closing as fixed on
main; users on2026.6.10will pick this up with the next release.fix(telegram): fall back to plain text when rich message entity valid…
fix(telegram): fall back to plain text when rich message entity valid…
fix(telegram): fall back to plain text when rich message entity valid…
fix(telegram): fall back to plain text when rich message entity valid…
fix(telegram): fall back to plain text when rich message entity valid…