-
-
Notifications
You must be signed in to change notification settings - Fork 79.1k
Bug: isShortTermMemoryPath regex skips daily memory files with timestamp suffixes (e.g. YYYY-MM-DD-HHMM.md) #90896
Copy link
Copy link
Closed
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.ClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, 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.Very strong issue quality with high-confidence source-level or clear reproduction.
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.ClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, 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.Very strong issue quality with high-confidence source-level or clear reproduction.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Bug Description
isShortTermMemoryPath()in the dreamingdoctor.memory.statusendpoint fails to match daily memory files that have timestamp suffixes in their names (e.g.memory/2026-05-28-1503.md). Only files matching the strictmemory/YYYY-MM-DD.mdpattern are counted.This causes
promotedToday,shortTermCount, andpromotedTotalto show incorrect values in the WebUI Dreams tab.Root Cause
The regex in
isShortTermMemoryPath():/(?:^|\/)memory\/(\d{4})-(\d{2})-(\d{2})\.md$/Only matches
memory/YYYY-MM-DD.md. Files with timestamp suffixes likememory/YYYY-MM-DD-HHMM.mdare skipped.Impact
shortTermCountunderreports by filtering out entries with timestamp-suffixed pathsdoctor.memory.statusAPI returns incorrect statsEvidence
Recall store (
memory/.dreams/short-term-recall.json) contains entries with paths like:memory/2026-05-28-1503.md❌ (skipped by regex)memory/2026-05-28-1652.md❌ (skipped by regex)memory/2026-05-28.md✅ (matches regex)Testing the regex against all 512 recall store entries:
isShortTermMemoryPathfilterThe 2 entries promoted today both have timestamp-suffixed paths and are skipped, so
promotedTodaystays at 0.Related Issues
memory/daily/YYYY-MM-DD.md)Suggested Fix
Update the regex to also match timestamp-suffixed filenames:
/(?:^|\/)memory\/(\d{4})-(\d{2})-(\d{2})(?:-\d{4})?\.md$/Or use a more flexible pattern that handles both formats.
Environment