Skip to content

[BUG] agent_end hook blocked in OpenClaw — smartExtraction and memoryReflection silently fail #707

@jlin53882

Description

@jlin53882

Bug Description

When memory-lancedb-pro is installed as a non-bundled plugin in OpenClaw, the agent_end typed hook is silently blocked at runtime. This causes smartExtraction and memoryReflection to never fire, with no error shown to the user.

Root Cause

OpenClaw's plugin registry enforces a security policy: non-bundled plugins that register conversation-accessing typed hooks (agent_end, llm_input, llm_output, before_agent_finalize) must explicitly opt-in with allowConversationAccess: true.

If not set, the hook is silently dropped — no error is thrown, no user-facing message appears. The only trace is this warning in the gateway log:

typed hook "agent_end" blocked because non-bundled plugins must set
plugins.entries.memory-lancedb-pro.hooks.allowConversationAccess=true

Reproduction Steps

  1. Install memory-lancedb-pro as an external plugin in OpenClaw (not bundled)
  2. Enable smartExtraction: true or sessionStrategy: "memoryReflection" in plugin config
  3. Observe in the gateway log that the hooks are blocked with the message above
  4. Confirm that no memory entries are created after conversations end

Expected Behavior

  • smartExtraction should extract structured facts after each conversation turn
  • memoryReflection should store session summaries to LanceDB
  • Either: hooks should work out of the box, OR the user should see a clear error at startup (not a silent warning)

Workaround

Add hooks.allowConversationAccess: true to the plugin entry in openclaw.json:

"plugins": {
  "entries": {
    "memory-lancedb-pro": {
      "enabled": true,
      "hooks": {
        "allowConversationAccess": true
      },
      "config": {
        "sessionStrategy": "memoryReflection",
        "smartExtraction": true
      }
    }
  }
}

Suggested Fix (Priority Order)

  1. Best: In the plugin's README / integration docs, clearly document the required config path (plugins.entries.memory-lancedb-pro.hooks.allowConversationAccess=true) so users know to add it
  2. Better: At plugin startup, detect if it's running under OpenClaw (non-bundled) and push a user-facing warning via the plugin API when hooks are blocked
  3. Good: Add a preflight check in onLoad / setup entry that validates typed hooks are not blocked

Environment

  • OpenClaw version: 1.1.0-beta.10+
  • memory-lancedb-pro version: latest
  • Platform: Windows (WSL2)
  • Plugin installation: external (non-bundled)

Gateway Log Sample

[registry] typed hook "agent_end" blocked because non-bundled plugins must set
  plugins.entries.memory-lancedb-pro.hooks.allowConversationAccess=true
[memory-lancedb-pro] runMemoryReflection skipped: agentEndHooksDisabled

Metadata

Metadata

Assignees

No one assigned

    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