Skip to content

[Bug]: Memory indexer skips session files - only indexes memory/*.md #17576

Description

@TarsAI-Agent

Summary

openclaw memory index --agent main completely ignores session files during sync, only processing memory/*.md files even when sources includes "sessions".

Steps to reproduce

  1. Have session files in ~/.openclaw/agents/main/sessions/
  2. Ensure config has sources: ["memory", "sessions"] and experimental.sessionMemory: true
  3. Run openclaw memory index --agent main --verbose
  4. Observe output shows only [memory] sync: indexing memory files
  5. No [memory] sync: indexing session files appears

Expected behavior

Indexer should detect all session files in the sessions directory and embed them into the vector store.

Actual behavior

Indexer skips sessions entirely. Output shows:

[memory] sync: indexing memory files
Memory index updated (main).

Session count remains at 0 even with 3600+ session files on disk.

OpenClaw version

2026.2.14

Operating system

Linux 6.17.0-14-generic (x64)

Install method

npm global

Logs, screenshots, and evidence

$ openclaw memory status
Sources: memory, sessions
Indexed: 16/3622 files · 104 chunks
By source:
  memory · 16/16 files · 104 chunks
  sessions · 0/3606 files · 0 chunks

$ openclaw memory index --agent main --verbose
[memory] sync: indexing memory files
Memory index updated (main).


Config excerpt:

"memorySearch": {
  "enabled": true,
  "sources": ["memory", "sessions"],
  "experimental": { "sessionMemory": true }
}

Impact and severity

  • Affected: All users with session memory enabled
  • Severity: High - memory search returns incomplete/empty results
  • Frequency: 100% repro
  • Consequence: Agent loses ability to recall conversation history from sessions

Additional information

  • Session files exist at correct path (~/.openclaw/agents/main/sessions/*.jsonl)
  • Database shows sources include "sessions"
  • Deleting DB and re-running index produces same result
  • Both --force and without --force behave identically
  • Workaround: Restore from backup if available

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions