Bug Description
isShortTermMemoryPath() in short-term-promotion fails to match daily memory files stored in memory/daily/YYYY-MM-DD.md because the regex patterns only match memory/YYYY-MM-DD.md (no subdirectory).
This means the recall store (memory/.dreams/short-term-recall.json) is never written, and dreaming has zero data to work with.
Root Cause
Three regexes in the function all fail for paths like memory/daily/2026-04-09.md:
SHORT_TERM_PATH_RE (/memory\/(\d{4})-(\d{2})-(\d{2})\.md$/) — expects memory/YYYY-MM-DD.md, no subdirectory
SHORT_TERM_SESSION_CORPUS_RE — only matches sessions/ paths
SHORT_TERM_BASENAME_RE (/^(\d{4})-(\d{2})-(\d{2})\.md$/) — anchored with ^ but tested against the full path, not the basename
Steps to Reproduce
- Store daily memory notes in
memory/daily/ subdirectory (e.g., memory/daily/2026-04-09.md)
- Run
memory_search — results come back with path: "memory/daily/2026-04-09.md", source: "memory"
recordShortTermRecalls calls isShortTermMemoryPath("memory/daily/2026-04-09.md") — returns false
- No recall traces are ever recorded
- Dreaming cron finds 0 entries and does nothing
Expected Behavior
isShortTermMemoryPath should match daily notes in subdirectories like memory/daily/, memory/notes/, etc. — not just flat memory/YYYY-MM-DD.md.
Suggested Fix
Either:
- Make
SHORT_TERM_PATH_RE tolerate intermediate directories: /memory\/(?:[\w-]+\/)*(\d{4})-(\d{2})-(\d{2})\.md$/
- Or test
SHORT_TERM_BASENAME_RE against path.basename() instead of the full path (which is what the variable name implies)
Workaround
Move daily notes from memory/daily/ to memory/ root. This is what I did to fix my setup.
Environment
- OpenClaw version: 2026.4.9
- OS: macOS (arm64)
- Memory provider: qmd
Bug Description
isShortTermMemoryPath()inshort-term-promotionfails to match daily memory files stored inmemory/daily/YYYY-MM-DD.mdbecause the regex patterns only matchmemory/YYYY-MM-DD.md(no subdirectory).This means the recall store (
memory/.dreams/short-term-recall.json) is never written, and dreaming has zero data to work with.Root Cause
Three regexes in the function all fail for paths like
memory/daily/2026-04-09.md:SHORT_TERM_PATH_RE(/memory\/(\d{4})-(\d{2})-(\d{2})\.md$/) — expectsmemory/YYYY-MM-DD.md, no subdirectorySHORT_TERM_SESSION_CORPUS_RE— only matchessessions/pathsSHORT_TERM_BASENAME_RE(/^(\d{4})-(\d{2})-(\d{2})\.md$/) — anchored with^but tested against the full path, not the basenameSteps to Reproduce
memory/daily/subdirectory (e.g.,memory/daily/2026-04-09.md)memory_search— results come back withpath: "memory/daily/2026-04-09.md",source: "memory"recordShortTermRecallscallsisShortTermMemoryPath("memory/daily/2026-04-09.md")— returnsfalseExpected Behavior
isShortTermMemoryPathshould match daily notes in subdirectories likememory/daily/,memory/notes/, etc. — not just flatmemory/YYYY-MM-DD.md.Suggested Fix
Either:
SHORT_TERM_PATH_REtolerate intermediate directories:/memory\/(?:[\w-]+\/)*(\d{4})-(\d{2})-(\d{2})\.md$/SHORT_TERM_BASENAME_REagainstpath.basename()instead of the full path (which is what the variable name implies)Workaround
Move daily notes from
memory/daily/tomemory/root. This is what I did to fix my setup.Environment