openclaw - 💡(How to fix) Fix [Bug] New binding added after Gateway startup never applies to routing — always falls back to main agent [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#78527Fetched 2026-05-07 03:35:54
View on GitHub
Comments
1
Participants
2
Timeline
1
Reactions
2
Timeline (top)
commented ×1

New bindings entries added while Gateway is running are never applied to message routing, even after full Gateway restart. Messages always fall back to main agent.

Root Cause

New bindings entries added while Gateway is running are never applied to message routing, even after full Gateway restart. Messages always fall back to main agent.

Fix Action

Workaround

None found. Only workaround is to configure all agents+bindings before first Gateway startup, then never add new ones.

Code Example

key: "agent:main:feishu:lina:direct:ou_3ef1a7095ff49dbabc6ef8582501b0c4"
kind: "other"
channel: "unknown"
transcriptPath: "/Users/xuda/.openclaw/agents/main/sessions/xxx.jsonl"

---

config change detected; evaluating reload (agents.list, tools.agentToAgent.allow, bindings, channels.feishu.accounts.lina)
config hot reload applied (channels.feishu.accounts.lina)
RAW_BUFFERClick to expand / collapse

OpenClaw Binding Bug Report

Summary

New bindings entries added while Gateway is running are never applied to message routing, even after full Gateway restart. Messages always fall back to main agent.

Environment

  • OpenClaw version: (need to check)
  • Gateway mode: local
  • Channel: Feishu (WebSocket)
  • OS: macOS

Steps to Reproduce

  1. Start Gateway with existing agents (e.g., main, analyst) and bindings configured
  2. Add a new agent (lina) with:
    • agents.list entry
    • bindings entry: { "agentId": "lina", "match": { "channel": "feishu", "accountId": "lina" } }
    • channels.feishu.accounts.lina with valid credentials
  3. Restart Gateway (openclaw gateway restart or stop && start)
  4. Send message to the new bot via Feishu

Expected Behavior

Message should be routed to agent:lina (session key: agent:lina:feishu:lina:direct:ou_xxx)

Actual Behavior

Message is routed to agent:main (session key: agent:main:feishu:lina:direct:ou_xxx)

Evidence

Session routing wrong:

key: "agent:main:feishu:lina:direct:ou_3ef1a7095ff49dbabc6ef8582501b0c4"
kind: "other"
channel: "unknown"
transcriptPath: "/Users/xuda/.openclaw/agents/main/sessions/xxx.jsonl"

Config is correct:

  • agents.list includes lina
  • bindings includes lina entry (even moved to first position)
  • channels.feishu.accounts.lina has valid appId/appSecret

Gateway logs show:

config change detected; evaluating reload (agents.list, tools.agentToAgent.allow, bindings, channels.feishu.accounts.lina)
config hot reload applied (channels.feishu.accounts.lina)

Note: bindings is detected but never "applied". Only the account config gets hot-reloaded.

Existing agents work fine:

analyst, mom, dad, yexiaoyi were all configured before first Gateway startup and route correctly.

What was tried (all failed)

  1. gateway restart — binding still not applied
  2. gateway stop && sleep 2 && gateway start — still routes to main
  3. Delete session cache from main agent — first message still goes to main
  4. Move lina binding to first position in bindings array — no effect
  5. Remove old "mixed-shape" top-level channel config (moved appId/appSecret into accounts.default) — no effect
  6. Completely remove old agent (linabell) and recreate as new (lina) with fresh workspace — no effect

Hypothesis

OpenClaw only loads bindings into the routing table once during initial Gateway startup. Any binding added after first startup is never registered, even across restarts. This may be related to how LaunchAgent/service restarts cache the initial config state.

Related Issues

  • Possibly #29666 — Multi-account routing without explicit bindings
  • Possibly #12031 — Bindings only work for new sessions

Workaround

None found. Only workaround is to configure all agents+bindings before first Gateway startup, then never add new ones.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix [Bug] New binding added after Gateway startup never applies to routing — always falls back to main agent [1 comments, 2 participants]