I'm using a bot on Discord and want to develop in a specific channel. I want the OpenClaw bot to act as an intermediary between OpenCode and me. While it successfully communicates instructions, it consistently fails to relay OpenCode's output messages to me. I've been told that the bot should receive messages via OpenClaw system events, but they say it can't be sent to the main session due to an issue. Is there a solution?
#Issue with not receiving results from having openclaw act as an intermediary between opencode and me
1 messages · Page 1 of 1 (latest)
What you’re running into is almost always one of these two Discord behaviors in OpenClaw:
1) OpenClaw ignores bot-authored messages by default
If “OpenCode” is another Discord bot that posts its output into the channel, OpenClaw will not even see those messages unless you explicitly allow it.
Fix: set allowBots: true (and usually loosen mention-gating for that one dev channel).
From the config reference (Discord): bot-authored messages are ignored by default; allowBots: true enables them.
Docs: https://docs.openclaw.ai/gateway/configuration-reference#discord
A typical “safe enough” setup for a dedicated dev channel is:
{
channels: {
discord: {
allowBots: true, // global
guilds: {
"<GUILD_ID>": {
channels: {
"<YOUR_DEV_CHANNEL>": {
allow: true,
requireMention: false, // otherwise OpenCode must @mention OpenClaw
// and optionally lock it down:
users: ["<YOUR_USER_ID>", "<OPENCODE_BOT_USER_ID>"]
}
}
}
}
}
}
}
Then restart the gateway.
Why this matters: in Discord, “it successfully communicates instructions” can still be true (OpenClaw sees your messages), while “it never relays OpenCode output” happens because OpenCode’s output is coming from a bot author, which is filtered.
Also check if you’re in a thread: the bot needs Discord permissions like Send Messages in Threads, and your allowlist must match the thread/channel OpenClaw sees.
2) “System events” aren’t a delivery mechanism to Discord
System events are internal prompt inputs that get injected on the next agent turn/heartbeat (and openclaw system event ... explicitly targets the main session only). They don’t automatically “show up in the channel” as messages.
Docs: https://docs.openclaw.ai/cli/system
If you want OpenCode → OpenClaw → Discord delivery reliably, the robust approach is: have OpenCode call the Gateway’s Tools Invoke API and invoke message.send (or similar) directly, instead of trying to “print” via system events.