Skip to content

bug(discord): bot-to-bot @mention in multibot-mentions thread silently dropped #949

@neonvision7724

Description

@neonvision7724

Description

When Bot A mentions Bot B inside a thread that Bot A does not own (thread was created by a human user or another bot), Bot B silently ignores the mention. However, if a human user copy-pastes the exact same message content (including the <@BOT_B_ID> mention), Bot B responds correctly.

Steps to Reproduce

  1. Human user creates a thread by @mentioning Bot A (e.g. Anis) in a channel
  2. Bot A completes its task and sends a message mentioning Bot B (e.g. Rapi): <@BOT_B_ID> please review this PR
  3. Bot B does not respond — no reaction, no thread activity
  4. Human user copies Bot A's exact message text and pastes it in the same thread
  5. Bot B responds correctly

Expected Behavior

Bot B should process the mention from Bot A and respond, since:

  • Bot B has allow_bot_messages = "mentions" configured
  • Bot B has allow_user_messages = "multibot-mentions" configured
  • Bot A explicitly @mentions Bot B by Discord user ID
  • Both bots share the same allowed_role_ids and the mentioning bot has the required role

Actual Behavior

Bot B silently drops the message from Bot A. No error in logs, no reaction. The same message content from a human user triggers a response.

Configuration (Bot B — the one that should respond)

[discord]
bot_token = "${DISCORD_BOT_TOKEN}"
allow_bot_messages = "mentions"
allowed_role_ids = ["1504213593523224867"]
allow_user_messages = "multibot-mentions"

[reactions]
tool_display = "compact"

Environment

  • OpenAB version: stable (Docker image ghcr.io/openabdev/openab:stable)
  • Deployment: Zeabur template (independent containers per agent)
  • Platform: Discord
  • Thread type: Human-created thread (human @mentioned Bot A to start)
  • Both bots have the same allowed_role_ids role assigned in Discord server settings

Additional Context

  • This occurs in a multi-agent setup with 5 bots in the same server
  • The mentioning bot (Bot A) is a Claude Code agent (claude-agent-acp)
  • The target bot (Bot B) is an OpenCode agent (opencode acp)
  • The thread was created when the human mentioned Bot A — so Bot A owns the thread
  • Bot B has never participated in this thread before the mention

Possible Cause

The bot message filter pipeline may be checking thread ownership before processing allow_bot_messages = "mentions". If Bot B is not the thread owner and has never participated, the message might be dropped before reaching the bot-message-mentions check.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdiscordp3Low — nice to have

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions