Skip to content

[Feature Request] Group pairing flow: notify owner + read-only mode for unconfigured groups #11489

@napetrov

Description

@napetrov

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

  1. Security: Owner wants to approve every group before bot engages
  2. Logging: Track all group additions for audit purposes
  3. Safe observation: Read client chats without responding until configured
  4. Injection protection: Use sandboxed reader-agent for untrusted groups

Related

Current Workaround

  • Set groups: "*" with empty groupAllowFrom to 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions