Skip to content

Bug: npm updates drop node-llama-cpp, breaking local memory_search after every OpenClaw update #88705

@Peilsender

Description

@Peilsender

Summary

After each recent npm-based OpenClaw update, local memory_search stops working because the node-llama-cpp optional dependency is no longer present under the installed OpenClaw package directory.

This has happened repeatedly on the same Linux host after OpenClaw updates. The workaround is always to manually reinstall node-llama-cpp into the OpenClaw package prefix and then retest memory_search.

Environment

  • OpenClaw before latest update: 2026.5.27
  • OpenClaw after latest update: 2026.5.28 (e932160)
  • Install kind: global npm package under /home/openclaw/.npm-global/lib/node_modules/openclaw
  • Node.js: v24.15.0
  • npm: 11.12.1
  • Gateway: systemd user service, loopback 127.0.0.1:18789
  • Memory provider: local embeddings
  • Expected local model: hf:ggml-org/embeddinggemma-300m-qat-q8_0-GGUF/embeddinggemma-300m-qat-Q8_0.gguf

Repro / observed flow

  1. Update OpenClaw via npm from 2026.5.27 to 2026.5.28.
  2. Restart the gateway.
  3. Run a local memory_search tool call.

Actual result

memory_search becomes unavailable:

results: []
disabled: true
unavailable: true
error: Local embeddings unavailable.
Reason: optional dependency node-llama-cpp is missing (or failed to install).
Detail: Cannot find package 'node-llama-cpp' imported from /home/openclaw/.npm-global/lib/node_modules/openclaw/dist/embeddings-C9YA6RhB.js

npm ls -g --depth=0 node-llama-cpp openclaw only showed openclaw@2026.5.28; node-llama-cpp was absent.

A local post-update check also flagged the dependency as missing:

Memory-Search-Abhaengigkeit
[PROBLEM] node-llama-cpp fehlt im OpenClaw-Paket; memory_search danach im Chat testen/reparieren

Expected result

After an OpenClaw npm update, local memory_search should keep working without manually reinstalling node-llama-cpp into the OpenClaw package directory.

At minimum, the update flow or doctor should detect this condition and offer a direct repair step.

Workaround that fixes it

npm install --no-save node-llama-cpp@3.18.1 --prefix /home/openclaw/.npm-global/lib/node_modules/openclaw
cd /home/openclaw/.npm-global/lib/node_modules/openclaw && node -e "import('node-llama-cpp').then(()=>console.log('ok'))"

After this, the same memory_search call succeeds again:

provider: local
model: hf:ggml-org/embeddinggemma-300m-qat-q8_0-GGUF/embeddinggemma-300m-qat-Q8_0.gguf
hits: 3

The post-update check then passes:

CLI version: 2026.5.28
Package version: 2026.5.28
Gateway version: 2026.5.28
node-llama-cpp present
OK: 8 | Hinweise: 0 | Probleme: 0

Why this matters

For agents configured to rely on local/free memory search, every npm update silently removes or fails to preserve the native local embeddings dependency. The gateway can otherwise look healthy, so the breakage only appears when an agent tries to recall memory.

Related context

This seems adjacent to local memory/provider work such as #70596 and #70873, but the issue here is specifically the npm update/install result: node-llama-cpp disappears from the installed OpenClaw package prefix and must be reinstalled manually after updates.

Metadata

Metadata

Assignees

Labels

P1High-priority user-facing bug, regression, or broken workflow.clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions