Skip to content

[Bug]: Active Memory plugin configured and loaded but not triggering/injecting memory on conversational sessions #65159

Description

@oldjs

Bug type

Bug

Summary

Active Memory plugin is properly configured, enabled, and shows as `loaded` / `activated` with 1 hook registered, but does not inject any `<active_memory_plugin>` context into conversational sessions. The agent sees no memory injection at all despite the plugin appearing fully operational.

Environment

  • OpenClaw version: 2026.4.10 (44e5b62)
  • OS: Linux 5.10.134 (x64), container environment
  • Channel: Discord direct message
  • Model: glm-turbo (self/glm-turbo)

Steps to Reproduce

  1. Configure active-memory per official docs:
{
  "plugins": {
    "entries": {
      "active-memory": {
        "enabled": true,
        "config": {
          "enabled": true,
          "agents": ["main"],
          "allowedChatTypes": ["direct"],
          "modelFallbackPolicy": "default-remote",
          "queryMode": "recent",
          "promptStyle": "balanced",
          "timeoutMs": 15000,
          "maxSummaryChars": 220,
          "persistTranscripts": false,
          "logging": true
        }
      }
    }
  }
}
  1. Restart gateway with `openclaw gateway --force`
  2. Verify plugin is loaded:
    • `openclaw plugins list` → shows active-memory as "loaded"
    • `openclaw plugins info active-memory` → status: loaded, hookCount: 1, activated: true
  3. Send a message in a Discord DM session
  4. Check the agent reply — no `<active_memory_plugin>` tags injected into system context

Expected Behavior

The Active Memory plugin should:

  1. Run its blocking memory sub-agent before the main reply
  2. Inject relevant memory as hidden `<active_memory_plugin>...` context
  3. Show verbose output like `🧩 Active Memory: ok 842ms recent 34 chars` when `/verbose on` is enabled

Actual Behavior

  • Plugin shows as loaded and activated
  • hookCount: 1 (before_prompt_build hook)
  • No memory injection occurs in conversational replies
  • Agent system context contains no active memory tags
  • No verbose output lines for Active Memory

Observations

  • `openclaw plugins info active-memory --json` shows `hookNames: []` despite `hookCount: 1` — this may indicate the hook is registered internally but not properly exposed
  • The model used is `glm-turbo` (a non-mainstream model) — the Active Memory sub-agent may inherit this model and fail silently (returning NONE)
  • `config.validate` passes without errors
  • Memory search itself works fine (manual `memory_search` tool calls return results)

Possible Root Causes

  1. Model incompatibility: Active Memory sub-agent inherits `glm-turbo` which may not follow the expected response format, causing it to always return `NONE`
  2. Hook not firing: `hookNames` is empty despite `hookCount: 1` — the `before_prompt_build` hook may not be properly wired
  3. Chat type mismatch: The Discord direct session may not be classified as `"direct"` in the plugin's runtime check
  4. Session type filtering: The plugin doc says it only runs on "eligible interactive persistent chat sessions" — there may be additional runtime conditions not documented

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions