Chunk delivery
Chat platforms cap message length, so WednesdayAI splits long outbound replies into multiple messages before sending. Channel adapters and reply-shaping plugins control the split through per-channel config and the SDK resolvers insrc/auto-reply/chunk.ts — resolveChunkDelivery, resolveTextChunkLimit (both re-exported from openclaw/plugin-sdk).
Config surface
Per channel (and per account within a channel):Modes
chunkMode resolves to a runtime boundary mode plus a pack flag (ResolvedChunkDelivery):
Split safety, all modes: code fences are never split mid-fence — a forced split at the limit closes and reopens the fence so Markdown stays valid — and breaks avoid splitting a surrogate pair mid-emoji.
The deprecated packing key
chunkNewlinePacking still parses but logs a deprecation warning (once per channel:account):
Migration:
chunkNewlinePacking: false → chunkMode: "paragraph"; any other use → delete the key.
Using the resolvers
resolveChunkDelivery(cfg, provider, accountId?)— merge order: account override → channel config → defaults. Returns{ mode: "length", pack: true }for the internal message channel (INTERNAL_MESSAGE_CHANNEL) and unknown providers.resolveChunkMode(...)— convenience:resolveChunkDelivery(...).mode.resolveChunkNewlinePacking(...)— deprecated; returns.pack.resolveTextChunkLimit(cfg, provider, accountId?, { fallbackLimit? })— caller-supplied fallback (e.g. a dock’soutbound.textChunkLimit) when no config key exists; the hard fallback is 4000.
Interaction with block streaming
When block streaming is on, stream chunk sizes are clamped totextChunkLimit, and the resolved delivery controls flush behaviour: with mode: "newline" and pack: false (i.e. chunkMode: "paragraph"), blocks flush eagerly per paragraph; with packing on, the outbound packer composes larger messages. See Streaming.
What not to do
Related
- Streaming — block and preview streaming
- Auto-reply pipeline — where chunking sits in the reply path
- Channel adapters — building a channel plugin