Skip to content
Guides

OpenClaw Telegram message behaviour

Deterministic routing, the durable polling queue, the 2026.8.1 status-draft default, the four streaming modes, native and custom commands, reply tags, ack reactions, chunk limits and CLI targets

7 min read

Most of what a Telegram user notices about an OpenClaw bot, the edited preview that grows while it thinks, the command menu, the small reaction that says it is working, is decided by a handful of keys on the channel block. Here is the runtime model behind them, the preview change that surprised people in 2026.8.1, and the limits and targets that shape delivery. Changes to the reply mode, the streaming settings and the chunk limit apply to the next assembled turn without reconnecting Telegram, account overrides included, while active turns keep what they captured.

Runtime model

  • Telegram handling runs inside the gateway process, inbound messages normalise into the shared channel envelope with reply metadata, media placeholders and the persisted reply-chain context for replies the gateway has observed, group sessions are isolated by group ID, and forum topics append a topic suffix carrying the thread ID.
  • When the bot joins an allowed group or supergroup it posts one introduction grounded in the room metadata it can see, the title, the description and the pinned message; the Bot API cannot read messages from before the bot joined, so introductions never claim to use prior history, they never run in private chats, and a join-intro key disables them at the channel or per account.
  • DMs can carry a thread ID that is preserved for replies, but DM topic sessions split only when the bot's getMe reports topics enabled, which BotFather's threaded mode controls; otherwise DMs stay on the flat session, and the old DM thread-replies keys were removed, with the doctor fix cleaning them out of an upgraded config.
  • Long polling runs in an isolated worker, updates are saved to a durable queue and processed in order per chat and topic, multi-account startup bounds concurrent getMe probes so a large bot fleet does not fan out every probe at once, each gateway process guards polling so only one active poller uses a token at a time, persistent 409 conflicts on getUpdates point to another gateway, script or external poller on the same token, the watchdog restarts after 120 seconds without completed polling liveness, and the Bot API has no read receipts.
Routing is deterministic: Telegram inbound replies back to Telegram (the model does not pick channels).

Previews and the 2026.8.1 change

With the streaming key unset, Telegram now keeps one editable status draft during the turn, the agent's current status plus its tool lines, and sends the final answer as a normal message; before 2026.8.1 it streamed the answer text itself into the preview. No config becomes invalid and no doctor fix is needed, and setting the streaming mode to partial restores the old behaviour. The four modes are off, partial, block and progress, with progress the default: short initial answer previews are debounced and then materialised after a bounded delay if the run is still active, and progress keeps one status draft that shows the stable status label when answer activity arrives before tool progress, clears it at completion and delivers the answer normally. By default that draft is quiet, the status headline, commentary, plan milestones and approval requests, with intermediate tool failures and non-zero command exits hidden while terminal task errors still use normal error delivery; a tool-progress flag under progress adds the rolling tool log including failures, a preview tool-progress flag decides whether tool updates reuse the edited preview in partial and block modes, a command-text setting shows the tool label only or the explicit command text, and a commentary flag opts assistant preamble into the temporary draft. Legacy stream-mode keys, boolean streaming values and retired native draft keys are detected and migrated by the doctor fix, and compaction status follows the same settings and appears as soon as compaction starts. Selected quote replies are the exception: when the reply mode is first, all or batched and the inbound message has selected quote text, the final answer goes through Telegram's native quote-reply path and draft previews are skipped for that turn. For text-only replies a short preview gets the final edit in place, a long final that splits reuses the preview as the first chunk and sends only the remainder, progress-mode finals clear the draft, and if the final edit fails before completion is confirmed the bot falls back to normal delivery and cleans up the stale preview; media replies always take the normal path. Preview streaming and block streaming are mutually exclusive: an explicit non-off preview mode overrides an inherited block-streaming default and an explicit block flag overrides the preview. The reasoning stream command streams reasoning into the live preview and deletes that preview after final delivery unless reasoning is kept on, and the final answer is sent without reasoning text.

Commands, replies, acknowledgements, limits

  • The command menu is registered at startup with setMyCommands when native commands are on auto; custom entries are menu items only, normalised to lowercase with a valid pattern of letters, digits and underscores up to 32 characters, unable to override native commands, with conflicts skipped and logged, and when the menu still overflows after a trim retry you reduce plugin, skill and custom commands or disable native commands; a 404 from the command or webhook calls while direct curl works usually means the API root was set to the full bot-token endpoint, a 401 from getMe means the token was rejected and the bot stops before polling, and network errors on setMyCommands usually mean outbound DNS or HTTPS to the Bot API host is blocked.
  • Reply threading has explicit tags for the current message and for a specific message ID, the reply mode is off by default with first and all as the alternatives, a native quote excerpt is added automatically when the original text is available and capped at 1024 UTF-16 code units with a plain reply as the fallback, and off disables only implicit threading while explicit tags are still honoured; the ack reaction emoji resolves from the account, the channel, the global setting and finally the agent identity emoji with the eyes as the last fallback, an empty string disables it, and the scope defaults to group mentions, so DMs get no acknowledgement unless the scope is direct or all and only all covers ambient room events.
  • The text chunk limit defaults to 4000 with a newline chunk mode that prefers paragraph boundaries, media is capped at 100 MB inbound and outbound with a media-unavailable notice in the body when an attachment cannot be downloaded, group context history defaults to 50 and zero disables it, reply, quote and forward context normalises into one selected window when the gateway observed the parents, with the cache in the SQLite plugin state and only one shallow reply payload per update beyond it, allowlists gate who can trigger the agent rather than redacting supplemental context, and CLI sends accept a numeric chat ID, a username or a topic target, with polls supporting a duration of five seconds to seven days, anonymous or public voting and two to twelve options, inline keyboards through presentation blocks, pinned delivery and a force-document flag, all gated by the send-message and poll action switches.

OpenClaw on Telegram is the channel post this behaviour belongs to, and OpenClaw Telegram access control decides who reaches it in the first place.

Why the draft changed

Streaming the answer text into an edited message looked alive but kept rewriting the message people were reading, and on a channel where every edit is a network call the quiet status draft is the better default. OpenClaw reactions covers the acknowledgement emoji across channels, and Connect your first channel in five minutes the first-channel walkthrough where you decide which behaviour you want before anyone messages the bot.

On Diali

Telegram is one of the channels Diali connects from the dashboard, with the runtime config generated and replaced at each release, so the streaming, command and limit keys here describe what a hosted bot does rather than a file you maintain. Telegram on Diali is the channel on Diali and Hosted OpenClaw on Diali the assistant behind it.

  • Replies go back to Telegram; the model never picks a channel.
  • Since 2026.8.1 the preview is a status draft; partial streams the answer.
  • 4000 characters per chunk, 100 MB per file, one poller per token.
Get started

Stop reading about it, build one

Set up an agent, pick a channel, and have it working inside the app you already keep open.