#every codex reply in discord has a new line between it and fixed character length
1 messages · Page 1 of 1 (latest)
for example, i said "write a random paragraph"
codex 5.5 response was:
Morning light pooled across the kitchen table, catching
the steam from a half-finished cup of coffee. Outside,
the street was still quiet, but the day had already
begun to gather itself. It felt like one of those small,
ordinary moments that asks for nothing and somehow
gives you a little room to breathe.
while the expected output should be:
Morning light pooled across the kitchen table, catching the steam from a half-finished cup of coffee. Outside, the street was still quiet, but the day had already begun to gather itself. It felt like one of those small, ordinary moments that asks for nothing and somehow gives you a little room to breathe.
That looks like Codex is hard-wrapping the text before Discord gets it. Discord will wrap normal paragraphs automatically, so you want Codex/OpenClaw to send normal Markdown.
First: please paste:
openclaw --version
Likely fixes:
- Add this to the relevant
AGENTS.md/ agent instructions:
## Discord formatting
Do not hard-wrap prose at a fixed column width.
Write normal Markdown paragraphs and let Discord wrap lines visually.
Use blank lines only between paragraphs, not after every line.
- Check Discord chunking config isn’t set to newline mode:
openclaw config set channels.discord.streaming.chunkMode length
openclaw config set channels.discord.maxLinesPerMessage 80
openclaw gateway restart
If you’re using account-specific Discord config, set those under channels.discord.accounts.<accountId> instead.
OpenClaw 2026.4.26 (be8c246)
Yep — that example is Codex sending hard-wrapped lines, and Discord/OpenClaw is preserving them too aggressively.
Try:
openclaw config set channels.discord.streaming.chunkMode length
openclaw config set channels.discord.maxLinesPerMessage 80
openclaw gateway restart
If you use a named Discord account, set the same under:
channels.discord.accounts.<accountId>.streaming.chunkMode
channels.discord.accounts.<accountId>.maxLinesPerMessage
Also add this to the agent/Codex instructions:
Do not hard-wrap normal prose at a fixed line length.
Use normal Markdown paragraphs and let Discord wrap text visually.
Only insert blank lines between actual paragraphs.
I’d still grab openclaw --version too — if that config doesn’t change it, this may be a Discord/Codex ACP formatting bug worth filing: https://github.com/openclaw/openclaw/issues
Yep — expected output should be one paragraph. The key bit: config can stop OpenClaw/Discord from chunking by newline, but it won’t remove literal newlines if Codex itself generated them.
Try both:
openclaw config set channels.discord.chunkMode length
openclaw config set channels.discord.streaming.chunkMode length
openclaw config set channels.discord.maxLinesPerMessage 80
openclaw gateway restart
OpenClaw’s Discord docs list chunkMode / maxLinesPerMessage as the relevant delivery controls, and newline mode is specifically the one that splits around line breaks/paragraph boundaries. (docs.openclaw.ai)
Then add this to the agent/Codex instructions (AGENTS.md or wherever that Codex session gets instructions):
For Discord/chat replies, do not hard-wrap prose.
Do not insert line breaks inside a normal paragraph.
Let the chat client wrap text visually.
Use blank lines only between real paragraphs.
If this is a persistent ACP/Codex session, start a fresh session/thread after changing instructions — old sessions can keep behaving the old way. If it still happens after that, please paste openclaw --version; it may be worth filing as a Discord/Codex formatting bug.
Thanks — 2026.4.26 is new enough, so don’t chase updates first.
I’d fix it in two places:
1. Discord delivery config
openclaw config set channels.discord.streaming '{ mode: "off", chunkMode: "length" }'
openclaw config set channels.discord.maxLinesPerMessage 80
openclaw doctor --fix
openclaw gateway restart
chunkMode: "newline" is the suspicious one here. In 2026.4.26, Discord chunking lives under channels.discord.streaming.chunkMode; doctor also migrates the old root channels.discord.chunkMode.
2. Codex/session instruction