openclaw - ✅(Solved) Fix [Bug]: Dreaming promotion regression — Promoted 0 on v2026.4.29 (reproduction of #64068) [1 pull requests, 2 comments, 3 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#76225Fetched 2026-05-03 04:40:29
View on GitHub
Comments
2
Participants
3
Timeline
3
Reactions
2
Timeline (top)
commented ×2cross-referenced ×1

Root Cause

Root Cause (from #64068)

Fix Action

Fix / Workaround

5. CLI workaround proves data is there

PR fix notes

PR #76359: fix(memory-core): dreaming daily ingestion across calendar days

Description (problem / solution / changelog)

Summary

Deep dreaming promotion could stay at “Promoted 0” when daily notes were unchanged on disk: daily-ingestion.json only stored mtimeMs/size, so later dreaming days skipped re-reading those files. Short-term entries then failed default deep gates (minRecallCount / minUniqueQueries against combined signal counts) even though the underlying content was still eligible.

Root cause

collectDailyIngestionBatches treated “unchanged since last run” as “never ingest again,” which is correct for same-day duplicate runs but wrong across calendar dreaming days when the file content is stable.

Linked issue

Fixes #76225 (related context: #67061 ingestion-day dedupe, #64068).

Why this is safe

  • Still reads the same daily memory files and applies the same recordShortTermRecalls / dedupe rules; we only decide when to open a file again.
  • Same-day runs still skip after a successful ingest for that calendar bucket (no extra I/O or duplicate batches for identical mtime/size on the same day).
  • State is backward compatible: older checkpoints without lastDreamingDayIngested re-ingest once on upgrade, then persist the new field.

Security / runtime controls

Unchanged: memory file read policy, workspace scoping, dreaming triggers, and LLM-facing prompts. This is checkpoint bookkeeping only.

Testing

  • git diff --check origin/main...HEAD
  • pnpm exec vitest run extensions/memory-core/src/dreaming-phases.test.ts -t "increments dailyCount|checkpoints daily ingestion"
  • pnpm check:changed

Out of scope

  • Session transcript checkpoint semantics (separate state machine).
  • Further tuning of default deep promotion thresholds (config feature requests remain separate).

  • AI-assisted PR (implementation and validation run in an agent environment; human review before merge is expected).

Changed files

  • CHANGELOG.md (modified, +1/-0)
  • extensions/memory-core/src/dreaming-phases.test.ts (modified, +2/-12)
  • extensions/memory-core/src/dreaming-phases.ts (modified, +26/-2)

Code Example

$ openclaw memory promote --agent general --min-recall-count 0 --json
10 candidates, ALL with recallCount: 0, uniqueQueries: 1

---

# Deep Sleep
- Repaired recall artifacts: rewrote recall store.
- Ranked 10 candidate(s) for durable promotion.
- Promoted 0 candidate(s) into MEMORY.md.

---

coding   last modified 2026-04-27
finance  last modified 2026-04-27
general  last modified 2026-04-25
health   last modified 2026-04-27
network  last modified 2026-04-30
study    last modified 2026-04-24
truth    last modified 2026-04-23

---

Before 4/25 update: ~420-580s per run (full candidate processing)
After  4/25 update:  ~25-52s  per run (summary = "NO_REPLY")

---

$ openclaw memory promote --agent general --min-recall-count 0 --min-unique-queries 1 --limit 10
Returns 10 candidates with scores 0.807-0.888
RAW_BUFFERClick to expand / collapse

Bug Description

Regression on v2026.4.29 (a448042): #64068 was closed as "resolved" on 4/12, but the dreaming promotion pipeline is still completely broken — 7 agents, 11 consecutive days of Promoted 0.

Environment

  • OpenClaw 2026.4.29 (a448042), installed via Homebrew May 1
  • macOS 15.4 arm64, Node.js v22.22.2
  • 7 agents: general, coding, finance, health, network, study, truth
  • Dreaming cron: daily 3AM Asia/Taipei (0 3 * * *)

Evidence

1. All 920+ entries have recallCount = 0

$ openclaw memory promote --agent general --min-recall-count 0 --json
→ 10 candidates, ALL with recallCount: 0, uniqueQueries: 1

2. Deep phase output — 11 days of zero promotions

Every day since 4/22:

# Deep Sleep
- Repaired recall artifacts: rewrote recall store.
- Ranked 10 candidate(s) for durable promotion.
- Promoted 0 candidate(s) into MEMORY.md.

Only 4/21 had Promoted 1 — the last successful promotion.

3. All 7 agents' MEMORY.md frozen

coding   last modified 2026-04-27
finance  last modified 2026-04-27
general  last modified 2026-04-25
health   last modified 2026-04-27
network  last modified 2026-04-30
study    last modified 2026-04-24
truth    last modified 2026-04-23

4. Cron job runtime collapsed

Before 4/25 update: ~420-580s per run (full candidate processing)
After  4/25 update:  ~25-52s  per run (summary = "NO_REPLY")

The agent is no longer processing dreaming data — 15x runtime reduction.

5. CLI workaround proves data is there

$ openclaw memory promote --agent general --min-recall-count 0 --min-unique-queries 1 --limit 10
→ Returns 10 candidates with scores 0.807-0.888

Candidates exist with high scores, but recallCount stuck at 0 prevents promotion.

Root Cause (from #64068)

The normalized recall artifacts before dreaming (rewrote recall store) step resets recallCount to 0 on every dreaming cycle, making promotion permanently impossible. The fix committed for #64068 (which closed it 4/12) appears to have been regressed or was incomplete.

Expected Behavior

  • recallCount persists and accumulates across dreaming cycles
  • High-signal entries eventually promoted to MEMORY.md
  • Agents build long-term memory over time

Related

  • #64068 (closed as "resolved" 4/12, but still broken on 4.29)
  • #67061 (closed, no comments)
  • #65402 (closed, feature request for configurable thresholds)

extent analysis

TL;DR

Revert or patch the normalized recall artifacts before dreaming step to prevent resetting recallCount to 0, allowing recall counts to accumulate across dreaming cycles.

Guidance

  • Review the fix committed for #64068 and verify it was correctly applied to the current version (2026.4.29) to ensure recallCount persists across dreaming cycles.
  • Temporarily modify the --min-recall-count threshold to a lower value (e.g., -1) to force promotion of high-signal entries and verify the promotion pipeline is functional.
  • Investigate the cron job runtime collapse and ensure the dreaming data processing is correctly executed, potentially by increasing the runtime or adjusting the cron job configuration.
  • Verify the recallCount accumulation by checking the output of openclaw memory promote with --json flag after multiple dreaming cycles.

Example

No code snippet is provided as the issue does not imply a specific code change, but rather a fix to the existing functionality.

Notes

The provided information suggests a regression in the fix for #64068. The actual fix may require re-applying or modifying the original patch to ensure recallCount accumulates correctly.

Recommendation

Apply a workaround by temporarily adjusting the --min-recall-count threshold to promote high-signal entries, while investigating the root cause of the regression and applying a permanent fix to the normalized recall artifacts before dreaming step.

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 [Bug]: Dreaming promotion regression — Promoted 0 on v2026.4.29 (reproduction of #64068) [1 pull requests, 2 comments, 3 participants]