Bot-to-bot rooms
By default, Matrix messages from other configured OpenClaw Matrix accounts are ignored. UseallowBots to intentionally allow inter-agent traffic:
allowBots: trueaccepts messages from other configured Matrix bot accounts in allowed rooms and DMs.allowBots: "mentions"accepts those messages only when they visibly mention this bot in rooms; DMs are still allowed regardless.groups.<room>.allowBotsoverrides the account-level setting for one room.- Accepted configured-bot messages use shared bot loop protection. Configure
channels.defaults.botLoopProtection, then override per-account withchannels.matrix.botLoopProtectionor per-room withchannels.matrix.groups.<room>.botLoopProtection. - OpenClaw still ignores messages from the same Matrix user ID to avoid self-reply loops.
- Matrix has no native bot flag; OpenClaw treats “bot-authored” as “sent by another configured Matrix account on this OpenClaw gateway”.
Context visibility
Matrix supports the sharedcontextVisibility control for supplemental room context such as fetched reply text, thread roots, and pending history.
contextVisibility: "all"is the default. Supplemental context is kept as received.contextVisibility: "allowlist"filters supplemental context to senders allowed by the active room/user allowlist checks.contextVisibility: "allowlist_quote"behaves likeallowlist, but still keeps one explicit quoted reply.
groupPolicy, groups, groupAllowFrom, and DM policy settings.
DM and room policy
dm.enabled: false:
Slash commands
Slash commands (/new, /reset, /model, /agents, /session, /acp, /approve, etc.) work directly in DMs. In rooms, OpenClaw also recognizes commands prefixed with the bot’s own Matrix mention, so @bot:server /new triggers the command path without a custom mention regex - this keeps the bot responsive to the room-style @mention /command posts that Element and similar clients emit when a user tab-completes the bot before typing the command.
Authorization rules still apply: command senders must satisfy the same DM or room allowlist/owner policies as plain messages.