Streaming and Chunking
Streaming + chunking behavior (block replies, draft streaming, limits)
OpenClaw's "streaming" involves three layers of mechanisms that are easy to confuse:
1. LLM token streaming: the model returns text token by token (internal implementation detail).
2. Block streaming: delivers completed text blocks to the channel early (users may see multiple updates).
3. Chunking: splits one reply into multiple messages based on channel character limits (independent of streaming).
Block streaming (per-block delivery)
Goal of block streaming: show users "partially completed paragraphs" before the model fully finishes, keeping paragraph boundaries as natural as possible.
Switch:
- Global default:''agents.defaults.blockStreamingDefault: "on"''
- Channel override: most channels require explicit ''channels.<channel>.blockStreaming: true''
- Telegram is the exception: it also has draft streaming (see below).
Adjust parameters:
- ''agents.defaults.blockStreamingBreak'': when to flush (e.g., ''text_end'').
- ''agents.defaults.blockStreamingChunk'': ''minChars'', ''maxChars'', ''breakPreference''.
- ''agents.defaults.blockStreamingCoalesce'': merges overly dense small blocks to reduce screen flooding.
- ''agents.defaults.humanDelay'': makes delivery look more "human".
Chunking (split by channel limits)
Chunking is a "hard split" before delivery:
- Telegram / WhatsApp: ~4000 chars by default
- Discord: 2000 chars + line limit
- Slack: 4000 chars
Configure:
- ''channels.<channel>.textChunkLimit''
- ''channels.<channel>.chunkMode'' (''length'' or ''newline'')
Chunking tries to avoid splitting fenced code blocks, but in extreme cases splitting may still be required.
Telegram draft streaming (draft bubbles)
Telegram supports "updating the same message" using draft mode in private chat topics/threads. OpenClaw controls this via ''channels.telegram.streamMode'':
- ''"off"'': disables draft streaming, allows block streaming (multiple messages)
- ''"partial"'' (default): uses draft updates in private chat topics (users see one message continuously growing)
- ''"block"'': writes block streaming blocks to draft (reduces multiple messages)
Note:
- Only supported in Telegram private chats + topics/threads.
- Draft streaming and block streaming are mutually exclusive (when enabled, block streaming is disabled).
Why you might not see streaming
Common reasons:
- ''agents.defaults.blockStreamingDefault'' is still ''off''
- You set ''blockStreamingDefault'' but didn't enable ''channels.<channel>.blockStreaming: true'' on the channel
- ''blockStreamingCoalesce'' merged blocks, so they appeared sent at once
- The model output a large block at once (no flush points)
- Telegram draft streaming is enabled (looks like "same message update", not multiple)
Practical recommendations
- Be careful enabling block streaming in public group chats (screen flooding); prefer larger ''minChars'' or stronger coalesce.
- Block streaming works best in private chats.
- If the channel supports reply threading, block streaming's multiple messages will look more "scattered". Use ''replyToMode'' and channel policy to optimize threading.