openclaw - 💡(How to fix) Fix [Feature]: Feature Request: Feishu Multi-Agent @Mention Routing in Group Chats [1 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#49467Fetched 2026-04-08 00:54:58
View on GitHub
Comments
0
Participants
1
Timeline
6
Reactions
0
Author
Participants
Timeline (top)
cross-referenced ×2mentioned ×2labeled ×1subscribed ×1

When multiple OpenClaw agents (each as a separate Feishu bot app) are in the same Feishu group chat, @mentioning a specific bot does not route the message to the corresponding agent. All messages in the group are dispatched to the single agent bound to that chatId, regardless of which bot was mentioned.

Root Cause

Root cause: resolveAgentRoute() only considers chatId — doesn't differentiate by which Feishu app (appId) received the event.

Fix Action

Fix / Workaround

When multiple OpenClaw agents (each as a separate Feishu bot app) are in the same Feishu group chat, @mentioning a specific bot does not route the message to the corresponding agent. All messages in the group are dispatched to the single agent bound to that chatId, regardless of which bot was mentioned.

RAW_BUFFERClick to expand / collapse

Summary

Summary

When multiple OpenClaw agents (each as a separate Feishu bot app) are in the same Feishu group chat, @mentioning a specific bot does not route the message to the corresponding agent. All messages in the group are dispatched to the single agent bound to that chatId, regardless of which bot was mentioned.

Problem to solve

Current Behavior

  • User @Nebula "analyze this data" → Routes to default agent (Gamora)
  • User @Drax "write a script" → Routes to default agent (Gamora)
  • The @mentioned bot's identity is ignored in routing

Root cause: resolveAgentRoute() only considers chatId — doesn't differentiate by which Feishu app (appId) received the event.

Proposed solution

Proposed Solution

Add per-account default agent mapping: json { "channels": { "feishu": { "accounts": { "nebula": { "appId": "cli_xxx", "defaultAgent": "analyst" }, "drax": { "appId": "cli_yyy", "defaultAgent": "coder" } } } } }

Alternatives considered

No response

Impact

When a group message arrives on account nebula, route to analyst agent.

Impact

Enables natural multi-agent collaboration on Feishu. Currently users must use Discord for @mention routing, which isn't ideal for teams on Feishu.

Environment

  • OpenClaw: 2026.3.11
  • Channel: Feishu
  • Use case: 6-agent team with specialized roles

Evidence/examples

No response

Additional information

No response

extent analysis

Fix Plan

To fix the issue, we need to modify the resolveAgentRoute() function to consider both chatId and appId when routing messages. Here are the steps:

  • Update the resolveAgentRoute() function to accept appId as an additional parameter.
  • Create a mapping of appId to default agent, as proposed in the solution.
  • Use this mapping to route messages to the correct agent based on the appId of the mentioned bot.

Example code:

def resolveAgentRoute(chatId, appId, message):
    # Load the account mapping
    account_mapping = {
        "nebula": {"appId": "cli_xxx", "defaultAgent": "analyst"},
        "drax": {"appId": "cli_yyy", "defaultAgent": "coder"}
    }
    
    # Get the mentioned bot's appId
    mentioned_app_id = get_mentioned_app_id(message)
    
    # Route the message to the correct agent
    if mentioned_app_id in [account["appId"] for account in account_mapping.values()]:
        for account, config in account_mapping.items():
            if config["appId"] == mentioned_app_id:
                return config["defaultAgent"]
    # Fallback to default agent if no match found
    return "Gamora"

def get_mentioned_app_id(message):
    # Implement logic to extract the mentioned bot's appId from the message
    pass

Verification

To verify the fix, test the following scenarios:

  • Send a message to a group chat with multiple bots, mentioning a specific bot.
  • Verify that the message is routed to the correct agent based on the mentioned bot's appId.
  • Test with different bots and agents to ensure the routing is correct.

Extra Tips

  • Make sure to update the account_mapping to include all the necessary appId and default agent mappings.
  • Consider implementing a fallback mechanism to handle cases where the mentioned bot's appId is not found in the mapping.

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