Pre-submission checklist | 提交前检查
Bug Description | 问题描述
The memos-local-plugin's "dreaming" feature performs LLM inference calls synchronously on the Gateway's main Node.js event loop. When processing orphan or dirty episodes, this blocks the event loop for extended periods (observed eventLoopMax of 3.5s+), causing WebSocket handshake timeouts for OpenClaw TUI and Control UI connections.
How to Reproduce | 如何重现
Steps to Reproduce
- Enable memos-local-plugin with dreaming enabled
- Accumulate a large number of episodes (30K+ traces in our case)
- Have one or more episodes enter an orphan/dirty state (e.g., r_task = NULL)
- Restart the openclaw gateway
- Attempt to connect via TUI or Control UI during dreaming processing
Observed Behavior
- OpenClaw Gateway event loop blocked for 3-5+ seconds during dreaming LLM calls
- WebSocket upgrade requests timeout (default 3s budget for read probe)
- TUI reports "cannot connect to gateway"
- Control UI login page fails to load
- Gateway logs show repeated Read probe: failed - timeout errors
- Orphan episodes with failed LLM calls are retried indefinitely with no backoff
Environment | 环境信息
- OpenClaw version: 2026.5.22
- OS: openeuler (systemd user service)
- memos.db size: 324MB, 30K+ traces
- Model provider: DeepSeek (v4-flash for dreaming)
Additional Context | 其他信息
No response
Willingness to Implement | 实现意愿
Pre-submission checklist | 提交前检查
Bug Description | 问题描述
The memos-local-plugin's "dreaming" feature performs LLM inference calls synchronously on the Gateway's main Node.js event loop. When processing orphan or dirty episodes, this blocks the event loop for extended periods (observed eventLoopMax of 3.5s+), causing WebSocket handshake timeouts for OpenClaw TUI and Control UI connections.
How to Reproduce | 如何重现
Steps to Reproduce
Observed Behavior
Environment | 环境信息
Additional Context | 其他信息
No response
Willingness to Implement | 实现意愿