Bug Description
After applying a config change via SIGUSR1 (hot-reload), the Mattermost WebSocket monitor continues to receive messages but routes them to incorrect sessions, causing replies to be silently dropped (never delivered to the channel).
Steps to Reproduce
- Have an OpenClaw gateway running with
channels.mattermost configured (chatmode: "onmessage")
- Bot is a member of multiple MM channels (e.g.,
office-general and a custom channel like protocol-evolution)
- Apply a config change via
SIGUSR1 (e.g., changing chatmode from oncall to onmessage)
- Send a message in the custom channel
Expected Behavior
Bot receives the message, agent processes it, and the reply is delivered back to the same channel.
Actual Behavior
- The gateway log shows
config hot reload applied (channels.mattermost.chatmode) — config change is accepted
- The MM WebSocket connection stays alive (TCP ESTABLISHED)
- Messages are received and the agent runs successfully (generates reply text)
- But the reply is never delivered to the channel — no
delivered reply to channel:xxx log entry
- The session lane changes from the correct
session:agent:main:mattermost:channel:<channel_id> to a generic session:mm-<botname> with messageChannel= (empty)
- The agent's reply text appears in
gateway.log but is followed by silence instead of delivery confirmation
Workaround
A full gateway restart (launchctl kickstart -k / openclaw gateway stop && start) fixes the issue. Only SIGUSR1 hot-reload is affected.
Evidence from Logs
Before SIGUSR1 (working):
lane enqueue: lane=session:agent:main:mattermost:channel:4i7mryg4tffkijnamzrxjozbpc
[mattermost] delivered reply to channel:4i7mryg4tffkijnamzrxjozbpc
After SIGUSR1 (broken):
lane enqueue: lane=session:mm-rex queueSize=1
embedded run start: runId=xxx sessionId=mm-rex messageChannel=
# Agent generates reply "在,我这边在线。" but no delivery log follows
Environment
- OpenClaw version: 2026.2.15
- Node.js: v25.6.1
- OS: macOS (Darwin arm64)
- Mattermost: self-hosted, HTTP (not HTTPS)
- Config:
chatmode: "onmessage", dmPolicy: "open", groupPolicy: "open"
Bug Description
After applying a config change via
SIGUSR1(hot-reload), the Mattermost WebSocket monitor continues to receive messages but routes them to incorrect sessions, causing replies to be silently dropped (never delivered to the channel).Steps to Reproduce
channels.mattermostconfigured (chatmode: "onmessage")office-generaland a custom channel likeprotocol-evolution)SIGUSR1(e.g., changingchatmodefromoncalltoonmessage)Expected Behavior
Bot receives the message, agent processes it, and the reply is delivered back to the same channel.
Actual Behavior
config hot reload applied (channels.mattermost.chatmode)— config change is accepteddelivered reply to channel:xxxlog entrysession:agent:main:mattermost:channel:<channel_id>to a genericsession:mm-<botname>withmessageChannel=(empty)gateway.logbut is followed by silence instead of delivery confirmationWorkaround
A full gateway restart (
launchctl kickstart -k/openclaw gateway stop && start) fixes the issue. OnlySIGUSR1hot-reload is affected.Evidence from Logs
Before SIGUSR1 (working):
After SIGUSR1 (broken):
Environment
chatmode: "onmessage",dmPolicy: "open",groupPolicy: "open"