Skip to content

debug: log bindings summary before resolveAgentRoute (issue #135)#137

Open
Jefsky wants to merge 1 commit into
Tencent:mainfrom
Jefsky:fix/bindings-routing-ignore
Open

debug: log bindings summary before resolveAgentRoute (issue #135)#137
Jefsky wants to merge 1 commit into
Tencent:mainfrom
Jefsky:fix/bindings-routing-ignore

Conversation

@Jefsky
Copy link
Copy Markdown

@Jefsky Jefsky commented May 9, 2026

Debug logging for Issue #135

This PR adds debug logging to help diagnose why WeChat messages always route to the main agent regardless of binding rules.

Changes

  • Log the full bindings[] array from deps.config before calling resolveAgentRoute
  • Log the resolved matchedBy field in the result (indicates which routing tier matched)
  • Log channel, accountId, and peer parameters passed to resolveAgentRoute

How to test

  1. Apply this PR
  2. Enable debug logging in gateway
  3. Send a WeChat DM to the bot
  4. Check logs for:
    • resolveAgentRoute: channel=openclaw-weixin ... bindings=[...] — shows effective bindings
    • resolveAgentRoute result: ... matchedBy=... — shows which tier matched

If matchedBy is default instead of binding.peer, the binding is not matching for WeChat DMs.

Issue: #135

Add debug logging before resolveAgentRoute to expose the effective
bindings array and routing parameters. This helps diagnose why WeChat
messages always route to the main agent regardless of binding rules.

The log shows:
- The full bindings[] array from deps.config
- The channel, accountId, and peer.id passed to resolveAgentRoute
- The matchedBy field in the result (indicates which tier matched)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant