openclaw - ✅(Solved) Fix Discord: requireMention 配置在 ACP session 启动后失效 [1 pull requests, 6 comments, 4 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#50990Fetched 2026-04-08 01:05:49
View on GitHub
Comments
6
Participants
4
Timeline
14
Reactions
0
Timeline (top)
commented ×6cross-referenced ×4closed ×1locked ×1

Fix Action

Fixed

PR fix notes

PR #51531: fix(discord): preserve requireMention for ACP thread sessions

Description (problem / solution / changelog)

Fixes #50990.

Preserves Discord requireMention for ACP-bound thread sessions by narrowing the bound-thread mention bypass to subagent bindings and bot-authored ACP relay/system messages only.

Adds regression coverage for both cases:

  • ACP-bound threads still require mention for user-authored messages
  • subagent-bound threads keep the existing mention bypass behavior

Changed files

  • extensions/discord/src/monitor/message-handler.preflight.test.ts (modified, +83/-0)
  • extensions/discord/src/monitor/message-handler.preflight.ts (modified, +17/-1)
RAW_BUFFERClick to expand / collapse

问题描述

在 Discord 频道中配置了 requireMention: true,当 ACP session 启动后,requireMention 配置失效。

环境

  • OpenClaw 版本:2026.3.13
  • Discord 插件

复现步骤

  1. 在 Discord 频道配置 requireMention: true(需要 @ 机器人才回复)
  2. 在该频道的 Thread 中对话,触发 ACP session 启动
  3. ACP session 启动后,requireMention 配置失效

预期行为

ACP session 启动后,应该继续遵守频道的 requireMention 配置

实际行为

ACP session 启动后,requireMention 配置被覆盖,不 @ 也会自动回复

备注

可能是 autoBindSpawnedDiscordSubagent 创建的 binding 没有正确继承 channel 的 requireMention 配置

extent analysis

Fix Plan

To resolve the issue of requireMention configuration being overridden after ACP session startup, we need to ensure that the autoBindSpawnedDiscordSubagent correctly inherits the channel's requireMention configuration.

Steps to Fix

  1. Update autoBindSpawnedDiscordSubagent creation logic:
    • When creating a new binding, explicitly set the requireMention property based on the channel's configuration.
  2. Modify the binding inheritance:
    • Ensure that the new binding inherits all relevant properties from the parent channel, including requireMention.

Example Code Snippet

// Assuming 'channel' is the Discord channel object and 'binding' is the new binding object
const requireMention = channel.requireMention;
// When creating the new binding, set its requireMention property
binding.requireMention = requireMention;

// Alternatively, if using a function to create the binding, ensure it inherits properties
function createBinding(channel) {
  const binding = {};
  // Inherit properties from the channel
  binding.requireMention = channel.requireMention;
  // Other properties...
  return binding;
}

Verification

  • Configure requireMention: true in a Discord channel.
  • Trigger an ACP session in the channel's thread.
  • Verify that the bot still requires a mention to respond after the ACP session starts.

Extra Tips

  • Review the autoBindSpawnedDiscordSubagent logic to ensure it handles channel configurations correctly.
  • Consider adding logging or debugging statements to monitor the requireMention property during ACP session startup.

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 - ✅(Solved) Fix Discord: requireMention 配置在 ACP session 启动后失效 [1 pull requests, 6 comments, 4 participants]