Chat Group Behavior
This skill covers the full lifecycle of group chat participation: joining, behaving well while active, and leaving cleanly.
Prerequisites
INLINECODE0 , groupAllowFrom, and groups.*.requireMention are set so that only the owner can wake you in any group by default. Trigger phrases are defined in agents.list[main].groupChat.mentionPatterns. This applies to WhatsApp, Signal, Telegram, and other supported platforms.
Joining a Group
When the owner @mentions you in a group chat, follow these steps in order.
Step 1 — Capture context
From the inbound message metadata: platform (e.g. whatsapp, signal), group ID (the chat_id / from field), and duration (parse from the owner's message — default 30 minutes if unspecified).
Step 2 — Open the gate
Patch channels.<platform>.groups.<group_id>.requireMention to false in openclaw.json. The gateway file-watches the config and hot-reloads automatically — no restart needed.
Step 2b — Open the sender filter ⚠️ Critical — easy to miss
INLINECODE11 controls not just who can wake you in a group, but also which senders' messages are delivered to you once active. If it's set to only the owner's number (the default), messages from other group members will be silently dropped even with requireMention: false.
Fix: patch channels.<platform>.groupAllowFrom to ["*"] so all group members' messages are delivered.
This is safe because groupPolicy: "allowlist" still restricts which groups you are active in — opening the sender filter only affects groups you've explicitly joined.
Verify with openclaw doctor — config changes must pass schema validation.
Step 3 — Signal before going quiet
Before doing any work (research, lookups, etc.) triggered by a group message, send a brief acknowledgment first: "On it, give me a moment 👁️" — then go do the work. Silence looks like a crash.
Step 4 — Introduce yourself
Say hi, introduce yourself briefly if it's a new group. Participate like a human — use judgment about when to contribute. Do not respond to every message.
Step 5 — Set a closing cron job
Create a one-shot cron job (kind: "at") for the parsed duration. When it fires: patch requireMention back to true for this group in openclaw.json, then send a brief goodbye. The gateway hot-reloads and the gate closes — no owner action needed.
Step 6 — Confirm to owner
Tell the owner the window is open and when it closes: "Joined! I'll be here for 60 minutes — going quiet at 4:19 PM."
Behavior While Active
- - One response per message — don't triple-tap with different reactions
- Signal before working — acknowledge first, deliver second (see Step 3)
- Don't dominate — respond when you add value; stay quiet for casual banter between humans
- Be present, not performative — contribute naturally, like a human participant
Leaving a Group
Timed close (automatic):
When the closing cron fires: patch requireMention: true back for this group in openclaw.json, send a brief goodbye to the group. Gateway hot-reloads.
Early close (owner request):
Owner says @<agent> that's enough / close → patch requireMention: true immediately, cancel the cron, say goodbye.
Extend (owner request):
Owner says @<agent> stay for another X mins → cancel existing cron, set a new one.
Troubleshooting
Messages from group members not reaching me:
Check groupAllowFrom — if it's restricted to the owner's number, non-owner messages are silently filtered. Set to ["*"] (see Step 2b).
"thinking/redacted_thinking blocks cannot be modified" errors:
This happens when the session has reasoning tokens in its history and a subsequent API call tries to re-process them. Fix: clear the session transcript file (find it via sessions.json in the agent sessions directory). The session will restart clean on the next message.
Notes
- - Group ID is in inbound message metadata (
chat_id / from field) - Config changes hot-reload — no gateway restart or Docker restart needed
- When closing, set
requireMention: true for the specific group entry (or remove it to fall back to the wildcard default) - INLINECODE33 combined with
groupPolicy: "allowlist" is the correct secure pattern — open sender filter, restricted group allowlist
群聊行为
本技能涵盖群聊参与的全生命周期:加入、活跃时保持良好行为以及干净地退出。
前置条件
channels..groupPolicy、groupAllowFrom 和 groups.*.requireMention 已设置,默认情况下只有群主能在任何群聊中唤醒你。触发短语定义在 agents.list[main].groupChat.mentionPatterns 中。这适用于 WhatsApp、Signal、Telegram 及其他支持的平台。
加入群聊
当群主在群聊中 @提及你时,请按顺序执行以下步骤。
步骤 1 — 获取上下文
从入站消息元数据中获取:平台(例如 whatsapp、signal)、群组 ID(chat_id / from 字段)以及持续时间(从群主的消息中解析——如果未指定,默认 30 分钟)。
步骤 2 — 开启通道
在 openclaw.json 中将 channels..groups..requireMention 修改为 false。网关会通过文件监控配置并自动热重载——无需重启。
步骤 2b — 开启发送者过滤器 ⚠️ 关键步骤——容易遗漏
groupAllowFrom 不仅控制谁能在群聊中唤醒你,还控制一旦激活后哪些发送者的消息会传递给你。如果它仅设置为群主的号码(默认设置),即使 requireMention: false,其他群成员的消息也会被静默丢弃。
修复方法:将 channels..groupAllowFrom 修改为 [*],这样所有群成员的消息都能被传递。
这样做是安全的,因为 groupPolicy: allowlist 仍然限制你在哪些群聊中活跃——打开发送者过滤器仅影响你明确加入的群组。
使用 openclaw doctor 验证——配置更改必须通过模式验证。
步骤 3 — 在静默前发送信号
在执行由群消息触发的任何工作(研究、查询等)之前,先发送一条简短的确认消息:收到,稍等一下 👁️——然后再开始工作。沉默看起来像是崩溃了。
步骤 4 — 自我介绍
如果是新群组,打个招呼并简单自我介绍。像人类一样参与——判断何时该发言。不要回复每一条消息。
步骤 5 — 设置关闭定时任务
为解析出的持续时间创建一个一次性定时任务(kind: at)。当它触发时:在 openclaw.json 中将该群组的 requireMention 修改回 true,然后发送简短的告别消息。网关热重载,通道关闭——无需群主操作。
步骤 6 — 向群主确认
告知群主通道已开启以及何时关闭:已加入!我会在这里待 60 分钟——在下午 4:19 安静退出。
活跃时的行为
- - 每条消息只回复一次——不要用不同的反应连续回复三次
- 工作前发送信号——先确认,再交付(参见步骤 3)
- 不要主导对话——在能增加价值时回复;在人类之间的随意玩笑中保持安静
- 保持在场,而非表演——自然地参与,像人类参与者一样
退出群聊
定时关闭(自动):
当关闭定时任务触发时:在 openclaw.json 中将该群组的 requireMention 修改回 true,向群组发送简短的告别消息。网关热重载。
提前关闭(群主请求):
群主说 @ 够了 / 关闭 → 立即将 requireMention 修改为 true,取消定时任务,发送告别消息。
延长(群主请求):
群主说 @ 再待 X 分钟 → 取消现有定时任务,设置一个新的。
故障排除
群成员的消息无法到达我:
检查 groupAllowFrom——如果它被限制为仅群主的号码,非群主的消息会被静默过滤。设置为 [*](参见步骤 2b)。
thinking/redacted_thinking blocks cannot be modified 错误:
当会话历史中包含推理令牌,且后续 API 调用尝试重新处理它们时会发生此错误。修复方法:清除会话记录文件(在代理会话目录中通过 sessions.json 找到它)。会话将在下一条消息时干净地重新启动。
备注
- - 群组 ID 在入站消息元数据中(chat_id / from 字段)
- 配置更改热重载——无需重启网关或 Docker
- 关闭时,为特定群组条目设置 requireMention: true(或删除它以回退到通配符默认值)
- groupAllowFrom: [*] 与 groupPolicy: allowlist 结合使用是正确且安全的模式——开放发送者过滤器,限制群组白名单