Skip to content

[Bug]: Memory search shows only beginning of files instead of relevant snippets #47730

Description

@timo-reuter

Bug type

Regression (worked before, now fails)

Summary

Bug Description

When using openclaw memory search --query "query", the search finds the correct files but only shows the beginning of the file (first ~10-15 lines) instead of the relevant passages where the match occurred.

Steps to Reproduce

  1. Add content deep in a memory file (e.g., on line 50+)
  2. Index the memory: openclaw memory index --force
  3. Search: openclaw memory search --query "query"

Expected

The search should return the relevant passage in context (e.g., lines 45-55).

Actual

The search returns the file path but only shows the beginning of the file (lines 1-15), not the actual match. If the answer is on line 50, it's not visible.

Environment

  • OpenClaw 2026.3.13
  • Memory index: nomic-embed-text (switching to bge-m3)
  • 7 memory files indexed, 15 chunks
  • Mode: hybrid (vector + FTS)

Related

Workaround

None. Users must scroll through entire files to find answers.

Steps to reproduce

  1. Erstelle eine.memory-Datei mit Inhalt weit unten:`
    echo 'Hund: Bella' >> ~/.openclaw/workspace/memory/test.md
  2. Indexiere neu: openclaw memory index --force
  3. Suche: openclaw memory search --query "Hund"
  4. Erwartet: Zeile mit "Hund: Bella"
  5. Tatsache: Nur erste 10-15 Zeilen der Datei, nicht die relevante Zeile

Expected behavior

Erwartet: Die Suche zeigt den relevante Passage (z.B. "Hund: Bella") in Kontext (Zeilen 45-55).

Tatsache: Es wird nur der Dateianfang (Zeilen 1-15) angezeigt, auch wenn die Antwort in Zeile 50 steht.

Actual behavior

  • Gibt Datei zurück, aber nur Zeile 1-15
  • Relevante Passage fehlt
  • Wenn Antwort auf Zeile 50, nicht sichtbar
  • Keine Möglichkeit, die richtige Passage zu finden

OpenClaw version

2026.3.13

Operating system

Windows 11

Install method

npm

Model

ollama kimi-k2.5:cloud

Provider / routing chain

ollama

Config file / key location

.openclaw\openclaw.json

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingregressionBehavior that previously worked and now fails

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions