openclaw - ✅(Solved) Fix [Bug]: active-memory plugin crashes gateway when mx-claw plugin is enabled [1 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#64940Fetched 2026-04-12 13:26:15
View on GitHub
Comments
0
Participants
1
Timeline
2
Reactions
0
Participants
Timeline (top)
closed ×1cross-referenced ×1

Error Message

Error observed in logs:

Root Cause

active-memory spawns a dedicated memory sub-agent (agent:main:main:active-memory:xxx) right before each main reply (as documented in the 4.10 changelog: "gives OpenClaw a dedicated memory sub-agent right before the main reply").

When mx-claw plugin is enabled, mx-claw registers a before_agent_start hook that intercepts all agent startup events, including the active-memory sub-agent session. The mx-claw hook checks for a valid channelId on the session, but the active-memory sub-agent session does not carry the original webchat channelId, causing mx-claw to reject the session.

Error observed in logs:

sessionKey=agent:main:main:active-memory:xxx does not have a valid channelId or channelId does not belong to mx-claw

This creates a conflict between two plugins both trying to manage session lifecycle hooks.

Fix Action

Workaround

Remove active-memory from plugins.entries and plugins.allow to prevent the crash. mx-claw works normally without active-memory.

PR fix notes

PR #65049: Fix active-memory recall runs when mx-claw is enabled

Description (problem / solution / changelog)

Summary

  • preserve parent channel context when active-memory launches its recall sub-run
  • fall back to the parent session store entry when the hook only has a sessionId
  • add regression coverage for direct hook-context propagation and session-store fallback

Testing

  • OPENCLAW_LOCAL_CHECK=0 pnpm test extensions/active-memory/index.test.ts

Fixes #64940

Changed files

  • extensions/active-memory/index.test.ts (modified, +77/-2)
  • extensions/active-memory/index.ts (modified, +35/-15)
  • extensions/msteams/src/channel.test.ts (modified, +1/-1)

Code Example

sessionKey=agent:main:main:active-memory:xxx does not have a valid channelId or channelId does not belong to mx-claw

---

"plugins": {
  "allow": ["openclaw-weixin", "feishu", "lossless-claw", "mx-claw", "browser", "minimax", "openclaw-mcp-bridge", "duckduckgo", "memory-core", "active-memory"],
  "entries": {
    "mx-claw": {
      "enabled": true,
      "config": {
        "auth": { "token": "em_..." },
        "serverUrl": "https://mx-claw-server.eastmoney.com/chat"
      }
    },
    "active-memory": {
      "enabled": true,
      "config": {
        "agents": ["main"],
        "allowedChatTypes": ["direct"],
        "queryMode": "recent",
        "timeoutMs": 10000
      }
    }
  }
}
RAW_BUFFERClick to expand / collapse

Bug: active-memory plugin crashes gateway when mx-claw plugin is enabled

Environment

  • OpenClaw: 2026.4.10 (also reproducible on 2026.4.11-beta.1)
  • Channel: webchat (direct)
  • Plugins active: mx-claw, memory-core, feishu, openclaw-weixin, lossless-claw, browser, minimax, openclaw-mcp-bridge, duckduckgo
  • active-memory: enabled with default config (agents: ["main"], allowedChatTypes: ["direct"], queryMode: "recent", timeoutMs: 10000)

Problem

Enabling the active-memory plugin causes the gateway to become completely unresponsive (hard crash). The agent stops responding to any messages. Deleting the active-memory configuration from plugins.entries immediately restores normal operation.

The crash is not caused by the timeoutMs being too short — setting it to 30000ms does not prevent the crash. The issue occurs immediately on the first message after the plugin is activated.

Root Cause Analysis

active-memory spawns a dedicated memory sub-agent (agent:main:main:active-memory:xxx) right before each main reply (as documented in the 4.10 changelog: "gives OpenClaw a dedicated memory sub-agent right before the main reply").

When mx-claw plugin is enabled, mx-claw registers a before_agent_start hook that intercepts all agent startup events, including the active-memory sub-agent session. The mx-claw hook checks for a valid channelId on the session, but the active-memory sub-agent session does not carry the original webchat channelId, causing mx-claw to reject the session.

Error observed in logs:

sessionKey=agent:main:main:active-memory:xxx does not have a valid channelId or channelId does not belong to mx-claw

This creates a conflict between two plugins both trying to manage session lifecycle hooks.

Impact

  • Gateway becomes completely unresponsive
  • No recovery without manually editing the JSON config to remove active-memory
  • Cannot use active-memory and mx-claw together

Expected Behavior

active-memory should work alongside mx-claw without crashing the gateway. The sub-agent sessions created by active-memory should either:

  1. Not trigger mx-claw's before_agent_start hook, or
  2. Carry sufficient context (channelId) to pass mx-claw's validation

Configuration

"plugins": {
  "allow": ["openclaw-weixin", "feishu", "lossless-claw", "mx-claw", "browser", "minimax", "openclaw-mcp-bridge", "duckduckgo", "memory-core", "active-memory"],
  "entries": {
    "mx-claw": {
      "enabled": true,
      "config": {
        "auth": { "token": "em_..." },
        "serverUrl": "https://mx-claw-server.eastmoney.com/chat"
      }
    },
    "active-memory": {
      "enabled": true,
      "config": {
        "agents": ["main"],
        "allowedChatTypes": ["direct"],
        "queryMode": "recent",
        "timeoutMs": 10000
      }
    }
  }
}

Workaround

Remove active-memory from plugins.entries and plugins.allow to prevent the crash. mx-claw works normally without active-memory.

Tags

plugin, active-memory, mx-claw, conflict, crash

extent analysis

TL;DR

Disable the mx-claw plugin or modify its before_agent_start hook to ignore active-memory sub-agent sessions to prevent the gateway crash.

Guidance

  • Identify the conflict between the active-memory and mx-claw plugins, where mx-claw's before_agent_start hook rejects active-memory sub-agent sessions due to missing channelId.
  • Consider modifying the mx-claw plugin to exempt active-memory sub-agent sessions from its validation, allowing them to bypass the channelId check.
  • As a temporary workaround, disable either the active-memory or mx-claw plugin to prevent the crash, depending on which functionality is more critical.
  • Review the active-memory plugin's configuration to ensure it is correctly set up and that the agents and allowedChatTypes settings are compatible with the mx-claw plugin.

Example

No code snippet is provided as the issue does not imply a specific code change, but rather a configuration or plugin compatibility issue.

Notes

The root cause of the issue is the conflict between the two plugins, and resolving this conflict will require either modifying the mx-claw plugin or finding an alternative solution that allows both plugins to coexist.

Recommendation

Apply a workaround by disabling the mx-claw plugin until a more permanent solution can be implemented, as this will allow the active-memory plugin to function without causing a gateway crash.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - ✅(Solved) Fix [Bug]: active-memory plugin crashes gateway when mx-claw plugin is enabled [1 pull requests, 1 participants]