Skip to content

Multi-agent routing bindings are ignored - messages always go to main agent #6602

@pelosm

Description

@pelosm

Multi-agent routing bindings are ignored - messages always go to main agent

Description

Peer-level bindings for routing specific groups to specific agents are completely ignored. All messages route to the main agent regardless of binding configuration, even when the binding shows correctly in openclaw agents list --bindings.

Environment

  • OpenClaw version: 2026.1.30
  • OS: Debian (Hetzner VPS)
  • Channels affected: Signal and WhatsApp (both tested)

Steps to Reproduce

  1. Create a multi-agent setup with two agents:
{
  "agents": {
    "list": [
      {
        "id": "main",
        "sandbox": { "mode": "all", "docker": { "binds": [] } }
      },
      {
        "id": "truth",
        "workspace": "/project",
        "sandbox": { "mode": "all", "docker": { "binds": ["/root/ground_truth:/project:ro"] } }
      }
    ]
  }
}
  1. Add bindings to route a specific Signal group to the truth agent:
{
  "bindings": [
    {
      "agentId": "truth",
      "match": {
        "channel": "signal",
        "accountId": "default",
        "peer": {
          "kind": "group",
          "id": "<SIGNAL_GROUP_ID_REDACTED>"
        }
      }
    },
    {
      "agentId": "main",
      "match": {
        "channel": "signal",
        "accountId": "default"
      }
    }
  ]
}
  1. Verify bindings are recognized:
$ openclaw agents list --bindings

Agents:
- main (default)
  Routing rules: 1
  Routing rules:
    - signal accountId=default
- truth (Truth AI)
  Routing rules: 1
  Routing rules:
    - signal accountId=default peer=group:<SIGNAL_GROUP_ID_REDACTED>
  1. Clear all sessions and restart gateway:
rm -f ~/.openclaw/agents/*/sessions/*.jsonl
echo "{}" > ~/.openclaw/agents/main/sessions/sessions.json
echo "{}" > ~/.openclaw/agents/truth/sessions/sessions.json
openclaw gateway restart
  1. Send a message to the Signal group

  2. Check sessions:

$ openclaw sessions

Session store: /root/.openclaw/agents/main/sessions/sessions.json
Sessions listed: 1
Kind   Key                        Age
group  agent:main:signal:group:<REDACTED>  just now

Expected Behavior

According to the documentation, "peer bindings always win" over channel-level bindings. The message to the Signal group <SIGNAL_GROUP_ID_REDACTED> should create a session at agent:truth:signal:group:... and be handled by the truth agent.

Actual Behavior

  • The session is created at agent:main:signal:group:...
  • The truth agent's session store remains empty ({})
  • All messages go to main regardless of peer binding configuration
  • No routing evaluation appears in logs - messages go directly to main

Additional Context

  • The group ID was verified to match exactly between the binding config and the session key
  • Tested with both Signal and WhatsApp - neither channel respects bindings
  • Tested with and without accountId in the binding
  • Tested with explicit channel-level fallback bindings
  • openclaw agents list --bindings shows the bindings are recognized, but they're never applied at runtime
  • Gateway logs show no routing decision - just direct assignment to main

Workaround Attempted

None found. The only working isolation is Docker sandbox with empty binds, but this doesn't allow routing different groups to different agents with different file access.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions