Bug Report
Description
openclaw memory index --force consistently fails with Memory index failed (main): fetch failed on a workspace with 1400+ .md files. After 2 failures, batch mode is permanently disabled (Batch: disabled (failures 0/2)), making re-indexing impossible without restarting gateway.
Environment
- OpenClaw version: 2026.3.24
- OS: macOS 26.3 (arm64)
- Node: v25.8.1
- Memory plugin: memory-core (stock, loaded)
- Embedding provider: openai / text-embedding-3-small
- OpenAI tier: Tier 3
Steps to Reproduce
- Have a workspace with 1400+
.md files in memory/
- Run
openclaw memory index --force --verbose
- Observe 100-200+
[memory] embeddings: batch start lines
- Process fails with
Memory index failed (main): fetch failed
Expected Behavior
Indexing completes successfully with proper retry/backoff on rate limits.
Actual Behavior
- Indexer fires all batches in parallel (no concurrency limit)
- One batch fails (rate limit or timeout)
- Entire transaction rolls back
Batch: disabled (failures 0/2) — batch mode disabled permanently until gateway restart
- Subsequent runs fail immediately
Logs
[memory] sync: indexing memory files
[memory] embeddings: batch start (x200+)
[memory] embeddings rate limited; retrying in 574ms
Memory index failed (main): fetch failed
[memory] sync failed (session-start): TypeError: fetch failed
[memory] sync failed (search): TypeError: fetch failed
Workarounds Tried
- Reducing workspace size (moved sessions/, backups/, _nonmd/ out of memory/) — no effect
- Clearing sqlite store — no effect
- Waiting for rate limits to reset — no effect
- Increasing OpenAI tier — no effect
Suggested Fix
- Add concurrency limit to embedding batch processing (e.g. max 5 parallel batches)
- Proper exponential backoff on 429/rate-limit responses
- Do NOT disable batch mode globally after N failures — retry per-batch instead
- Persist partial index progress so failed runs can resume
Bug Report
Description
openclaw memory index --forceconsistently fails withMemory index failed (main): fetch failedon a workspace with 1400+.mdfiles. After 2 failures, batch mode is permanently disabled (Batch: disabled (failures 0/2)), making re-indexing impossible without restarting gateway.Environment
Steps to Reproduce
.mdfiles inmemory/openclaw memory index --force --verbose[memory] embeddings: batch startlinesMemory index failed (main): fetch failedExpected Behavior
Indexing completes successfully with proper retry/backoff on rate limits.
Actual Behavior
Batch: disabled (failures 0/2)— batch mode disabled permanently until gateway restartLogs
Workarounds Tried
Suggested Fix