Ambient Room Events: Quiet Group Context for Agents

Learn how ambient room events let OpenClaw treat unmentioned group chatter as background context, keeping rooms quiet unless the agent explicitly replies. Configure Discord, Slack, and Telegram groups for this behavior.

Read this when

  • Configuring always-on group or channel rooms
  • You want the agent to watch room chatter without posting final text automatically
  • Debugging typing and token usage with no visible room message

Ambient room events allow OpenClaw to treat unmentioned group or channel chatter as background context. The agent can refresh memory and session state, yet the room remains quiet unless the agent explicitly invokes the message tool.

For persistent group chats, pair messages.groupChat.unmentionedInbound: "room_event" with messages.groupChat.visibleReplies: "message_tool". The agent monitors, determines when a response is valuable, and no longer relies on the outdated prompt approach of replying to NO_REPLY.

Currently supported: Discord guild channels, Slack channels and private channels, Slack multi-person DMs, and Telegram groups or supergroups. Other group channels retain their existing group behavior unless their channel page indicates support for ambient room events.

Define the global group-chat behavior:

{
  messages: {
    groupChat: {
      unmentionedInbound: "room_event",
      visibleReplies: "message_tool",
      historyLimit: 50,
    },
  },
}

Next, make the room always-on by turning off mention gating for that room. The room must still satisfy its usual groupPolicy, room allowlist, and sender allowlist.

Prerequisites

Two configurations quietly disable ambient room events even when unmentionedInbound: "room_event" is set.

Mention gating must be disabled for the room. requireMention: true removes unmentioned messages before routing, so they never turn into room events. Consequently, the agent has no room backlog whatsoever, seeing only messages that mentioned it. If the agent says it cannot view recent room history, inspect mention gating first.

The agent requires the message tool. Room events depend on strict visible delivery, so posting demands message(action=send). The message tool comes with the messaging tool profile; the minimal and coding profiles omit it. An agent on tools.profile: "coding" will pick up room events but can never respond. Grant it explicitly when the profile lacks it:

{
  agents: {
    entries: {
      "<agent-id>": {
        tools: { alsoAllow: ["message"] },
      },
    },
  },
}

Verify the effective surface with openclaw agents list and a probe turn instead of assuming the profile includes it.

Once the config is saved, the Gateway hot-applies messages settings. Restart only if file watching or config reload is turned off (gateway.reload.mode: "off").

What changes

With messages.groupChat.unmentionedInbound: "room_event":

  • unmentioned allowed group or channel messages become quiet room events
  • mentioned messages remain user requests
  • text control commands and native commands remain user requests
  • abort or stop requests remain user requests
  • direct messages remain user requests

Room events rely on strict visible delivery. Final assistant text stays private. The agent must call message(action=send) to post in the room.

Typing and lifecycle status reactions stay suppressed for room events. The sole explicit receipt exception is messages.ackReactionScope: "all", which delivers the configured ack reaction; apply any narrower scope or "off" when the room must stay fully silent.

Discord example

{
  messages: {
    groupChat: {
      unmentionedInbound: "room_event",
      visibleReplies: "message_tool",
      historyLimit: 50,
    },
  },
  channels: {
    discord: {
      groupPolicy: "allowlist",
      guilds: {
        "<DISCORD_SERVER_ID>": {
          requireMention: false,
          users: ["<YOUR_DISCORD_USER_ID>"],
        },
      },
    },
  },
}

Use per-channel Discord config when only one channel should be ambient. Under groupPolicy: "allowlist", listing the channel is what permits it (enabled: false turns off an entry):

{
  channels: {
    discord: {
      groupPolicy: "allowlist",
      guilds: {
        "<DISCORD_SERVER_ID>": {
          channels: {
            "<DISCORD_CHANNEL_ID_OR_NAME>": {
              requireMention: false,
            },
          },
        },
      },
    },
  },
}

Slack example

Slack channel allowlists prioritize IDs. Use channel IDs such as C12345678, not #channel-name. Listing the channel under channels.slack.channels is what permits it (enabled: false turns off an entry):

{
  messages: {
    groupChat: {
      unmentionedInbound: "room_event",
      visibleReplies: "message_tool",
      historyLimit: 50,
    },
  },
  channels: {
    slack: {
      groupPolicy: "allowlist",
      channels: {
        "<SLACK_CHANNEL_ID>": {
          requireMention: false,
        },
      },
    },
  },
}

Telegram example

For Telegram groups, the bot must be able to see regular group messages. If requireMention: false, turn off BotFather privacy mode or adopt another Telegram setup that sends full group traffic to the bot.

{
  messages: {
    groupChat: {
      unmentionedInbound: "room_event",
      visibleReplies: "message_tool",
      historyLimit: 50,
    },
  },
  channels: {
    telegram: {
      groups: {
        "<TELEGRAM_GROUP_CHAT_ID>": {
          groupPolicy: "open",
          requireMention: false,
        },
      },
    },
  },
}

Telegram group IDs are typically negative numbers like -1001234567890. Read chat.id from openclaw logs --follow, forward a group message to an ID helper bot, or check Bot API getUpdates.

Agent specific policy

Use an agent override when several agents share the same room but only one should treat unmentioned chatter as ambient context:

{
  messages: {
    groupChat: {
      visibleReplies: "message_tool",
    },
  },
  agents: {
    entries: {
      main: {
        default: true,
        groupChat: {
          unmentionedInbound: "room_event",
          mentionPatterns: ["@openclaw", "openclaw"],
        },
      },
    },
  },
}

The agent-specific agents.entries.*.groupChat.unmentionedInbound value overrides messages.groupChat.unmentionedInbound for that agent.

Visible reply modes

messages.groupChat.visibleReplies defaults to "automatic" for standard group/channel user requests. Keep that default when final assistant text should post visibly without an explicit message-tool call.

For ambient always-on rooms, messages.groupChat.visibleReplies: "message_tool" is still advised, particularly with latest-generation, tool-reliable models such as GPT-5.6 Sol. It lets the agent choose when to speak by invoking the message tool. If the model returns final text without invoking the tool, OpenClaw keeps that final text private and logs suppressed-delivery metadata.

Room events stay strict even when other group requests use automatic replies. Unmentioned ambient room events always require message(action=send) for visible output.

History

messages.groupChat.historyLimit sets the global group history default (50 when unset; must be a positive integer). Channels can override it with channels.<channel>.historyLimit, and some channels also support per-account history limits. Set the channel-level historyLimit: 0 to disable group history context for that channel.

Supported room-event channels keep recent ambient room messages as context. Telegram keeps an always-on rolling per-group window bounded by historyLimit; user-request turns select entries after the bot's last recorded reply, while room-event turns receive the full recent window so the model can see its own recent posts. The retired Telegram includeGroupHistoryContext mode key is removed by openclaw doctor --fix.

Troubleshooting

When typing indicators or token activity appear in a room, yet no message ever shows up:

  1. Verify that the channel allowlist and sender allowlist both permit this room.
  2. Make sure requireMention: false is configured at the expected room level.
  3. Determine whether messages.groupChat.unmentionedInbound or the agent override has been set to "room_event".
  4. Look through the logs for suppressed final payload metadata or didSendViaMessagingTool: false.
  5. For standard group requests, keep or reinstate messages.groupChat.visibleReplies: "automatic" if you want final replies posted automatically. For ambient rooms using message_tool, choose a model/runtime that reliably invokes tools.

Should Telegram ambient rooms never fire, review BotFather privacy mode and confirm the Gateway receives normal group messages.

If Slack ambient rooms fail to trigger, confirm the channel key matches the Slack channel ID and that the app holds the history scope for that room type: channels:history (public), groups:history (private), or mpim:history (multi-person DMs).

1,129 words · updated Aug 12, 2026