Skip to content

[BUG] autoRecall stops firing after OpenClaw upgrade to 2026.3.28 (works in 3.24) #396

@jlin53882

Description

@jlin53882

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_build hook fires correctly
  • autoRecall injects memories into context
  • rerank server receives requests

OpenClaw 2026.3.28 (BROKEN)

  • openclaw plugins inspect memory-lancedb-pro shows 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 hooks
    
  • before_prompt_build hook 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

  1. Hook registration appears correct — the plugin's api.on("before_prompt_build", ...) registers without errors
  2. Plugin initialization succeeds — embedding test passes, retrieval test passes, FTS is enabled
  3. The issue is at the gateway event dispatch level — Discord messages arrive at gateway but do not trigger the before_prompt_build hook
  4. Only affects Discord channel messages — other event hooks like message_received also don't fire for Discord inbound
  5. Gateway hook runner shows only 2 hooks registered (likely command:new and command:reset), while before_prompt_build is registered but not executed
  6. The agent_end hook is not in the integrated hooks list — only command:new, command:reset, after_tool_call, before_prompt_build, session_end are 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_start is now deprecated in favor of before_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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions