openclaw - ✅(Solved) Fix Misleading "sqlite-vec unavailable" warning when sqlite-vec actually loads successfully [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#75624Fetched 2026-05-02 05:32:40
View on GitHub
Comments
1
Participants
2
Timeline
8
Reactions
2
Author
Timeline (top)
referenced ×3cross-referenced ×2commented ×1mentioned ×1

chunks_vec not updated — sqlite-vec unavailable. Vector recall degraded. is logged even when the sqlite-vec extension successfully loads. The warning fires whenever vectorReady === false, which can be caused by reasons unrelated to sqlite-vec (e.g., missing embedding provider). This makes diagnosing the real cause very hard.

Error Message

Patching dist/engine-storage-CO3qFXo7.js loadSqliteVecExtension with console.error at each step prints: params.warn(chunks_vec not updated — sqlite-vec unavailable${errDetail}. Vector recall degraded. Further duplicate warnings suppressed.);

Root Cause

manager-jzSMQjEt.js:1843:

function logMemoryVectorDegradedWrite(params) {
  if (!params.vectorEnabled || params.vectorReady || params.chunkCount <= 0 || params.warningShown) return params.warningShown;
  const errDetail = params.loadError ? `: ${params.loadError}` : "";
  params.warn(`chunks_vec not updated — sqlite-vec unavailable${errDetail}. Vector recall degraded. Further duplicate warnings suppressed.`);
  return true;
}

The condition fires whenever vectorReady === false. vectorReady requires a valid dimensions param from a successful embedding call (ensureVectorReady, line 1031). Without a working embedding provider, dimensions is undefined, the vector table is never created, and the warning falsely blames sqlite-vec — even though loadSqliteVecExtension succeeded and loadError is null.

This is likely the same surface symptom reported in #65156, but the underlying mechanism is different (and that issue's ABI-mismatch hypothesis does not apply here).

Fix Action

Workaround

Configure a valid embedding provider (OpenAI API key, Voyage, Mistral, etc.) under agents.defaults.memorySearch. Note that openai-codex / ChatGPT subscription OAuth does not provide embedding API access.

PR fix notes

PR #75637: fix(memory): distinguish sqlite-vec vs embedding provider in vector warning

Description (problem / solution / changelog)

Summary

Fixes #75624 — the warning message chunks_vec not updated — sqlite-vec unavailable fires even when sqlite-vec loads successfully. The actual cause is a missing embedding provider (no vector dimensions resolved).

Root Cause

logMemoryVectorDegradedWrite and the CLI's runMemoryIndex both blame sqlite-vec whenever vectorReady === false, but vectorReady can be false because:

  1. sqlite-vec actually failed to load (loadError is set)
  2. No embedding provider is configured, so no embeddings are produced, sample is null, and ensureVectorReady is never called — even though sqlite-vec itself is fine

Changes

  • manager-vector-warning.ts: When loadError is set, message says sqlite-vec unavailable: <error>. When loadError is absent, message says embedding provider unavailable — no vector dimensions resolved.
  • cli.runtime.ts: Same logic applied to the CLI's stderr warning path.
  • manager-vector-warning.test.ts: Added test for the no-loadError case verifying the embedding provider message.

Testing

  • pnpm vitest run extensions/memory-core/src/memory/manager-vector-warning.test.ts — 3/3 pass
  • npx oxfmt --check — all 3 files pass formatting
  • CLI test (cli.test.ts) has a pre-existing global-agent import failure on upstream/main, unrelated to this change

🤖 Built with AI assistance.

Changed files

  • CHANGELOG.md (modified, +1/-0)
  • extensions/memory-core/src/cli.runtime.ts (modified, +7/-2)
  • extensions/memory-core/src/memory/manager-vector-warning.test.ts (modified, +16/-0)
  • extensions/memory-core/src/memory/manager-vector-warning.ts (modified, +7/-2)

Code Example

[DBG] vec start, extPath= undefined
[DBG] vec module loaded
[DBG] vec extPath= .../sqlite-vec-darwin-arm64/vec0.dylib
[DBG] enableLoadExtension OK
[DBG] vec.load OK

---

const sqlite = await import('node:sqlite');
const db = new sqlite.DatabaseSync(':memory:', { allowExtension: true });
db.enableLoadExtension(true);
const sv = await import('sqlite-vec');
sv.load(db);
db.prepare('SELECT vec_version() as v').get();
// → { v: 'v0.1.9' }  ✅

---

function logMemoryVectorDegradedWrite(params) {
  if (!params.vectorEnabled || params.vectorReady || params.chunkCount <= 0 || params.warningShown) return params.warningShown;
  const errDetail = params.loadError ? `: ${params.loadError}` : "";
  params.warn(`chunks_vec not updated — sqlite-vec unavailable${errDetail}. Vector recall degraded. Further duplicate warnings suppressed.`);
  return true;
}
RAW_BUFFERClick to expand / collapse

Summary

chunks_vec not updated — sqlite-vec unavailable. Vector recall degraded. is logged even when the sqlite-vec extension successfully loads. The warning fires whenever vectorReady === false, which can be caused by reasons unrelated to sqlite-vec (e.g., missing embedding provider). This makes diagnosing the real cause very hard.

Environment

  • OpenClaw 2026.4.27
  • Node.js v25.9.0 (built-in node:sqlite, SQLite 3.51.3)
  • macOS arm64
  • sqlite-vec 0.1.9 (with sqlite-vec-darwin-arm64 binary present)

Reproduction

  1. Configure OpenClaw with claude-cli runtime, no OpenAI API key for embeddings (only ChatGPT / openai-codex OAuth, which does not grant embedding API access).
  2. Run openclaw memory index --agent <id> --verbose --force
  3. Observe: chunks_vec not updated — sqlite-vec unavailable. Vector recall degraded. Further duplicate warnings suppressed.

Investigation

Patching dist/engine-storage-CO3qFXo7.js loadSqliteVecExtension with console.error at each step prints:

[DBG] vec start, extPath= undefined
[DBG] vec module loaded
[DBG] vec extPath= .../sqlite-vec-darwin-arm64/vec0.dylib
[DBG] enableLoadExtension OK
[DBG] vec.load OK

→ sqlite-vec extension is successfully loaded. The "unavailable" warning still fires immediately after.

Verified independently with a direct Node.js test:

const sqlite = await import('node:sqlite');
const db = new sqlite.DatabaseSync(':memory:', { allowExtension: true });
db.enableLoadExtension(true);
const sv = await import('sqlite-vec');
sv.load(db);
db.prepare('SELECT vec_version() as v').get();
// → { v: 'v0.1.9' }  ✅

Root cause

manager-jzSMQjEt.js:1843:

function logMemoryVectorDegradedWrite(params) {
  if (!params.vectorEnabled || params.vectorReady || params.chunkCount <= 0 || params.warningShown) return params.warningShown;
  const errDetail = params.loadError ? `: ${params.loadError}` : "";
  params.warn(`chunks_vec not updated — sqlite-vec unavailable${errDetail}. Vector recall degraded. Further duplicate warnings suppressed.`);
  return true;
}

The condition fires whenever vectorReady === false. vectorReady requires a valid dimensions param from a successful embedding call (ensureVectorReady, line 1031). Without a working embedding provider, dimensions is undefined, the vector table is never created, and the warning falsely blames sqlite-vec — even though loadSqliteVecExtension succeeded and loadError is null.

This is likely the same surface symptom reported in #65156, but the underlying mechanism is different (and that issue's ABI-mismatch hypothesis does not apply here).

Suggested fix

Distinguish the warning message:

  • Only mention sqlite-vec when loadVectorExtension() itself failed (i.e., vector.loadError is set).
  • When the extension loaded but vectorReady is false because no embedding dimensions were ever resolved, surface that instead — e.g., chunks_vec not updated — embedding provider unavailable / dimensions undetermined. Vector recall degraded.

Workaround

Configure a valid embedding provider (OpenAI API key, Voyage, Mistral, etc.) under agents.defaults.memorySearch. Note that openai-codex / ChatGPT subscription OAuth does not provide embedding API access.

extent analysis

TL;DR

Update the warning message in logMemoryVectorDegradedWrite to distinguish between sqlite-vec loading failures and embedding provider unavailability.

Guidance

  • Review the logMemoryVectorDegradedWrite function to understand the conditions that trigger the warning message.
  • Modify the warning message to only mention sqlite-vec when loadVectorExtension() fails, and provide a separate message when vectorReady is false due to missing embedding dimensions.
  • Consider configuring a valid embedding provider (e.g., OpenAI API key, Voyage, Mistral) to resolve the underlying issue.
  • Verify that the updated warning message accurately reflects the root cause of the issue.

Example

function logMemoryVectorDegradedWrite(params) {
  if (!params.vectorEnabled || params.vectorReady || params.chunkCount <= 0 || params.warningShown) return params.warningShown;
  if (params.loadError) {
    const errDetail = `: ${params.loadError}`;
    params.warn(`chunks_vec not updated — sqlite-vec unavailable${errDetail}. Vector recall degraded. Further duplicate warnings suppressed.`);
  } else {
    params.warn(`chunks_vec not updated — embedding provider unavailable / dimensions undetermined. Vector recall degraded.`);
  }
  return true;
}

Notes

The suggested fix requires modifying the logMemoryVectorDegradedWrite function to provide more accurate warning messages. The workaround involves configuring a valid embedding provider to resolve the underlying issue.

Recommendation

Apply the suggested fix to update the warning message, as it provides a more accurate diagnosis of the issue. This will help distinguish between sqlite-vec loading failures and embedding provider unavailability, making it easier to identify and resolve the root cause.

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