Skip to content

Feature: memory_search should support recursive subdirectory search (memory/**/*.md) #34400

Description

@leafbird

Summary

memory_search currently only searches MEMORY.md and memory/*.md (single depth). Files inside subdirectories like memory/2026-02/2026-02-15.md are not included in search results.

Use Case

As daily memory files (memory/YYYY-MM-DD.md) accumulate over months, users may want to organize them into monthly subdirectories (memory/2026-02/, memory/2026-03/, etc.) for better file management. However, doing so breaks memory recall since those files become invisible to memory_search.

Proposal

Change the search glob from memory/*.md to memory/**/*.md (recursive) so that markdown files in subdirectories are also indexed and searchable.

Impact

  • The search is embedding-based, so adding more files from subdirectories should have minimal performance impact (same total file count, just different directory structure).
  • This would be a non-breaking change — existing flat-structure setups would work identically.

Environment

  • OpenClaw version: 2026.2.26
  • Local embedding model: nomic-embed-text-v1.5

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal backlog priority with limited blast radius.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:session-stateSession, 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.

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions