Skip to content

[Bug]: memory_search tool reports "index metadata is missing" while CLI memory index is healthy #90650

Description

@karpiocamara

Bug type

Tool/runtime regression: CLI search works, agent tool fails.

Summary

The memory_search tool invoked from the agent returns disabled: true with "index metadata is missing", even though the CLI reports the memory index as healthy and CLI search returns results.

This happens after rebuilding the index and restarting the gateway.

Environment

  • OpenClaw: 2026.6.1
  • Install: npm global inside Docker container
  • Deploy: Docker on VPS
  • Memory plugin: memory-core
  • Memory backend: builtin SQLite + sqlite-vec
  • Embedding provider: OpenAI
  • Embedding model: text-embedding-3-small
  • Agent: main

Both CLI paths report the same version:

/usr/local/bin/openclaw --version
/data/.npm-global/bin/openclaw --version

Both return:

OpenClaw 2026.6.1 (2e08f0f)

Steps to reproduce

  1. Rebuild memory index:
openclaw memory index --force
  1. Restart the gateway/container.

  2. Check index status:

openclaw memory status --index --agent main
  1. Run CLI search:
openclaw memory search --agent main --query "proyecto wordpress agentes"
  1. Invoke memory_search from the agent tool chain with a similar query.

Expected behavior

memory_search should use the same ready index and return results.

Actual behavior

CLI status reports the index is healthy:

Memory index complete.
Memory Search (main)
Provider: openai (requested: openai)
Model: text-embedding-3-small
Sources: memory
Indexed: 18/18 files · 58 chunks
Dirty: no
Embeddings: ready
Vector store: ready
Semantic vectors: ready
Vector dims: 1536
FTS: ready

CLI search works and returns results.

But agent tool invocation fails with:

{
  "disabled": true,
  "error": "index metadata is missing"
}

In some cases the tool also reports that the index was built with different embedding provider/model/settings, despite CLI status showing openai/text-embedding-3-small.

Workaround

Use the CLI explicitly with the agent id:

openclaw memory search --agent main --query "<query>"

This works while the memory_search tool fails.

Additional context

This may be either:

  • the memory_search tool checking metadata differently than openclaw memory index --force writes it, or
  • the tool resolving a different/default agent index than main.

The CLI default search behavior also appears sensitive to agent selection; --agent main works reliably.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High-priority user-facing bug, regression, or broken workflow.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions