openclaw - ✅(Solved) Fix node:sqlite missing FTS5 module — memory search keyword fallback broken [1 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#62328Fetched 2026-04-08 03:05:53
View on GitHub
Comments
1
Participants
2
Timeline
2
Reactions
0
Timeline (top)
commented ×1cross-referenced ×1

Error Message

  1. Detect and warn more visibly — currently it logs a warning but the user may not notice; consider surfacing it in openclaw doctor

Fix Action

Workaround

Vector search (provider: "local" with embeddinggemma GGUF) works fine as the primary search mode. FTS5 is only needed for pure keyword matching fallback.

PR fix notes

PR #62338: doctor(memory): surface FTS5 unavailable state in doctor checks

Description (problem / solution / changelog)

Summary

Fixes #62328 by making openclaw doctor visibly report when SQLite FTS5 is unavailable in the running gateway.

  • Extend doctor.memory.status payload with fts probe fields (enabled, available, error)
  • Thread that payload through probeGatewayMemoryStatus in doctor command flow
  • Add a dedicated doctor warning in noteMemorySearchHealth when gateway reports FTS unavailable
  • Include targeted guidance for no such module: fts5 / missing ENABLE_FTS5

Why

Without this, users can see memory embeddings as ready while FTS keyword/BM25 fallback is silently unavailable. This change surfaces the condition and gives concrete next steps.

Tests

  • Added/updated test in src/gateway/server-methods/doctor.test.ts to assert fts is returned in doctor.memory.status
  • Added test in src/commands/doctor-memory-search.test.ts to assert doctor emits an FTS5 warning when gateway probe reports unavailable
  • Local targeted verification:
    • corepack pnpm exec vitest src/gateway/server-methods/doctor.test.ts -t "returns gateway embedding probe status for the default agent"
    • corepack pnpm exec vitest src/commands/doctor-memory-search.test.ts -t "warns when gateway probe reports FTS unavailable"

Notes

One unrelated existing test in src/gateway/server-methods/doctor.test.ts is currently path-sensitive on this Windows environment (falls back to the manager workspace...) and fails independently of this change. The new/affected targeted cases pass.

Changed files

  • src/commands/doctor-gateway-health.ts (modified, +6/-0)
  • src/commands/doctor-memory-search.test.ts (modified, +21/-0)
  • src/commands/doctor-memory-search.ts (modified, +34/-5)
  • src/gateway/server-methods/doctor.test.ts (modified, +5/-1)
  • src/gateway/server-methods/doctor.ts (modified, +20/-1)

Code Example

[memory] fts unavailable: no such module: fts5
RAW_BUFFERClick to expand / collapse

Problem

OpenClaw's memory search uses node:sqlite (Node.js built-in SQLite). On Node.js v23.11.0, the built-in SQLite (v3.49.1) is not compiled with ENABLE_FTS5, causing FTS5-based keyword search to fail silently:

[memory] fts unavailable: no such module: fts5

This means the keyword/BM25 fallback in hybrid memory search is completely non-functional. Only vector search works (when an embedding provider is configured).

Environment

  • OS: macOS (arm64, Darwin 25.3.0)
  • Node.js: v23.11.0 (Homebrew)
  • SQLite version: 3.49.1 (via node:sqlite)
  • SQLite compile options: Missing ENABLE_FTS5 (verified via pragma compile_options)

Steps to Reproduce

  1. Configure memorySearch.provider: "local" (or any provider)
  2. Start gateway
  3. Check logs: [memory] fts unavailable: no such module: fts5
  4. memory_search returns mode: "hybrid" but FTS results are always empty

Suggestion

A few possible approaches:

  1. Support better-sqlite3 as a fallback — it ships with a fully-compiled SQLite that includes FTS5 by default
  2. Document the requirement — note that node:sqlite on some Node.js builds may lack FTS5, and suggest users compile Node.js with --sqlite-enable-fts5 (available since Node 23.x configure options)
  3. Detect and warn more visibly — currently it logs a warning but the user may not notice; consider surfacing it in openclaw doctor

Workaround

Vector search (provider: "local" with embeddinggemma GGUF) works fine as the primary search mode. FTS5 is only needed for pure keyword matching fallback.

extent analysis

TL;DR

Consider using better-sqlite3 as a fallback to enable FTS5 support for keyword search.

Guidance

  • Verify the SQLite compile options using pragma compile_options to confirm the absence of ENABLE_FTS5.
  • Evaluate the feasibility of compiling Node.js with --sqlite-enable-fts5 to enable FTS5 support.
  • Assess the impact of using vector search as the primary search mode, potentially reducing the reliance on FTS5.
  • Investigate implementing a more visible warning or detection mechanism to alert users of the FTS5 limitation.

Example

No code snippet is provided as the issue does not require a specific code change, but rather a potential library substitution or configuration adjustment.

Notes

The suggested approaches may have varying degrees of complexity and compatibility, and the chosen solution should be tailored to the specific use case and requirements.

Recommendation

Apply workaround: Use better-sqlite3 as a fallback to enable FTS5 support, as it provides a readily available solution with minimal configuration changes.

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