Skip to content

Require explicit Discord mentions for agent-to-agent triggers #170

@mostlydev

Description

@mostlydev

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions