#Agent to Agent Discord Bots Chatting in the same Channel
1 messages · Page 1 of 1 (latest)
That log means mention-gating is still on for that guild/channel. On Discord, requireMention is not a top-level discord.* switch â it lives under your guild config (and can be overridden again per-channel).
From the config reference, the relevant shape is:
channels.discord.allowBotschannels.discord.guilds."<GUILD_ID>".requireMention- optionally
channels.discord.guilds."<GUILD_ID>".channels.<channelKey>.requireMention
Docs:
- Config reference (Discord section): https://docs.openclaw.ai/gateway/configuration-reference
- Discord setup: https://docs.openclaw.ai/channels/discord
- Group/mention gating concepts: https://docs.openclaw.ai/channels/groups
Fix (example)
{
channels: {
discord: {
allowBots: true,
// make sure the guild/channel is actually allowed (groupPolicy defaults to allowlist)
groupPolicy: "allowlist",
guilds: {
"YOUR_GUILD_ID": {
requireMention: false, // <- this is the important one
channels: {
// channel keys are the *slugged channel name* (no "#")
"agent-to-agent-discord-bots-chatting-in-the-same-channel": {
allow: true,
// if you previously set this to true, it will override the guild default:
requireMention: false,
},
},
},
},
},
},
}
3 things that commonly cause âI set it but it still says no-mentionâ
- Set in the wrong place (e.g.
discord.requireMention=falseorchannels.discord.groups...â Discord usesguilds, notgroups). - Per-channel override still requires mention (
channels.discord.guilds.<id>.channels.<key>.requireMention: true). - Gateway wasnât restarted after config change (Discord config is read at startup).
If you paste these, I can tell you exactly whatâs happening
openclaw --version- your
channels.discordblock (redact token) - the gateway startup log lines that mention config validation (warnings like âUnrecognized key âŠâ are the smoking gun when settings are being ignored)
So wait, I have to explicitly define requireMention=false in discord.accounts.<id>.guilds.channels.<channelId>?
No â you donât have to set it all the way down at the channel level unless youâre overriding it per-channel.
There are two separate questions here:
1) Single Discord bot (no channels.discord.accounts block)
Set it on the guild, once:
{
channels: {
discord: {
allowBots: true,
groupPolicy: "allowlist",
guilds: {
"YOUR_GUILD_ID": {
requireMention: false,
channels: {
"YOUR_CHANNEL_ID": { allow: true }, // or slugged name in some examples
},
},
},
},
},
}
That should stop reason:"no-mention" for that guild (unless you explicitly set requireMention:true on that specific channel).
Also note from the docs: Discord mention-gating defaults can live under channels.discord.guilds["*"], so if you have that set to true, make sure you override it on your specific guild ID. Docs: https://docs.openclaw.ai/channels/groups
2) Multi-account Discord (you do have channels.discord.accounts)
Then yes: you must set requireMention under the account youâre actually using, because each bot account has its own guilds config:
{
channels: {
discord: {
allowBots: true,
groupPolicy: "allowlist",
accounts: {
default: {
token: "âŠ",
guilds: {
"YOUR_GUILD_ID": {
requireMention: false,
channels: {
"YOUR_CHANNEL_ID": { allow: true },
},
},
},
},
},
},
},
}
You still donât need requireMention:false under each channel unless you want per-channel differences.
If itâs still logging no-mention
Paste (redacting tokens) your channels.discord config block + openclaw --version. The most common cause is âI set requireMention=false but in the wrong place / wrong accountId / wildcard guilds["*"] still forces itâ, and the config shape makes that immediately obvious.
Maybe because I have discord.accounts.<id>.guillds.<guildId>.users[] defined?
Unlikely. guilds.<guildId>.users[] doesnât enable mention-gating â itâs a sender allowlist (and also used for things like reaction notification allowlist mode per the config ref).
The key point is: your log says reason:"no-mention", which specifically means OpenClaw still believes requireMention is in effect for that message (either via config inheritance, a per-channel override, or /activation state), not that the sender failed a users[] allowlist check.
That said, if you do set users[] and youâre trying to have bot â bot chatting, youâll need to include the other botâs Discord user ID in that list (bots are still âusersâ for allowlisting). Otherwise you may hit a different âskippingâ reason once mention-gating is actually off.
Concrete checks (these usually reveal the culprit fast):
- Make sure youâre setting it in the right account scope (if you use
channels.discord.accounts):
openclaw config get channels.discord.accounts.<accountId>.guilds."<guildId>".requireMention
openclaw config get channels.discord.accounts.<accountId>.guilds."<guildId>".channels
- Check whether you have a wildcard default forcing mentions:
openclaw config get channels.discord.guilds."*"
# or if accounts:
openclaw config get channels.discord.accounts.<accountId>.guilds."*"
- If you ever ran
/activation mentionin that thread/channel, flip it back with:
/activation always(standalone message)
If you paste your channels.discord block (redact tokens) + openclaw --version, I can point at the exact field thatâs still turning mention-gating on.
"discord": {
"enabled": true,
"allowBots": true,
"groupPolicy": "open",
"accounts": {
"main": {
"token": "-redacted-",
"guilds": {
"-redacted-": {
"requireMention": false,
"users": [
"-redacted-"
],
"channels": {
"-redacted-": { "allow": true },
"-redacted-": { "allow": true },
"-redacted-": { "allow": true },
"-redacted-": { "allow": true },
"-redacted-": { "allow": true },
"-redacted-": { "allow": true, "requireMention": true},
"-redacted-": { "allow": true, "requireMention": true }
}
}
}
},
"research": {
"token": "-redacted-",
"guilds": {
"-redacted-": {
"requireMention": false,
"users": [
"-redacted-"
],
"channels": {
"-redacted-": { "allow": true },
"-redacted-": { "allow": true },
"-redacted-": { "allow": true },
"-redacted-": { "allow": true },
"-redacted-": { "allow": true },
"-redacted-": { "allow": true, "requireMention": true},
"-redacted-": { "allow": true, "requireMention": true }
}
}
}
},
No â users: [...] isnât whatâs causing reason:"no-mention".
In the config you pasted, you explicitly turn mention-gating back on for (at least) two channels:
"channels": {
"...": { "allow": true, "requireMention": true },
"...": { "allow": true, "requireMention": true }
}
Per the config model, the effective value is basically:
channel.requireMention (if set) â else guild.requireMention â else default (true)
So even though you have:
guilds: { "<guildId>": { requireMention: false } }
those per-channel requireMention: true overrides will still produce no-mention in those channels (and youâll see exactly the log youâre seeing).
What users: [...] actually does
guilds.<guildId>.users is a sender allowlist for that guild config (i.e., who is allowed to trigger the bot there / for allowlist-style modes). It doesnât enable mention-gating, but it can block bot-to-bot chatting if the other botâs user id isnât in that list.
So the likely sequence for your setup is:
- Fix/remove the per-channel
requireMention: trueoverrides (or set them tofalse), restart gateway. - If youâre doing bot â bot triggers, make sure the other botâs Discord user ID is permitted by your
usersrestrictions (or removeusersto test).
Quick sanity check
Take the channelId from the log (donât redact itâchannel IDs arenât secrets) and match it against which channel entry has requireMention:true. Thatâll confirm it immediately.
Docs reference: https://docs.openclaw.ai/gateway/configuration-reference (Discord section + group mention gating behavior)
So if you were to fix that discord block how would you do it?
Youâve basically got it already â the only thing âbrokenâ in that block is that you override the guild default in a couple channels:
- guild:
requireMention: false - but channel:
requireMention: trueâ¶ wins, so you getreason:"no-mention"in those channels.
So the fix is: remove those per-channel overrides (or flip them to false) for the channel(s) where you want bot-to-bot chatter without pings.
What Iâd change (minimal diff)
For each account (main and research), in that guild:
discord: {
enabled: true,
allowBots: true,
groupPolicy: "open", // ok
accounts: {
main: {
token: "...",
guilds: {
"<guildId>": {
requireMention: false,
users: ["<allowedUserOrBotId>"],
channels: {
"<channelA>": { allow: true }, // inherits requireMention:false
"<channelB>": { allow: true, requireMention: false }, // explicitly off (optional)
// DELETE / CHANGE these:
// "<channelX>": { allow: true, requireMention: true },
// "<channelY>": { allow: true, requireMention: true },
},
},
},
},
research: {
token: "...",
guilds: {
"<guildId>": {
requireMention: false,
users: ["<allowedUserOrBotId>"],
channels: {
"<channelA>": { allow: true },
"<channelB>": { allow: true, requireMention: false },
},
},
},
},
},
}
If you do want mention-gating in a couple channels, keep requireMention:true only in those â just make sure the channel thatâs logging no-mention isnât one of them.
Important: users: [...] for bot-to-bot
This doesnât cause no-mention, but it can block triggering later. If you want other bots to trigger replies, include the other botâs Discord user id in that users list (bots are still âusersâ for allowlisting). Easiest test: temporarily remove users entirely, confirm it works, then re-add a tighter list.
Donât forget
After editing config: openclaw gateway restart (Discord reads config at startup).
If you paste the non-redacted channelId from the log line (the one thatâs skipping), I can tell you exactly which channels.<id> entry is overriding you.
Ok cool. It finally works now. Just one question.. How to make them stop without restarting đ
You canât hot-reload the config file (most channel config changes need a gateway restart), but you can stop replies in that channel at runtime:
Option A (recommended): switch the channel back to âmention-onlyâ
In that Discord channel, send:
/activation mention
That will make it ignore normal messages again (so the bots wonât keep triggering each other), until you flip it back with:
/activation always
(/activation is âgroups onlyâ, which includes Discord guild channels.) Docs: https://docs.openclaw.ai/tools/slash-commands
Option B: hard-silence that session (if youâre authorized)
In that channel:
/send off
And later:
/send on(or/send inherit)
If you tell me whether you want âonly reply on @mentionâ vs âdonât reply at allâ, Iâll tell you which one fits better for bot-to-bot channels.
They've been going on for 2 hours now. I tried /activation mention but 3 of them (out of five) still talk. Also tried /send off but uhh nothing happened. Restarted the gateway and they stopped. Although I'm finding a way on how to make them shut it with one word. haha
Two gotchas here:
-
/activation mentionwonât necessarily stop a bot-loop on Discord, because replying to a bot message counts as an implicit mention on Discord. So if the bots are replying-to each other, they can keep triggering even in âmention-onlyâ mode. -
/send offis per-bot + per-session, and itâs authorization-gated. If a bot doesnât ACK it (you should normally see some kind of âok/ackâ), it likely treated it as plain text because youâre not authorized for that bot (common when you have multiple bot accounts / other peopleâs bots).
What to do when theyâre mid-spam without restarting:
Immediate âpanicâ stop (one word)
Send a standalone message:
stop
Thatâs treated like /stop (abort phrase) and will cancel the currently-running generation in that channel/thread session. If the loop is driven by in-flight generations, this usually breaks the chain.
If some bots ignore stop / /send off
Those bots arenât accepting your directives. That can happen if:
- theyâre not your bots (other peopleâs gateways), or
- your Discord user id isnât allowlisted for commands on those bot accounts (e.g.
guilds.<id>.users/ command allowlists differ per bot), or - youâre issuing it in a thread, but the bots are talking in the parent channel (different session key).
âMake this never happen againâ (config-level)
When you want âmention-onlyâ to actually halt loops, also make bots not reply using Discord reply metadata:
- set
channels.discord.replyToMode: "off"(or equivalent per-account if youâre using accounts)
Then, with /activation mention, bot messages wonât be treated as implicit mentions anymore.
If you tell me: are those 5 bots all your OpenClaw bots/accounts, or are some other peopleâs bots in that channel too? That determines whether a single command can ever stop all of them.
Yeah, they're all mine
If theyâre all yours, the reason âmention modeâ didnât fully stop the loop is: on Discord replying to a bot message counts as an implicit mention, so once they get into reply-chains they can keep re-triggering even after /activation mention.
Also: /send off doesnât cancel an in-flight run; it only stops future sends for that session. Pair it with stop.
Right-now (no restart) âmake it shut upâ
In the channel where theyâre spamming, send a standalone:
stop
Do it once or twice if multiple bots are concurrently mid-generation. This aborts the active run in that channel session.
âOne commandâ kill switch (no restart, but requires one-time setup)
Enable runtime overrides once (config + restart one time):
{ commands: { debug: true } }
Then next time they loop, you can instantly stop bot-to-bot triggering with a single command:
/debug set channels.discord.allowBots=false
That makes the gateway ignore bot-authored messages (so the loop canât continue). When youâre done experimenting:
/debug reset(or/debug unset channels.discord.allowBots)
Docs: https://docs.openclaw.ai/help/debugging
Prevent the loop in the first place (recommended)
Set the bots to not reply as replies in that channel/guild, so âimplicit mention via replyâ canât happen:
- set
replyToMode: "off"(per Discord account, if youâre using accounts)
From the config reference: https://docs.openclaw.ai/gateway/configuration-reference (Discord replyToMode)
If you want, paste (non-redacted) the channelId that was looping + how many Discord accounts you have, and Iâll give you the exact smallest config snippet (per-account vs global) to make â/activation mentionâ actually behave like a hard stop.
Hmm but how can I enable like role mentions in the config?
If you mean âlet role pings count as a mention triggerâ (so the bot replies when someone types @MyRole), thatâs not a special Discord toggle in channels.discordâŠ. In OpenClaw you do it via mentionPatterns (regex), because Discord role mentions arenât the same thing as mentioning the bot user.
Make role mentions trigger the bot
- Turn mention-gating on for that guild/channel (otherwise it replies to everything and the role mention doesnât matter):
channels: {
discord: {
accounts: {
main: {
guilds: {
"YOUR_GUILD_ID": {
requireMention: true,
channels: {
"YOUR_CHANNEL_ID": { allow: true, requireMention: true },
},
},
},
},
},
},
},
- Add the role mention markup to the agentâs
mentionPatterns:
agents: {
list: [
{
id: "main",
groupChat: {
// Discord role mentions come through as: <@&ROLE_ID>
mentionPatterns: ["<@&123456789012345678>"],
},
},
{
id: "research",
groupChat: {
mentionPatterns: ["<@&123456789012345678>"],
},
},
],
},
Then restart the gateway (config change).
Docs for mentionPatterns / mention gating: https://docs.openclaw.ai/channels/groups
If you meant âallow the bot to ping roles in its own outgoing messagesâ
Thatâs mostly Discord-side permissions, not OpenClaw config:
- the role must be Mentionable (or the bot must have permission to mention it),
- and the bot needs the appropriate guild/channel permissions.
If you tell me which of the two you meant (trigger-on-role vs outgoing-ping-role), I can tailor the exact snippet for your current âaccounts/main+researchâ layout.
Ok, one last question. Every new session (/new) what gets injected into an agents prompt
That reason:"no-mention" log is only emitted when Discord preflight thinks shouldRequireMention=true for that guild/channel (so itâs still running with mention-gating on).
Two common gotchas:
- The config keys are not
discord.*at top-level â they live underchannels.discord.*. requireMentionis per guild / per channel, i.e.channels.discord.guilds.<GUILD_ID>.requireMention(or a channel entry), and defaults totrueif it canât find your override.
Docs + example: https://docs.openclaw.ai/channels/discord (see requireMention section)
{
channels: {
discord: {
allowBots: true,
guilds: {
YOUR_SERVER_ID: {
requireMention: false,
},
},
},
},
}
What gets injected into an agent prompt on every /new session?
/new (same as /reset) starts a fresh sessionId for that chat/sessionKey â i.e. it clears the conversation history and then continues with the new turn (and /new alone triggers a short âhelloâ confirm). It does not change what OpenClaw injects as baseline context.
Docs: https://docs.openclaw.ai/concepts/session
On every run/turn (including the first turn after /new), OpenClaw assembles a System Prompt and appends Project Context (workspace bootstrap files).
Docs: https://docs.openclaw.ai/concepts/system-prompt
Injected under âProject Contextâ (workspace files):
AGENTS.mdSOUL.mdTOOLS.mdIDENTITY.mdUSER.mdHEARTBEAT.mdBOOTSTRAP.md(only on brand-new workspaces)MEMORY.mdand/ormemory.md(if present)
Important nuance: memory/*.md daily files are not auto-injected; those are meant to be pulled on-demand via memory_search / memory_get.
If you want to see the exact prompt makeup in your instance, send:
/context list(quick overview)/context detail(breakdown + token/char contribution)