Summary
message:received internal hooks do not fire when messages are received in Discord guild channels. They only fire for DMs and WhatsApp messages. Guild messages are routed directly to guild sessions, bypassing the hook event system.
Steps to Reproduce
- Create an internal hook listening for
message:received events
- Configure a Discord guild channel with
requireMention: false
- Send a message in that guild channel
- Observe: the hook handler is never called, but the guild session processes the message normally
Expected Behavior
message:received should fire for ALL inbound messages regardless of channel type (DM, guild, WhatsApp, Telegram, etc.). The hook should fire before or in parallel with the guild session processing.
Actual Behavior
- WhatsApp DM messages: hook fires ✅
- Discord DM messages: not tested
- Discord guild channel messages: hook does NOT fire ❌
Evidence from Logs
# WhatsApp message → hook fires
[discord-digest-hook] EVENT: type=message action=received channelId=whatsapp
[discord-digest-hook] SKIP: not discord (provider=whatsapp)
# Discord guild message → no hook event at all
# Only guild session processing visible:
diagnostic lane enqueue: lane=session:agent:research:discord:channel:1477142180622630952
agent/embedded run start: provider=anthropic model=claude-opus-4-6
Use Case
We want to use message:received hooks to intercept URLs dropped in specific Discord channels and spawn lightweight (Flash) agents for automated analysis, instead of having the full Opus agent process every message. This is a cost optimization pattern: R1 (mechanical) tasks should use cheap models, not the primary expensive model.
Environment
- OpenClaw: 2026.2.26
- Node: v22.22.0
- OS: Ubuntu (WSL2)
- Discord plugin: enabled, groupPolicy: allowlist
Workaround
Currently using guild sessions with requireMention: false, but this forces all messages through the primary agent (Opus) instead of allowing hook-based routing to cheaper models.
Summary
message:receivedinternal hooks do not fire when messages are received in Discord guild channels. They only fire for DMs and WhatsApp messages. Guild messages are routed directly to guild sessions, bypassing the hook event system.Steps to Reproduce
message:receivedeventsrequireMention: falseExpected Behavior
message:receivedshould fire for ALL inbound messages regardless of channel type (DM, guild, WhatsApp, Telegram, etc.). The hook should fire before or in parallel with the guild session processing.Actual Behavior
Evidence from Logs
Use Case
We want to use
message:receivedhooks to intercept URLs dropped in specific Discord channels and spawn lightweight (Flash) agents for automated analysis, instead of having the full Opus agent process every message. This is a cost optimization pattern: R1 (mechanical) tasks should use cheap models, not the primary expensive model.Environment
Workaround
Currently using guild sessions with
requireMention: false, but this forces all messages through the primary agent (Opus) instead of allowing hook-based routing to cheaper models.