-
Notifications
You must be signed in to change notification settings - Fork 595
Open
Description
Bug Description
After upgrading OpenClaw from 2026.3.24 to 2026.3.28, the before_prompt_build hook registered by memory-lancedb-pro no longer fires for Discord channel messages. As a result, autoRecall completely stops working.
Downgrading back to 2026.3.24 resolves the issue immediately.
Environment
- memory-lancedb-pro version: 1.1.0-beta.10 (installed via npm)
- OpenClaw version: 2026.3.28 (broken) → 2026.3.24 (works)
- Plugin install path:
~/.openclaw/extensions/memory-lancedb-pro - Database: LanceDB with FTS enabled
- rerankEndpoint:
http://127.0.0.1:18799/v1/rerank(local) - Channel: Discord (#ai-小助理, channel_id: 1476858065914695741)
Plugin Config
{
"autoCapture": true,
"autoRecall": true,
"autoRecallMinRepeated": 2,
"sessionStrategy": "memoryReflection",
"retrieval": {
"mode": "hybrid",
"rerank": "cross-encoder",
"bm25Weight": 0.3,
"vectorWeight": 0.7
},
"scopes": { "default": "global" },
"sessionMemory": { "enabled": false }
}Gateway config relevant part:
{
"hooks": {
"internal": {
"entries": {
"memory-reflection": { "enabled": true }
}
}
}
}Observed Behavior
OpenClaw 2026.3.24 (WORKS)
before_prompt_buildhook fires correctly- autoRecall injects memories into context
- rerank server receives requests
OpenClaw 2026.3.28 (BROKEN)
openclaw plugins inspect memory-lancedb-proshows hooks registered correctly:[plugins] memory-reflection: integrated hooks registered (command:new, command:reset, after_tool_call, before_prompt_build, session_end) [plugins] hook runner initialized with 2 registered hooksbefore_prompt_buildhook never fires — no log output, no rerank requests- Gateway receives Discord message events (confirmed via console), but no agent pipeline activity appears for the Discord channel
- The plugin itself initializes successfully:
embedding: OK, retrieval: OK, mode: hybrid, FTS: enabled
Diagnostic Observations
- Hook registration appears correct — the plugin's
api.on("before_prompt_build", ...)registers without errors - Plugin initialization succeeds — embedding test passes, retrieval test passes, FTS is enabled
- The issue is at the gateway event dispatch level — Discord messages arrive at gateway but do not trigger the
before_prompt_buildhook - Only affects Discord channel messages — other event hooks like
message_receivedalso don't fire for Discord inbound - Gateway hook runner shows only 2 hooks registered (likely
command:newandcommand:reset), whilebefore_prompt_buildis registered but not executed - The
agent_endhook is not in the integrated hooks list — onlycommand:new,command:reset,after_tool_call,before_prompt_build,session_endare registered
Expected Behavior
before_prompt_build should fire for every meaningful Discord channel message, enabling autoRecall to inject relevant memories before the agent processes the prompt.
Possible Related Changes in OpenClaw 2026.3.28
From the OpenClaw architecture docs:
before_agent_startis now deprecated in favor ofbefore_prompt_build- Hook event routing may have changed for Discord channel sessions with
session.dmScope: per-channel-peer - The
sessionStrategy: "memoryReflection"integration path may have been affected by internal changes
Tags
bug, auto-recall, hook-system, discord-channel, openclaw-2026.3.28
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels