Skip to content

[Bug]: dmScope setting removed on gateway restart #15146

Description

@Scchh

Version: 2026.2.12
OS: Ubuntu 22.04 (Linux 6.8.0-100-generic)

Description

The dmScope configuration setting is being removed every time the gateway restarts, despite the security audit recommending it to isolate Telegram DM sessions.

Expected Behavior

Setting dmScope: "per-channel-peer" should persist across gateway restarts and isolate DM sessions per sender.

Actual Behavior

After adding dmScope to configuration and restarting gateway:

• Setting disappears from openclaw.json
• Security audit continues to show: WARN Telegram DMs share the main session
• Tried multiple locations: • agents.defaults.session.dmScope
• agents.defaults.dmScope
• channels.telegram.dmScope

All get removed on restart.

Steps to Reproduce

  1. Add to ~/.openclaw/openclaw.json:
    "agents": {
    "defaults": {
    "session": {
    "dmScope": "per-channel-peer"
    }
    }
    }

  2. Run openclaw gateway restart

  3. Check config: cat ~/.openclaw/openclaw.json | grep dmScope

  4. Result: Setting is gone, audit still warns about shared sessions
    Configuration Context

Current dmPolicy is set to "pairing" which provides some protection, but dmScope isolation would be preferred for multi-user setups.

Related

• Security audit message: Set session.dmScope="per-channel-peer" to isolate DM sessions per sender
• Possibly related to #14389 which mentions dmScope in examples

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingstaleMarked as stale due to inactivity

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions