openclaw - 💡(How to fix) Fix CLI memory search returns 'No matches' despite SQLite having indexed data [1 participants]

Official PRs (…)
ON THIS PAGE

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#61727Fetched 2026-04-08 02:55:20
View on GitHub
Comments
0
Participants
1
Timeline
1
Reactions
1
Participants
Timeline (top)
subscribed ×1

Code Example

$ sqlite3 /root/.openclaw/memory/main.sqlite 'SELECT COUNT(*) FROM chunks;'
3787

$ sqlite3 /root/.openclaw/memory/main.sqlite 'SELECT COUNT(*) FROM files;'
992

---

$ sqlite3 /root/.openclaw/memory/main.sqlite 'SELECT COUNT(*) FROM chunks WHERE embedding IS NOT NULL;'
3787

$ sqlite3 /root/.openclaw/memory/main.sqlite 'SELECT LENGTH(embedding) FROM chunks LIMIT 1;'
12712  # ~1024 dimensions, JSON array format

---

$ sqlite3 /root/.openclaw/memory/main.sqlite "SELECT * FROM chunks_fts WHERE chunks_fts MATCH 'trading' LIMIT 5;" 
# Returns correct results with memory content

---

$ curl https://api.voyageai.com/v1/embeddings -H 'Authorization: Bearer pa-xxx...' -d '{"input": "test", "model": "voyage-4-large"}'
# Returns valid 1024-dim embedding

---

$ cd /root/clawd
$ openclaw memory search 'trading broker'
No matches.

---

{
  "memorySearch": {
    "enabled": true,
    "provider": "voyage",
    "model": "voyage-4-large",
    "store": {
      "driver": "sqlite",
      "path": "/root/.openclaw/memory/main.sqlite",
      "vector": { "enabled": true }
    },
    "query": {
      "maxResults": 8,
      "minScore": 0.32,
      "hybrid": { "enabled": true }
    }
  }
}
RAW_BUFFERClick to expand / collapse

Bug Description

The openclaw memory search CLI command returns 'No matches' even when the SQLite database has properly indexed data with embeddings.

Environment

  • OpenClaw version: 2026.4.5
  • OS: Linux (VPS)
  • Memory backend: builtin (memory-core, SQLite)

Evidence

SQLite has data:

$ sqlite3 /root/.openclaw/memory/main.sqlite 'SELECT COUNT(*) FROM chunks;'
3787

$ sqlite3 /root/.openclaw/memory/main.sqlite 'SELECT COUNT(*) FROM files;'
992

Embeddings exist:

$ sqlite3 /root/.openclaw/memory/main.sqlite 'SELECT COUNT(*) FROM chunks WHERE embedding IS NOT NULL;'
3787

$ sqlite3 /root/.openclaw/memory/main.sqlite 'SELECT LENGTH(embedding) FROM chunks LIMIT 1;'
12712  # ~1024 dimensions, JSON array format

FTS index works:

$ sqlite3 /root/.openclaw/memory/main.sqlite "SELECT * FROM chunks_fts WHERE chunks_fts MATCH 'trading' LIMIT 5;" 
# Returns correct results with memory content

Voyage API works:

$ curl https://api.voyageai.com/v1/embeddings -H 'Authorization: Bearer pa-xxx...' -d '{"input": "test", "model": "voyage-4-large"}'
# Returns valid 1024-dim embedding

But CLI search fails:

$ cd /root/clawd
$ openclaw memory search 'trading broker'
No matches.

Configuration

{
  "memorySearch": {
    "enabled": true,
    "provider": "voyage",
    "model": "voyage-4-large",
    "store": {
      "driver": "sqlite",
      "path": "/root/.openclaw/memory/main.sqlite",
      "vector": { "enabled": true }
    },
    "query": {
      "maxResults": 8,
      "minScore": 0.32,
      "hybrid": { "enabled": true }
    }
  }
}

Expected Behavior

CLI openclaw memory search should return results matching what FTS returns directly.

Actual Behavior

CLI returns 'No matches' while direct SQLite FTS query works.

Additional Context

  • Memory slot set to memory-core (builtin)
  • Hybrid search enabled (FTS + vector)
  • The memory_search tool works correctly when called from agent sessions via gateway
  • Issue is specific to CLI standalone usage

Diagnosis

The CLI search implementation may not be properly integrating FTS + vector search. The hybrid search feature appears to work in gateway sessions but not in CLI standalone mode.

extent analysis

TL;DR

The issue is likely due to the hybrid search feature not being properly integrated in the CLI standalone mode, causing the openclaw memory search command to return 'No matches' despite having properly indexed data with embeddings.

Guidance

  • Verify that the hybrid search configuration is correctly set up in the CLI standalone mode by checking the memorySearch.query.hybrid.enabled property in the configuration file.
  • Check the SQLite database to ensure that the FTS index is correctly created and populated with data.
  • Test the vector search functionality separately to ensure it is working correctly and returning expected results.
  • Compare the search queries used in the gateway sessions and the CLI standalone mode to identify any differences that might be causing the issue.

Example

No code snippet is provided as the issue seems to be related to the configuration and integration of the hybrid search feature rather than a specific code implementation.

Notes

The issue seems to be specific to the CLI standalone usage, and the memory_search tool works correctly when called from agent sessions via gateway. This suggests that the problem might be related to the way the hybrid search feature is integrated in the CLI mode.

Recommendation

Apply workaround: Disable the hybrid search feature in the CLI standalone mode by setting memorySearch.query.hybrid.enabled to false and test if the vector search works correctly. This will help to isolate the issue and determine if the problem is indeed related to the hybrid search integration.

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 - 💡(How to fix) Fix CLI memory search returns 'No matches' despite SQLite having indexed data [1 participants]