-
-
Notifications
You must be signed in to change notification settings - Fork 79.1k
Memory index meta never written when gateway auto-sync finds identity missing with existing chunks #90338
Copy link
Copy link
Closed
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.ClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.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: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.ClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.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: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Bug Report
Version: OpenClaw 2026.6.1 (2e08f0f)
OS: macOS 15.4.0 (arm64, M4 Mac Mini)
Summary
The gateway's memory auto-sync creates a dead loop: it indexes files (creating chunks) but never writes the
metatable entry (memory_index_meta_v1), soindexIdentityStateremains "missing" forever. Allmemory_searchcalls return"index metadata is missing"with 0 results.Root Cause (from source analysis)
In
manager-dZw31DAG2.js, therunSync()method at ~line 2073:The condition
needsFullReindexisfalsewhenhasIndexedChunksis true (which it is, because the sync itself just created chunks). So after the first sync cycle:hasIndexedChunks= true (sync created chunks)needsInitialIndex= false (has chunks)needsExplicitIdentityReindex= false (not CLI-triggered)Reproduction
metatable inomes-vec.db(e.g., after DB corruption or version upgrade)openclaw gateway startmemory_searchreturns"index metadata is missing"openclaw memory index --forcefrom CLI writes meta correctlyWorkaround Attempted
openclaw gateway stop→ clear DB →openclaw memory index --force→openclaw gateway startEnvironment
openai-compatible(local oMLX on localhost:8000, modelbge-m3-mlx-fp16)~/.openclaw/memory/omes-vec.db(SQLite with sqlite-vec)providerState: pendingafter gateway startsExpected Behavior
When gateway auto-sync encounters identity "missing" but has indexed chunks (from its own sync or CLI), it should either:
needsInitialIndex = true