openclaw - ✅(Solved) Fix [Bug]: 2026.4.9 memory CLI hangs indefinitely on Linux even after stale skill-path cleanup [2 pull requests, 1 comments, 2 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#64354Fetched 2026-04-11 06:15:15
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Timeline (top)
cross-referenced ×3commented ×1

On OpenClaw 2026.4.9, openclaw memory CLI commands hang indefinitely on Linux, even after cleaning stale session skill-path references from an older install.

The gateway itself remains healthy and serving traffic, but the memory CLI path hangs.

This affects at least:

  • openclaw memory --help
  • openclaw memory status --json
  • previously also openclaw memory rem-harness
  • previously also openclaw memory rem-backfill --path ...

Error Message

openclaw memory status --json should either return JSON or fail with an explicit error, not hang forever.

Root Cause

On OpenClaw 2026.4.9, openclaw memory CLI commands hang indefinitely on Linux, even after cleaning stale session skill-path references from an older install.

The gateway itself remains healthy and serving traffic, but the memory CLI path hangs.

This affects at least:

  • openclaw memory --help
  • openclaw memory status --json
  • previously also openclaw memory rem-harness
  • previously also openclaw memory rem-backfill --path ...

Fix Action

Fixed

PR fix notes

PR #64387: fix(plugins): include activationSourceConfig in loadOpenClawPlugins destructuring

Description (problem / solution / changelog)

Summary

  • resolvePluginLoadCacheContext returns activationSourceConfig in its result object (used to thread the original raw config through to activation-source creation)
  • loadOpenClawPlugins destructures the result but omits activationSourceConfig
  • The compiled build (2026.4.9, loader-BSIqIOsD.js) injects a diagnostic log inside loadOpenClawPlugins that references activationSourceConfig as a bare variable
  • Since the variable was never destructured, this causes ReferenceError: activationSourceConfig is not defined, crash-looping the gateway on every startup attempt

One-line fix

Add activationSourceConfig to the destructuring at loadOpenClawPlugins line ~1092.

Reproduction

  1. Install OpenClaw 2026.4.9 via pnpm/npm
  2. Start the gateway (openclaw gateway start or via LaunchAgent)
  3. Gateway crash-loops: starting...loading configuration…resolving authentication… → crash → repeat every ~4s
  4. ~/.openclaw/logs/gateway.err.log shows: Gateway failed to start: ReferenceError: activationSourceConfig is not defined

Evidence

Gateway error log (repeating every ~4 seconds):

2026-04-10T14:14:03.652+03:00 Gateway failed to start: ReferenceError: activationSourceConfig is not defined
2026-04-10T14:14:07.982+03:00 Gateway failed to start: ReferenceError: activationSourceConfig is not defined
2026-04-10T14:14:12.218+03:00 Gateway failed to start: ReferenceError: activationSourceConfig is not defined

Compiled code trace

In loader-BSIqIOsD.js:

Line ~1996resolvePluginLoadCacheContext declares and returns activationSourceConfig:

const activationSourceConfig = options.activationSourceConfig ?? options.config ?? {};
// ...
return { env, cfg, normalized, activationSourceConfig, activationSource, ... };

Line ~2336loadOpenClawPlugins destructures but omits it:

const { env, cfg, normalized, activationSource, autoEnabledReasons, ... } = resolvePluginLoadCacheContext(options);
//                              ^ missing activationSourceConfig here

Line ~2446 — a diagnostic log references it as a bare variable:

if (shouldActivate) logger.warn(`[plugins-diag] ... activation.plugins=${JSON.stringify(activationSourceConfig?.plugins ?? null)}`);
// ReferenceError: activationSourceConfig is not defined

Environment

  • OpenClaw: 2026.4.9 (0512059)
  • Node.js: v25.9.0
  • OS: macOS 26.3.1 (arm64)

AI-assisted

  • AI-assisted (Claude Code / Opus 4.6)
  • Tested locally: applied equivalent patch to compiled loader-BSIqIOsD.js, confirmed gateway starts successfully
  • I understand what the code does

Related issues

Fixes #64357

Related (same symptom family — false plugins.allow is empty warnings):

  • #62049, #64170, #62521, #63693, #63182

Possibly related (plugin loading crashes/hangs):

  • #64306, #64354

Test plan

  • pnpm build && pnpm check && pnpm test passes
  • Gateway starts without crash-loop on fresh install
  • openclaw doctor no longer shows activationSourceConfig ReferenceError

Changed files

  • scripts/check-no-raw-channel-fetch.mjs (modified, +1/-1)
  • src/plugins/loader.ts (modified, +2/-0)
  • test/scripts/lint-suppressions.test.ts (modified, +1/-0)

PR #64403: fix(plugins): prefer CLI metadata for lazy primary commands

Description (problem / solution / changelog)

Summary

  • Problem: lazy startup eagerly registers the selected plugin primary through the full runtime registrar, which can pull in heavy plugin runtime work for commands like memory.
  • Why it matters: commands such as openclaw memory --help should return immediately instead of blocking on unnecessary runtime activation.
  • What changed: thread preferMetadataCommands into the lazy plugin CLI loader, prefer the non-activating metadata registrar only when the metadata/runtime command roots match exactly, and keep runtime registration when metadata is only a command stub.
  • What did NOT change (scope boundary): no change to eager mode, no cross-plugin conflict policy change, and no metadata fallback when the command-root coverage is incomplete or the metadata registrar cannot actually materialize the command.

Change Type (select all)

  • Bug fix
  • Feature
  • Refactor required for the fix
  • Docs
  • Security hardening
  • Chore/infra

Scope (select all touched areas)

  • Memory / storage
  • UI / DX
  • Gateway / orchestration
  • Skills / tool execution
  • Auth / tokens
  • Integrations
  • API / contracts
  • CI/CD / infra

Linked Issue/PR

  • Closes #64354
  • Related #
  • This PR fixes a bug or regression

Root Cause (if applicable)

  • Root cause: the selected lazy primary path eagerly registers the matching plugin command group, but the loader always preferred the full runtime registrar even when a metadata registrar could register the same command roots without activating the heavy runtime path.
  • Missing detection / guardrail: there was no regression coverage for "selected lazy primary prefers metadata when safe, falls back to runtime when metadata only partially covers the command roots, and falls back when metadata is only a command stub".
  • Contributing context (if known): the affected report was openclaw memory --help hanging on Linux in #64354.

Regression Test Plan (if applicable)

  • Coverage level that should have caught this:
    • Unit test
    • Seam / integration test
    • End-to-end test
    • Existing coverage already sufficient
  • Target test or file: src/plugins/cli.test.ts
  • Scenario the test should lock in: selected lazy primaries use the metadata registrar when it fully covers the command roots, stay on the runtime registrar when metadata only partially covers them, and also stay on the runtime registrar when metadata only advertises a command stub.
  • Why this is the smallest reliable guardrail: the regression is in loader/registration selection logic, and the unit test can assert the exact registrar chosen without needing a full plugin runtime.
  • Existing test that already covers this (if any): lazy-registers descriptor-backed plugin commands on first invocation
  • If no new test is added, why not: N/A

User-visible / Behavior Changes

openclaw memory --help and other selected lazy-primary memory CLI entrypoints avoid the heavy runtime registration path when metadata can safely materialize the same command surface. No config or default changes.

Diagram (if applicable)

Before:
[selected lazy primary] -> [force runtime registrar] -> [heavy runtime path]

After:
[selected lazy primary] -> [prefer safe metadata registrar when roots match and registrar can materialize commands]
[selected lazy primary] -> [fallback to runtime registrar when metadata coverage is incomplete or only a command stub]

Security Impact (required)

  • New permissions/capabilities? (No)
  • Secrets/tokens handling changed? (No)
  • New/changed network calls? (No)
  • Command/tool execution surface changed? (No)
  • Data access scope changed? (No)
  • If any Yes, explain risk + mitigation: N/A

Repro + Verification

Environment

  • OS: Windows 10 (local verification); issue repro in #64354 was Debian 13
  • Runtime/container: Node v24.7.0 locally
  • Model/provider: N/A
  • Integration/channel (if any): CLI / plugin loader
  • Relevant config (redacted): default local config

Steps

  1. Run pnpm test src/plugins/cli.test.ts
  2. Run pnpm test extensions/memory-core/src/cli.test.ts
  3. Run pnpm build
  4. Run pnpm check

Expected

  • The targeted CLI regression tests pass.
  • The memory-core CLI test reaches execution normally.
  • Build/check results reflect the current repo state rather than the older local failures originally noted on this PR.

Actual

  • pnpm test src/plugins/cli.test.ts passed (15/15).
  • pnpm test extensions/memory-core/src/cli.test.ts passed (47/47).
  • pnpm build still fails locally, but now in unrelated runtime-postbuild dependency staging for amazon-bedrock.
  • pnpm check still fails locally on unrelated tsgo errors in extensions/tlon/src/monitor/index.ts and ui/src/ui/app-settings.ts.

Evidence

  • Failing test/log before + passing after
  • Trace/log snippets
  • Screenshot/recording
  • Perf numbers (if relevant)

Human Verification (required)

  • Verified scenarios: reran the targeted plugin CLI regression test and the previously blocked extensions/memory-core CLI test locally; both passed.
  • Edge cases checked: partial command-root coverage still falls back to the runtime registrar, and command-stub metadata registrars do not replace the runtime registrar for the selected lazy primary.
  • What you did not verify: I did not reproduce the original Debian issue on a Linux install, and repo-wide build / check are still blocked locally by unrelated failures outside this PR.

Review Conversations

  • I replied to or resolved every bot review conversation I addressed in this PR.
  • I left unresolved only the conversations that still need reviewer or maintainer judgment.

Compatibility / Migration

  • Backward compatible? (Yes)
  • Config/env changes? (No)
  • Migration needed? (No)
  • If yes, exact upgrade steps: N/A

Risks and Mitigations

  • Risk: lazy-primary selection could still choose a metadata registrar that advertises the right command roots but does not accept a registration context.
    • Mitigation: record whether a registrar accepts CLI context and keep the runtime registrar when metadata only provides a zero-arg command stub.

Changed files

  • src/plugins/cli-registry-loader.ts (modified, +80/-9)
  • src/plugins/cli.test.ts (modified, +122/-0)
  • src/plugins/cli.ts (modified, +6/-1)
  • src/plugins/registry-types.ts (modified, +1/-0)
  • src/plugins/registry.ts (modified, +1/-0)

Code Example

timeout 25s /home/kaitzh/.npm-global/bin/openclaw memory --help
echo $?
# => 124

timeout 25s /home/kaitzh/.npm-global/bin/openclaw memory status --json
echo $?
# => 124

---

/home/kaitzh/.npm-global/bin/openclaw

---

/home/kaitzh/.npm-global/lib/node_modules/openclaw/skills/...
RAW_BUFFERClick to expand / collapse

Bug type

Crash / hang (CLI command never returns)

Summary

On OpenClaw 2026.4.9, openclaw memory CLI commands hang indefinitely on Linux, even after cleaning stale session skill-path references from an older install.

The gateway itself remains healthy and serving traffic, but the memory CLI path hangs.

This affects at least:

  • openclaw memory --help
  • openclaw memory status --json
  • previously also openclaw memory rem-harness
  • previously also openclaw memory rem-backfill --path ...

Environment

  • OpenClaw version: 2026.4.9 (0512059)
  • OS: Debian 13 x86_64
  • Node: v24.14.0
  • Install path: /home/kaitzh/.npm-global/lib/node_modules/openclaw
  • CLI binary: /home/kaitzh/.npm-global/bin/openclaw

Reproduction

timeout 25s /home/kaitzh/.npm-global/bin/openclaw memory --help
echo $?
# => 124

timeout 25s /home/kaitzh/.npm-global/bin/openclaw memory status --json
echo $?
# => 124

The process produces no useful stdout/stderr before timeout.

What was ruled out

1) Not a PATH / wrong binary problem

The command is being executed via the absolute binary path:

/home/kaitzh/.npm-global/bin/openclaw

Version is confirmed as 2026.4.9.

2) Not a command-name / usage problem

Installed bundled CLI code clearly registers these commands:

  • memory status
  • memory index
  • memory search
  • memory promote
  • memory rem-harness
  • memory rem-backfill

3) Not a gateway outage

Gateway is healthy while the CLI hangs:

  • systemctl --user status openclaw-gateway.service shows active (running)
  • Gateway listens on 127.0.0.1:18789
  • Recent logs show ongoing traffic / maintenance

4) Not caused solely by stale old install paths

There was stale path pollution from an older pnpm install ([email protected]) embedded in:

  • ~/.openclaw/agents/main/sessions/sessions.json
  • old tmp / backup artifacts

Those stale references were cleaned and the live sessions.json was rewritten to point to the current install paths under:

/home/kaitzh/.npm-global/lib/node_modules/openclaw/skills/...

A backup was taken first. After cleanup:

  • old 2026.2.12 references in the live sessions.json were removed
  • invalid workspace/skills/himalaya/SKILL.md references in the live sessions.json were removed

However, the memory CLI still hangs in exactly the same way after cleanup.

Additional observations

  • Gateway-side memory / LCM initialization appears healthy
  • The issue seems isolated to the CLI / memory-runtime path, not the main gateway runtime
  • This feels related to other memory-CLI hang reports such as:
    • #61182 (openclaw memory search CLI hangs indefinitely)

Expected behavior

openclaw memory --help should return immediately.

openclaw memory status --json should either return JSON or fail with an explicit error, not hang forever.

Actual behavior

Both commands hang until externally killed by timeout.

Impact

This blocks:

  • memory diagnostics via CLI
  • REM / dreaming historical backfill workflows
  • safe troubleshooting of memory features from the command line

Notes

The host currently has moderate memory pressure while the gateway is running, but the gateway itself remains healthy. So memory pressure may amplify the issue, but does not appear to explain why the gateway remains functional while the memory CLI hangs consistently.

extent analysis

TL;DR

The openclaw memory CLI commands hanging indefinitely on Linux may be resolved by investigating and addressing potential issues with the memory-runtime path, possibly related to the gateway's memory initialization or the CLI's interaction with the gateway.

Guidance

  • Investigate the memory-runtime path to identify potential bottlenecks or issues that could be causing the CLI commands to hang.
  • Verify that the gateway's memory initialization is healthy and functioning as expected, as the issue seems isolated to the CLI/memory-runtime path.
  • Review the code and logs related to the openclaw memory commands to identify any potential errors or inconsistencies that could be contributing to the hanging issue.
  • Consider comparing the behavior of the openclaw memory commands with other similar commands that do not exhibit the hanging issue, to identify potential differences or clues.

Notes

The issue may be related to other reported problems, such as #61182, and investigating these similarities could provide valuable insights into the root cause of the problem.

Recommendation

Apply a workaround, such as increasing the timeout value or using an alternative method to troubleshoot memory features, until the root cause of the issue can be identified and addressed.

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…

FAQ

Expected behavior

openclaw memory --help should return immediately.

openclaw memory status --json should either return JSON or fail with an explicit error, not hang forever.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING