Pre-submission checklist | 提交前检查
Problem Statement | 问题陈述
Bug Description | 问题描述
[hooks] tool_result_persist handler from memos-local-plugin returned a Promise; this hook is synchronous and the result was ignored.
[hooks] agent_end handler from memos-local-plugin failed: timed out after 30000ms
How to Reproduce | 如何重现
1. Run OpenClaw 2026.5.18 with memos-local-plugin 2.0.5
2. Have the Agent complete any conversation turn
3. Check Gateway logs — both warnings appear on every turn
Environment | 环境信息
Environment:
- OpenClaw: 2026.5.18
- memos-local-plugin: 2.0.5
- Node.js: 22.22.2
- Platform: Linux (WSL2)
Additional Context | 其他信息
Root cause — Issue 1:
// adapters/openclaw/index.ts:307,async 声明导致 Promise 被忽略
In adapters/openclaw/index.ts line 307, the handler is declared as async. OpenClaw's hook runner calls isPromiseLike() on the return value and ignores it if it's a Promise. The handler should either be synchronous, or heavy work should be dispatched asynchronously without blocking the return.
// 建议修复:将耗时操作改为 fire-and-forget
api.on("tool_result_persist", (event, ctx) => {
backgroundPersist(event, ctx).catch(() => {}) // non-blocking
})
Root cause — Issue 2:
// OpenClaw 硬编码 30 秒超时,暂时无法通过配置调整
OpenClaw hard-codes DEFAULT_VOID_HOOK_TIMEOUT_MS_BY_HOOK = { agent_end: 3e4 } with no public config override. memos's agent_end chain includes SQLite writes and vector embedding operations, which occasionally exceed this threshold under I/O pressure.
Willingness to Implement | 实现意愿
Pre-submission checklist | 提交前检查
Problem Statement | 问题陈述
Bug Description | 问题描述
[hooks] tool_result_persist handler from memos-local-plugin returned a Promise; this hook is synchronous and the result was ignored.[hooks] agent_end handler from memos-local-plugin failed: timed out after 30000msHow to Reproduce | 如何重现
Environment | 环境信息
Environment:
Additional Context | 其他信息
Root cause — Issue 1:
// adapters/openclaw/index.ts:307,async 声明导致 Promise 被忽略
In adapters/openclaw/index.ts line 307, the handler is declared as async. OpenClaw's hook runner calls isPromiseLike() on the return value and ignores it if it's a Promise. The handler should either be synchronous, or heavy work should be dispatched asynchronously without blocking the return.
// 建议修复:将耗时操作改为 fire-and-forget
Root cause — Issue 2:
// OpenClaw 硬编码 30 秒超时,暂时无法通过配置调整
OpenClaw hard-codes DEFAULT_VOID_HOOK_TIMEOUT_MS_BY_HOOK = { agent_end: 3e4 } with no public config override. memos's agent_end chain includes SQLite writes and vector embedding operations, which occasionally exceed this threshold under I/O pressure.
Willingness to Implement | 实现意愿