openclaw - 💡(How to fix) Fix Dreaming deep phase: minUniqueQueries gate bypassed by day-diversity counting

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…

The deep phase promotion gate minUniqueQueries does not require genuinely distinct recall queries. In the source code (short-term-promotion-*.js, lines ~1198-1200 and ~1438-1439), the gate uses max(uniqueQueries, recallDays.length), which means repeated resurfacing across different days can pass the "unique queries" threshold even when the entry was never actually recalled by a real conversational query.

Root Cause

Raising thresholds (minScore: 0.75, minRecallCount: 5, minUniqueQueries: 4) reduces the noise but doesn't fix the root cause.

Fix Action

Workaround

Raising thresholds (minScore: 0.75, minRecallCount: 5, minUniqueQueries: 4) reduces the noise but doesn't fix the root cause.

Code Example

<!-- openclaw-memory-promotion:memory:memory/2026-05-22.md:13:16 -->
- | Trade | P&L | |-------|-----| | HOOD $78C 5/22 x10 expired OTM | +$670 | 
[score=0.718 recalls=0 avg=0.620 source=memory/2026-05-22.md:13-16]

---

const uniqueQueries = Math.max(entry.uniqueQueries || 0, (entry.recallDays || []).length);

---

const uniqueQueries = entry.uniqueQueries || 0;
RAW_BUFFERClick to expand / collapse

Summary

The deep phase promotion gate minUniqueQueries does not require genuinely distinct recall queries. In the source code (short-term-promotion-*.js, lines ~1198-1200 and ~1438-1439), the gate uses max(uniqueQueries, recallDays.length), which means repeated resurfacing across different days can pass the "unique queries" threshold even when the entry was never actually recalled by a real conversational query.

Impact

This causes daily report fragments, P&L tables, and boilerplate headings (e.g., "Jonathan's key messages today", "What I was working on when flush hit") to promote into MEMORY.md as durable memory. In a multi-agent fleet running daily crons, this fills MEMORY.md with noise rather than genuinely important, recall-validated content.

Evidence

In our fleet (9 active agents), nearly all promoted entries have recalls=0 and identical avg=0.620 scores, indicating they were promoted via day-diversity rather than real recall evidence. Example from a promoted entry:

<!-- openclaw-memory-promotion:memory:memory/2026-05-22.md:13:16 -->
- | Trade | P&L | |-------|-----| | HOOD $78C 5/22 x10 expired OTM | +$670 | 
[score=0.718 recalls=0 avg=0.620 source=memory/2026-05-22.md:13-16]

recalls=0 — this entry was never actually recalled by any query, yet it passed the minUniqueQueries=2 gate.

Expected Behavior

minUniqueQueries should count genuinely distinct query strings or query contexts that surfaced the entry, not substitute recallDays.length as a fallback. Day diversity should be a separate signal (it already has its own weight in the ranking formula as "Consolidation"), not a bypass for the query diversity gate.

Suggested Fix

In the deep phase scoring and apply steps, change:

const uniqueQueries = Math.max(entry.uniqueQueries || 0, (entry.recallDays || []).length);

to:

const uniqueQueries = entry.uniqueQueries || 0;

And keep day-diversity as a ranking signal only, not a gate bypass.

Workaround

Raising thresholds (minScore: 0.75, minRecallCount: 5, minUniqueQueries: 4) reduces the noise but doesn't fix the root cause.

Environment

  • OpenClaw 2026.5.22
  • memory-core plugin with dreaming enabled
  • 9 agents, daily cron sweep at 3 AM ET

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