#Code Blocks Broken Up
1 messages · Page 1 of 1 (latest)
Yep, partly.
On Discord there are two things that split replies:
- OpenClaw soft line cap:
channels.discord.maxLinesPerMessagedefaults to 17, so tall code blocks get split even if they are under 2000 chars. - Discord hard text cap: plain messages still cap at about 2000 chars, so super long code blocks cannot be merged into one normal message.
The first fix to try is bumping the line cap:
openclaw config set channels.discord.maxLinesPerMessage 200 --strict-json
openclaw gateway restart
If you have streaming/block replies enabled, also turn those off, because they can fragment output further.
If the code block is still longer than Discord’s hard limit, then no config can make that a single plain message, the workaround is to have OC send it as a file/attachment instead.