Skip to content

Auto-recall memories fetched but not injected into prompts (legacy before_agent_start hook) #112

@qyueihao

Description

@qyueihao

Problem Description

The memos-cloud-openclaw-plugin (v0.1.12) appears to fetch memories from MemOS Cloud but the memories are not reliably injected into the agent's prompt during conversation.

Evidence

  1. When running openclaw status, we see:

    WARN memos-cloud-openclaw-plugin still uses legacy before_agent_start; keep regression coverage on this plugin, and prefer before_model_resolve/before_prompt_build for new work.
    
  2. The plugin is hook-only and has not migrated to explicit capability registration.

Symptoms

  • Memories exist in MemOS Cloud (verified via API)
  • Manual curl search returns relevant memories
  • But during conversation, agent fails to recall relevant memories ("amnesia")
  • This matches the description in OpenClaw issue #48711: "Task and Memory Recall Is Often Too Weak to Trust Across Sessions"

Configuration

{
  "recallEnabled": true,
  "recallGlobal": true,
  "memoryLimitNumber": 10,
  "relativity": 0.35,
  "multiAgentMode": true,
  "allowedAgents": ["main", "huasheng"]
}

Expected Behavior

When auto-recall is enabled, relevant memories should be injected into the conversation prompt and visible to the LLM.

Actual Behavior

Memories are fetched but not reliably injected, causing agents to appear "amnesiac" even when relevant memories exist in MemOS.

Questions

  1. Is the legacy before_agent_start hook the cause of this issue?
  2. Is there a migration path to before_model_resolve or before_prompt_build?
  3. Are there known workarounds?

Environment

  • OpenClaw version: 2026.3.28
  • Plugin version: 0.1.12
  • Node.js: v22.22.1
  • Platform: Linux (Ubuntu)

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