Skip to content

[Bug]: bug(matrix): 2-person rooms incorrectly classified as DMs, causing message routing confusion #54772

@private-peter

Description

@private-peter

Bug type

Regression (worked before, now fails)

Summary

When a user has two separate 2-person Matrix rooms involving the same participants (e.g., a dedicated bot room and a topic-specific room), OpenClaw incorrectly treats both rooms as DMs based solely on member count. This causes replies to be routed to both rooms simultaneously, producing duplicate or out-of-context messages.

Steps to reproduce

  1. Create two Matrix rooms each with exactly 2 members (bot + same user)
  2. Mark only one as a DM in your Matrix client
  3. Send a message in the non-DM room → OpenClaw routes as if it were a DM

Expected behavior

A 2-person room should only be treated as a DM if it is explicitly marked as one (via m.direct or is_direct member state). Otherwise it should be handled as a regular group room.

Actual behavior

This causes replies to be routed to both rooms simultaneously, producing duplicate or out-of-context messages.

OpenClaw version

2026.3.23-2 (7ffe7e4)

Operating system

Ubuntu 24.04

Install method

No response

Model

chatgpt

Provider / routing chain

n/a

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

This makes multi-tasking impossible. The work around is to only do 1 task at a time.

Additional information

This is a regression of this previously reported issue: #30645. I can't comment on that issue as it is locked.

That issue was fixed here: https://github.com/openclaw/openclaw/pull/31023/files#r2991791467

It was then regressed here: 94693f7#r180612893

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingregressionBehavior that previously worked and now fails

    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