We built a plugin (@andrewlabs/openclaw-messageguard-ml) that registers a message_sending hook via api.on("message_sending", ...) to scan and redact secrets in outgoing messages. The plugin loads fine and registers successfully, but the hook never fires — not for agent replies, not for message tool sends.
Specifically:
openclaw plugins list shows the plugin as loaded
The plugin logs "registered message_sending hook" at startup
But sending messages (both via the message tool and normal agent replies) passes through unfiltered — no hook invocation
What we're looking for: A hook that acts as outgoing middleware — intercepts the message content before it hits the channel (Telegram, Signal, etc.), lets us modify or cancel/mask it, regardless of whether it originated from an agent reply, the message tool, or any other send path.
Is message_sending the right hook for this? If so, what are we missing? If not, what's the correct approach?
Running OpenClaw 2026.2.23 on Linux.