Summary
Discord-triggered agent handoffs are too permissive by default. Today, OpenClaw emits mention patterns that match plain agent-name variants, so sibling agents can be triggered in Discord without an actual @ mention.
Motivation
The current behavior makes cross-agent triggering too easy and increases the risk of accidental replies and feedback loops in shared channels.
Desired behavior
For Discord, require an explicit mention to trigger another agent.
Concretely:
- Native Discord mention syntax like
<@123> / <@!123> should continue to work.
- Plain name matches such as
tiverton should not count as a mention.
- Plain
@username text that is not a native Discord mention should not be treated as sufficient.
Constraints
- Keep existing non-Discord text mention behavior unchanged unless the code path proves they are coupled.
- Preserve current guild/channel
requireMention defaults and peer allowlists.
- Update tests to reflect the narrower Discord matcher.
Likely implementation area
internal/driver/openclaw/config.go
internal/driver/openclaw/config_test.go
Open questions
- If OpenClaw relies on text mention patterns for non-Discord platforms, we should scope the stricter change to Discord only.
Summary
Discord-triggered agent handoffs are too permissive by default. Today, OpenClaw emits mention patterns that match plain agent-name variants, so sibling agents can be triggered in Discord without an actual
@mention.Motivation
The current behavior makes cross-agent triggering too easy and increases the risk of accidental replies and feedback loops in shared channels.
Desired behavior
For Discord, require an explicit mention to trigger another agent.
Concretely:
<@123>/<@!123>should continue to work.tivertonshould not count as a mention.@usernametext that is not a native Discord mention should not be treated as sufficient.Constraints
requireMentiondefaults and peer allowlists.Likely implementation area
internal/driver/openclaw/config.gointernal/driver/openclaw/config_test.goOpen questions