> For the complete documentation index, see [llms.txt](https://www.openclawbook.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.openclawbook.xyz/en/ch03-channel-setup/3.3-multi-channel-strategy-and-groups.md). Agents can also search and read this documentation through its [MCP server](https://www.openclawbook.xyz/~gitbook/mcp).

# 3.3 Multi-Channel Strategy and Group Management

> **Generated by**: Claude Opus 5 (claude-opus-5\[1m]) **Token usage**: Input \~212,000 tokens, Output \~9,000 tokens (this section) **Source baseline**: `v2026.3.9` (`v2026.3.8-170-g665f67726`)

***

## 3.3.1 Running Several Channels at Once

Channels are independent — enabling several requires nothing more than configuring each:

```json5
{
  channels: {
    telegram: { enabled: true, token: "${TELEGRAM_BOT_TOKEN}", allowFrom: ["..."] },
    discord:  { enabled: true, token: "${DISCORD_BOT_TOKEN}",  allowFrom: ["..."] },
    slack:    { enabled: true, botToken: "${SLACK_BOT_TOKEN}", appToken: "${SLACK_APP_TOKEN}" },
  },
}
```

### One thing that surprises people: DMs share one memory

By default **every DM collapses into the same main session** (§14.5.3).

That means DMing from Telegram and DMing from Discord land in **one conversation with one memory**. Say something on Telegram, ask about it on Discord, and it remembers.

That's the intended product behavior — **one person, many entrances**. You shouldn't have to re-explain something because you switched apps.

**Group chats are always isolated**, because they inherently involve multiple people.

If you'd rather have DMs separated per channel:

```json5
{
  messages: {
    dmScope: "per-channel-peer",   // separate by channel and peer
  },
}
```

Four granularities are available, from fully merged to fully separated.

### Checking status

```bash
openclaw channels status
```

Shows each channel's connection state, reconnect attempts, and last error. This is the first thing to run when something isn't working.

## 3.3.2 Group Strategy: Mention Gating and Command Gating

### Mention gating

By default a bot in a group **only replies when mentioned** — otherwise it would answer everything anyone says.

Mention detection accepts three routes (§14.5.2):

| Route                   | Example                                              |
| ----------------------- | ---------------------------------------------------- |
| Platform-native mention | `@mybot what's the weather`                          |
| Text pattern            | The agent's configured name appearing in the message |
| Reply                   | Replying to one of the bot's messages                |

To change the behavior in a specific group, an authorized user can send:

```
/activation always     # respond to everything
/activation mention    # only when mentioned (default)
```

> **`always` is worth using sparingly.** In a busy group it means every message triggers an agent run — expensive, and usually annoying.

### Messages it didn't answer still become context

An important detail: **messages blocked by mention gating aren't discarded.** They go into a history buffer, and the next time the bot is genuinely addressed they're included as `[Chat messages since your last reply - for context]`.

So a group can discuss something for ten minutes, then @ the bot with "what do you think?" — and it has the context to answer.

### Command gating

Authorized users can issue control commands **without mentioning the bot** — an operational necessity. An admin typing `/status` shouldn't have to @ it first.

But note the bypass has a condition: it only applies when the message mentions **nobody at all**. `@alice /status` won't trigger it, so you can discuss commands without accidentally running them.

## 3.3.3 Allowlists and Per-Channel Configuration

### Two sources of allowlist

| Source            | How it gets populated                                   |
| ----------------- | ------------------------------------------------------- |
| **Config file**   | You write IDs into `allowFrom` by hand                  |
| **Pairing store** | Populated automatically when you approve a pairing code |

The two merge into the effective allowlist. **But the pairing store is DM-only** — group authorization recognizes only what's in the config file (§32.6.2).

### The three DM policies

```json5
{
  channels: {
    telegram: {
      dmPolicy: "pairing",   // default
    },
  },
}
```

| Policy      | Behavior                                                             |
| ----------- | -------------------------------------------------------------------- |
| `pairing`   | **Default.** Strangers get a pairing code; you approve to admit them |
| `allowlist` | Only listed IDs are admitted; others are silently dropped            |
| `open`      | Anyone may talk to it — **only sensible for testing**                |
| `disabled`  | No DMs at all                                                        |

### Matching by name is dangerous

Allowlists can match display names, but **this is off by default**, and the source calls the flag that enables it `isDangerousNameMatchingEnabled`.

The reason is simple: **anyone can change their display name to match yours.** Use stable IDs.

`openclaw security audit` flags name-based allowlist entries specifically (§32.6.4).

### Per-channel settings

Most settings can be set globally and overridden per channel:

```json5
{
  channels: {
    telegram: {
      requireMention: true,
      replyToMode: "off",          // whether replies quote the original
      textChunkLimit: 4000,
    },
    discord: {
      textChunkLimit: 2000,        // Discord's platform limit
    },
  },
}
```

> **One frequent source of confusion**: `groupPolicy` constrains **different dimensions on different channels** (§20.6.5). On Discord it's about servers and channels; on WhatsApp it's about senders within a group; on IRC it's case-insensitive channel names. That's because the platforms' own structures differ. When something behaves unexpectedly, check what the setting means *on that channel*.

***

## Section Summary

1. **Channels are independent** — enabling several requires only configuring each; `openclaw channels status` is the first diagnostic to run.
2. **All DMs collapse into one main session by default** — "one person, many entrances," so switching apps doesn't lose memory. Group chats are always isolated. `dmScope` offers four granularities if you want separation.
3. **Mention gating detects three routes** (native mention / name pattern / reply); **`/activation always` should be used sparingly** since every message then triggers an agent run.
4. **Messages blocked by gating still become context** — the group can discuss for ten minutes and then ask "what do you think?" with full history available.
5. **Command gating lets authorized users skip the mention**, but only when the message mentions nobody else — so discussing commands doesn't accidentally run them.
6. **Allowlists have two sources** (config file and pairing store), and **the pairing store is DM-only** — group authorization recognizes only the config file.
7. **Name matching is off by default and flagged dangerous** — anyone can change their display name; use stable IDs, and `security audit` will call this out.
8. **`groupPolicy` constrains different dimensions on different channels** because the platforms' structures differ — a frequent source of misconfiguration.
