-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
agentmemory__memory_search returns "index metadata is missing" persistently (memory-core manager state cache) #90414
Copy link
Copy link
Open
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.ClawSweeper 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 marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper 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.ClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.Auth, provider routing, model choice, or SecretRef resolution may break.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.Good issue quality with a plausible reproduction path needing some confirmation.
Description
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.ClawSweeper 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 marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper 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.ClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.Auth, provider routing, model choice, or SecretRef resolution may break.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.Good issue quality with a plausible reproduction path needing some confirmation.
Type
Fields
Priority
None yet
Bug: agentmemory__memory_search returns "index metadata is missing" persistently
Environment
npm view openclaw version)Summary
The runtime tool
agentmemory__memory_searchconsistently returns the error"index metadata is missing"with the action hint "Tell the user to run: openclaw memory status --index or openclaw memory index --force" — even when the underlying infrastructure is healthy.Reproduction
~/.openclaw/memory/{agent}.sqlitehas emptymetatable on gateway startupopenclaw memory index --forceto reindex all 12 agents (meta table populated, all 12 agents have 1 row with correctmodel: voyage-4-large, provider: voyage)openclaw memory search "anything" --agent cleofrom CLI → works, returns results or "no matches"memory_searchtool from agent runtime → returns "index metadata is missing"kill -USR1 <gateway_pid>→ tool still returns same errorsystemctl --user restart openclaw-gateway→ tool still returns same error after gateway comes backnpm update -g openclaw(no version change, but 285 deps updated) → tool still brokenExpected
Tool should use the live DB state and return results once meta table is populated.
Actual
Tool returns
{"error":"index metadata is missing","action":"Tell the user to run: openclaw memory status --index or openclaw memory index --force."}consistently.Technical investigation
/usr/lib/node_modules/openclaw/dist/manager-dZw31DAG2.js(memory-core manager)resolveMemoryIndexIdentityState({meta, provider, providerKey, ...})returns{status:"missing", reason:"index metadata is missing"}whenmetais nullthis.indexIdentityStateONCE at construction; subsequent reindex doesn't refresh itindexIdentityStateis consulted at search time, so search returns the stale "missing" statusWhat works (workaround)
openclaw memory search(uses fresh DB read each time)memory_gettool (file-based, not index-based)POST http://localhost:3111/agentmemory/search(direct, bypasses manager)What doesn't work
agentmemory__memory_searchtool from any agent runtimeSuggestion
Two possible fixes:
manager-dZw31DAG2.js, add a periodic revalidation ofindexIdentityStateagainst the live DB (e.g., on each search, or every N minutes)updateIndexIdentityStatecallable from CLI/external triggerImpact
Medium. The workaround is functional but the tool exposed to agents is essentially dead for search, requiring workaround via curl in shell commands. Multi-agent setups that rely on the search tool are affected.
Workaround (for users hitting this)
Documented at
/root/.openclaw/workspace/main/runbooks/memory-search-workaround.md. Usememory_getfor file reads andcurlto REST API for semantic search.