openclaw - ✅(Solved) Fix Dreaming Promotion — Cron-triggered memory entries saturate ranking, blocking real session recalls [1 pull requests, 1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#74064Fetched 2026-04-30 06:29:09
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Author
Timeline (top)
cross-referenced ×2closed ×1commented ×1

Root Cause

The dreaming promotion system (memory promote) consistently produces 0 promotions despite having numerous candidates with genuine recall signals. The root cause is that cron-triggered daily recall counts (dailyCount) saturate the ranking, crowding out entries that were genuinely recalled in real user sessions (recallCount).

Fix Action

Workaround

# Manually run promotion with lower thresholds
openclaw memory promote --agent main --apply --limit 20

# Or disable daily cron tasks that poll memory (recommended workaround)
openclaw cron list

PR fix notes

PR #74051: fix(memory): keep daily signals out of recall gates

Description (problem / solution / changelog)

Summary

  • prioritize real recalled short-term entries before newer daily-only entries in Light dreaming output
  • keep daily-only dreaming signals out of default promotion/apply minRecallCount gates while preserving grounded evidence
  • widen live-note rehydration so moved broad snippets can be relocated before promotion
  • constrain containment relocation to the tightest matching range so adjacent daily-note lines are not promoted
  • document that daily-ingestion signals can affect scoring but do not satisfy the recall-count gate

Fixes #71976

Tests

  • pnpm test extensions/memory-core/src/dreaming-phases.test.ts extensions/memory-core/src/short-term-promotion.test.ts
  • pnpm exec oxfmt --check --threads=1 extensions/memory-core/src/short-term-promotion.ts extensions/memory-core/src/short-term-promotion.test.ts extensions/memory-core/src/dreaming-phases.test.ts docs/concepts/dreaming.md docs/cli/memory.md
  • pnpm check:docs
  • git diff --check origin/main...HEAD

Notes

  • pnpm changed:lanes --json selects extension production, extension test, and docs lanes.
  • Testbox pnpm check:changed was not run because blacksmith is not installed and no OPENCLAW_TESTBOX/BLACKSMITH_ORG configuration is present in this shell.

Changed files

  • docs/cli/memory.md (modified, +2/-2)
  • docs/concepts/dreaming.md (modified, +2/-1)
  • extensions/memory-core/src/dreaming-phases.test.ts (modified, +90/-0)
  • extensions/memory-core/src/dreaming-phases.ts (modified, +5/-1)
  • extensions/memory-core/src/short-term-promotion.test.ts (modified, +184/-5)
  • extensions/memory-core/src/short-term-promotion.ts (modified, +40/-21)

Code Example

OpenClaw: 2026.4.26 (be8c246)
Memory store: ~/.openclaw/workspace/memory/.dreams/short-term-recall.json
Recall store entries: 5830
Recall total signal count: 130 (recallCount) + heavy dailyCount from cron
Promoted: 9 (historical)
Dreaming: enabled, frequency="0 3 * * *"

---

memory:memory/2026-03-31.md:44:85   → recallCount=7,  dailyCount=0
memory:memory/2026-03-31.md:77:111  → recallCount=11, dailyCount=0
memory:memory/2026-04-13.md:240:264  → recallCount=10, dailyCount=0
memory:memory/2026-04-14.md:115:137  → recallCount=10, dailyCount=0

---

Rank  1: recallCount=0, dailyCount=7, score=0.910  ← cron-saturated
Rank  2: recallCount=0, dailyCount=7, score=0.910  ← cron-saturated
...
Rank 15: recallCount=7, dailyCount=0, score=0.864  ← real recall, excluded from top-10

---

minScore: 0.8
minRecallCount: 3        ← requires recallCount ≥ 3
minUniqueQueries: 3
recencyHalfLifeDays: 14
limit: 10

---

# Manually run promotion with lower thresholds
openclaw memory promote --agent main --apply --limit 20

# Or disable daily cron tasks that poll memory (recommended workaround)
openclaw cron list
RAW_BUFFERClick to expand / collapse

🦞 Issue: Dreaming Promotion — Cron-triggered memory entries saturate ranking, blocking real session recalls

Repository: openclaw/openclaw
Version: 2026.4.26 (be8c246)


Bug Description

The dreaming promotion system (memory promote) consistently produces 0 promotions despite having numerous candidates with genuine recall signals. The root cause is that cron-triggered daily recall counts (dailyCount) saturate the ranking, crowding out entries that were genuinely recalled in real user sessions (recallCount).


Environment

OpenClaw: 2026.4.26 (be8c246)
Memory store: ~/.openclaw/workspace/memory/.dreams/short-term-recall.json
Recall store entries: 5830
Recall total signal count: 130 (recallCount) + heavy dailyCount from cron
Promoted: 9 (historical)
Dreaming: enabled, frequency="0 3 * * *"

Steps to Reproduce

  1. Set up daily cron jobs (e.g., 07:40 greeting, 03:00 dreaming trigger)
  2. Use the system for several weeks — real conversations generate meaningful memory signals
  3. Observe that openclaw memory promote returns 0 promoted entries

Technical Details

Data Flow Analysis

SourceFileKey fields
Short-term recallshort-term-recall.jsonrecallCount (real session recalls), dailyCount (cron-triggered recalls)
Phase signalsphase-signals.jsonlightHits, remHits (not recallCount)
Promotion outputshort-term-recall.json candidatesUsed for ranking

Observed Data

short-term-recall.json has real recall data:

memory:memory/2026-03-31.md:44:85   → recallCount=7,  dailyCount=0
memory:memory/2026-03-31.md:77:111  → recallCount=11, dailyCount=0
memory:memory/2026-04-13.md:240:264  → recallCount=10, dailyCount=0
memory:memory/2026-04-14.md:115:137  → recallCount=10, dailyCount=0

But openclaw memory promote top-10 ranking results:

Rank  1: recallCount=0, dailyCount=7, score=0.910  ← cron-saturated
Rank  2: recallCount=0, dailyCount=7, score=0.910  ← cron-saturated
...
Rank 15: recallCount=7, dailyCount=0, score=0.864  ← real recall, excluded from top-10

phase-signals.json shows all-zero recallCount (only lightHits/remHits populated). This file appears to only track dreaming-phase signals, not actual session recalls.

Promoted count in each store:

  • phase-signals.json total recallCount: 0
  • short-term-recall.json total recallCount: 130
  • These two stores are NOT synchronized.

Threshold Configuration

minScore: 0.8
minRecallCount: 3        ← requires recallCount ≥ 3
minUniqueQueries: 3
recencyHalfLifeDays: 14
limit: 10

Hypothesis

  1. Root cause: Cron jobs (daily greeting, health check, etc.) run every day and generate persistent dailyCount signals. These cron-triggered entries accumulate high dailyCount (e.g., 7 consecutive days) and dominate the top-10 ranking by score.

  2. Contributing factor: recallCount entries (real session recalls) have dailyCount=0, so their combined score is lower, placing them outside the top-10 window.

  3. The two stores may be used differently: phase-signals.json tracks dreaming-phase signals (lightHits/remHits) while short-term-recall.json tracks actual session recalls. If the promotion logic reads from phase-signals.json for recallCount, it would see all zeros.


Expected vs Actual Behavior

ExpectedActual
PromotionsReal session recalls promoted after sustained use0 promotions
RankingrecallCount weighted appropriately vs dailyCountdailyCount dominates
Phase signalsSynchronized with recall dataAll zero

Proposed Fixes (for discussion)

  1. Separate ranking tracks: Distinguish cron-triggered (dailyCount) vs session-triggered (recallCount) in the scoring formula — e.g., apply a penalty to purely cron-sourced entries or cap dailyCount contribution.

  2. Increase limit: From 10 to 50+ so that high-recallCount entries below the top-10 cut-off can still be promoted.

  3. Add dailyCount cap: Cap dailyCount contribution after N days to prevent cron刷屏 (e.g., max 2 days of cron signal).

  4. Separate promotion source: Ensure recallCount is read from short-term-recall.json (which has real data) rather than phase-signals.json (which appears to only track dreaming-phase hits).


Workaround

# Manually run promotion with lower thresholds
openclaw memory promote --agent main --apply --limit 20

# Or disable daily cron tasks that poll memory (recommended workaround)
openclaw cron list

Additional Context

  • openclaw memory status --deep shows: recall store: 5830 entries · 9 promoted
  • short-term-recall.json updated: 2026-04-28T19:00:45.081Z
  • phase-signals.json updated: 2026-04-28T19:00:00.483Z
  • No lock files present; promotion not blocked

extent analysis

TL;DR

The most likely fix is to modify the promotion logic to distinguish between cron-triggered and session-triggered recall counts, ensuring that real session recalls are weighted appropriately.

Guidance

  • Review the scoring formula to apply a penalty to purely cron-sourced entries or cap dailyCount contribution to prevent cron-triggered entries from dominating the ranking.
  • Consider increasing the limit parameter to allow high-recallCount entries to be promoted even if they are not in the top-10.
  • Verify that the promotion logic reads recallCount from short-term-recall.json instead of phase-signals.json to ensure accurate recall data.
  • Temporarily disable daily cron tasks that poll memory to prevent dailyCount from accumulating and dominating the ranking.

Example

No code snippet is provided as the issue requires a logical change to the promotion logic rather than a code fix.

Notes

The provided workaround suggests manually running promotion with lower thresholds or disabling daily cron tasks, but a more permanent solution requires modifying the promotion logic to handle cron-triggered and session-triggered recall counts differently.

Recommendation

Apply a workaround by disabling daily cron tasks that poll memory to prevent dailyCount from accumulating and dominating the ranking, as this is a simple and effective temporary solution.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - ✅(Solved) Fix Dreaming Promotion — Cron-triggered memory entries saturate ranking, blocking real session recalls [1 pull requests, 1 comments, 2 participants]