-
-
Notifications
You must be signed in to change notification settings - Fork 69.7k
[Feature Request] Group pairing flow: notify owner + read-only mode for unconfigured groups #11489
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Feature Request
Problem
When a bot is added to a new group (Telegram, WhatsApp, etc.), there is no pairing flow like there is for DMs. The bot either:
- Ignores the group entirely (if not in allowlist)
- Processes all messages (if
groups: "*")
Neither option gives the owner visibility or control over new group additions.
Proposed Solution
1. Group pairing mode
Similar to dmPolicy: "pairing", add groupPolicy: "pairing":
{
channels: {
telegram: {
groupPolicy: "pairing", // new option
}
}
}Behavior:
- When bot is added to a new group → do NOT process messages
- Send notification to owner (main session or DM)
- Owner can approve/reject via CLI or inline buttons:
openclaw pairing approve telegram group <chatId>openclaw pairing reject telegram group <chatId>(optionally auto-leave)
2. Notify on group join
Fire a system event when bot is added to any group:
[System] Bot added to group "Client Chat" (-1001234567890) by @username
This allows the agent to:
- Log the addition
- Ask owner what to do
- Optionally process through a sandboxed reader-agent first
3. Read-only / reader-agent mode for unconfigured groups
For groups pending approval, optionally route messages through a restricted agent:
{
channels: {
telegram: {
groupPolicy: "pairing",
pendingGroupAgent: "reader", // sandboxed, read-only
}
}
}This enables safe observation while awaiting owner decision.
Use Cases
- Security: Owner wants to approve every group before bot engages
- Logging: Track all group additions for audit purposes
- Safe observation: Read client chats without responding until configured
- Injection protection: Use sandboxed reader-agent for untrusted groups
Related
- Feature: Auto-leave WhatsApp groups not in allowlist + group-join webhook #8495 (Auto-leave WhatsApp groups + group-join webhook)
- DM pairing already exists and works well; this extends the pattern to groups
Current Workaround
- Set
groups: "*"with emptygroupAllowFromto see all but respond to none - Manually check logs for new group additions
- No notification mechanism exists
Environment
- OpenClaw 2026.2.x
- Telegram + WhatsApp channels
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
Type
Fields
Give feedbackNo fields configured for issues without a type.