Issue: P2P messages stuck with replies=0 after gateway restart
Description
After running openclaw gateway restart, the main session stops processing p2p (direct message) messages. Messages are received and dispatched by the gateway, but the agent generates zero replies (replies=0). The session only recovers when a group chat message triggers the agent.
Environment
- OpenClaw version: 2026.3.24 (cff6dc9)
- OS: Ubuntu (Linux 6.8.0-55-generic)
- Channel: Feishu (Lark)
- Model: openrouter/xiaomi/mimo-v2-pro
Reproduction Steps
- Have an active p2p session with the bot (via Feishu DM)
- From the agent session, run
openclaw gateway restart (e.g., to reload plugin config)
- Gateway restarts successfully
- Send a p2p message to the bot
- Observe: Gateway logs show
dispatching to agent (session=agent:main:main) followed by dispatch complete (replies=0, elapsed=XXXms)
- The bot does NOT reply to the p2p message
- Now send a group chat message mentioning the bot
- Observe: The bot responds in the group AND the queued p2p messages suddenly get processed and replied to
Expected Behavior
After gateway restart, the main session should automatically resume processing queued p2p messages without requiring a group chat message as a "wake-up signal."
Actual Behavior
- P2P messages are received by gateway ✅
- P2P messages are dispatched to
agent:main:main session ✅
- Session processes messages but returns
replies=0 ❌
- Only recovers when a group message triggers the agent ❌
Relevant Logs
# After gateway restart, p2p messages arrive:
Apr 01 18:07:55 feishu[default]: dispatching to agent (session=agent:main:main)
Apr 01 18:07:55 feishu[default]: dispatch complete (replies=0, elapsed=448ms)
Apr 01 18:08:14 feishu[default]: dispatching to agent (session=agent:main:main)
Apr 01 18:08:14 feishu[default]: dispatch complete (replies=0, elapsed=581ms)
# After group chat @mention, everything works again:
Apr 01 18:23:51 feishu[default]: dispatching to agent (session=agent:main:main)
Apr 01 18:23:51 feishu[default]: dispatch complete (replies=0, elapsed=528ms)
# (group session processes, then p2p session starts responding)
Hypothesis
The gateway restart disconnects the main session's message consumption loop. New p2p messages are queued but the session's event loop doesn't resume processing them. A group chat interaction somehow flushes/wakes the main session's queue.
Workaround
After every openclaw gateway restart, send a message in a group chat that mentions the bot. This "wakes up" the main session and processes all queued p2p messages.
Impact
Users who frequently restart the gateway (e.g., to reload plugin configurations) will find their p2p conversations completely unresponsive until they happen to interact via group chat.
Issue: P2P messages stuck with replies=0 after gateway restart
Description
After running
openclaw gateway restart, the main session stops processing p2p (direct message) messages. Messages are received and dispatched by the gateway, but the agent generates zero replies (replies=0). The session only recovers when a group chat message triggers the agent.Environment
Reproduction Steps
openclaw gateway restart(e.g., to reload plugin config)dispatching to agent (session=agent:main:main)followed bydispatch complete (replies=0, elapsed=XXXms)Expected Behavior
After gateway restart, the main session should automatically resume processing queued p2p messages without requiring a group chat message as a "wake-up signal."
Actual Behavior
agent:main:mainsession ✅replies=0❌Relevant Logs
Hypothesis
The gateway restart disconnects the main session's message consumption loop. New p2p messages are queued but the session's event loop doesn't resume processing them. A group chat interaction somehow flushes/wakes the main session's queue.
Workaround
After every
openclaw gateway restart, send a message in a group chat that mentions the bot. This "wakes up" the main session and processes all queued p2p messages.Impact
Users who frequently restart the gateway (e.g., to reload plugin configurations) will find their p2p conversations completely unresponsive until they happen to interact via group chat.