Skip to content

DM messages don't route to gateway — agents can't reply #30

@kagura-agent

Description

@kagura-agent

Bug

When a user sends a Direct Message to an agent, the message is only stored in SQLite and broadcast locally. It is NOT routed to the OpenClaw gateway, so the agent never receives it and can't reply.

Channel messages work correctly because they go through the gateway.

Root Cause

handleSendDm() in server/src/router.ts only does:

  1. Insert into direct_messages table
  2. Broadcast dm_message event

Missing: forward to gateway via this.gateway.sendChat()

Expected

DM to an agent should route through the gateway and the agent's response should be stored as a DM reply.

Steps to Reproduce

  1. Open Workshop UI
  2. Go to Direct Messages
  3. Send a message to an agent (e.g. kagura)
  4. Message appears but no reply comes back

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions