Skip to content

bug(discord): thread owner stops answering un-mentioned messages in multibot-mentions threads (docs say it should) #1566

Closed as not planned

Description

@henriemore

Summary

In multibot-mentions mode, the bot that owns a thread stops answering un-mentioned messages as soon as any other bot posts there. docs/discord.md disagrees with itself on what should happen:

  • The comparison table under allow_user_messages (Multi-bot thread, no @mention → ❌) matches the code.
  • The allowed_role_ids section ("Follow-up in the thread without @mention → Only the thread owner responds") describes the behaviour we expected.

The code (crates/openab-core/src/discord.rs, AllowUsers::MultibotMentions, ~L801-822 on main at 8b6bf29) treats the owner like any other bot: bot_owns_thread sets involved = true, but other_bot still returns early.

Why it matters

The common multi-bot pattern is: chat with bot A in its own thread, then @mention bot B once for a second opinion. After B replies, A needs an @mention on every message for the rest of the thread, because the multi-bot flag is persisted and never clears. The owner loses the natural, mention-free conversation that multibot-mentions is meant to keep.

Proposed fix (opt-in, default = today's behaviour)

A [discord] setting thread_owner_involved (bool, default false). When true, for an un-mentioned message in a thread, these rules apply before the normal gate:

  1. If the message @mentions a different bot (a user mention, or that bot's managed role), every bot ignores it, because the human is addressing that bot.
  2. Otherwise, if this bot owns the thread (owner_id), it answers, even if other bots have posted.
  3. Otherwise the normal multibot-mentions gate applies, so a non-owner bot still needs a mention.

This changes only which bot answers a message that has already been admitted. allowed_users, allow_bot_messages and trusted_bot_ids are untouched.

We have run this (plus some unrelated additions) on six bot families in production since 2026-10-21, with live tests of: the owner keeps answering after a guest bot posts; a message addressed to the guest is ignored by the owner; a guest still needs a mention. The rule itself is a small pure function plus about ten lines in the handler, with unit tests.

Happy to open a PR with just this rule (setting, gate change, tests, and a docs fix for the two contradicting sections) if you'd like it. Or, if you'd rather keep the current behaviour, the allowed_role_ids table row should probably be corrected instead.

Activity

  1. github-actions commented on Oct 21, 2026

    @github-actions

    ⚠️ This issue is missing the following required information and will not be processed until completed:

    • Steps to Reproduce
    • Expected Behavior

    Please edit this issue to fill in the missing fields. Thank you!

    Tip: Use headings like ## Description or ### Description — common synonyms (e.g. ## Problem, ## Reproduction, ## Motivation) are also accepted.

  2. chaodu-agent commented on Oct 28, 2026

    @chaodu-agent
    Collaborator

    Thanks for the report. It is complete; the incomplete label was applied by the automated template heading check, so it is being removed.

    • The docs contradiction is fixed in docs: note Kiro API-key MCP issue and fix multibot thread-owner docs #1585: docs/discord.md now matches the current multibot-mentions behavior (once another bot has posted in the thread, the thread owner also needs an @mention).
    • The proposed opt-in thread_owner_involved setting is a behavior change and needs a design discussion before implementation, so this issue stays open to track it.

    Removing incomplete and needs-triage.

  3. chaodu-agent commented on Oct 30, 2026

    @chaodu-agent
    Collaborator

    Thanks for the detailed report.

    • The documentation contradiction is fixed in docs: note Kiro API-key MCP issue and fix multibot thread-owner docs #1585 (merged as 017ed21). docs/discord.md now describes the current behavior: in a multibot-mentions thread, once another bot has posted, the thread owner also needs an @mention to reply.
    • After review, we are keeping that behavior for now. Changing who answers un-mentioned messages in multi-bot threads affects every deployment that uses this mode, so it should not change by default.

    If you need the owner to keep answering, an opt-in setting (for example [discord] thread_owner_involved, off by default) would be welcome as a pull request. Please reference this issue in it.

    Closing as not planned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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