openclaw - 💡(How to fix) Fix [Bug]: Dreaming light-phase work summary repeats verbatim across hourly cycles, producing apparent duplicates in DREAMS.md [1 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#72096Fetched 2026-04-27 05:34:56
View on GitHub
Comments
0
Participants
1
Timeline
1
Reactions
0
Author
Participants
Timeline (top)
cross-referenced ×1

During overnight dreaming, the light-phase work summary block emits identical commit-list content every cycle for ~6 hours, producing apparent duplicates in DREAMS.md. Only the REM reflection block (which precedes each work summary) shows incrementing memory counts, suggesting the REM input pipeline is incremental but the work-summary pipeline is not.

Root Cause

During overnight dreaming, the light-phase work summary block emits identical commit-list content every cycle for ~6 hours, producing apparent duplicates in DREAMS.md. Only the REM reflection block (which precedes each work summary) shows incrementing memory counts, suggesting the REM input pipeline is incremental but the work-summary pipeline is not.

Code Example

Reflections: Theme: `assistant` kept surfacing across 230 memories.;
  confidence: 0.96; evidence: memory/.dreams/session-corpus/2026-04-10.txt:2-2,
  memory/.dreams/session-corpus/2026-04-10.txt:4-4, ...; note: reflection

- Added primary issue extraction for pain notifications so notify
  output explicitly states the shared main issue instead of only
  saying "多源共振". - Updated signals cron notification style ...
  commits: `1124b18` `fix: clarify signals pain notifications` ...

---

Reflections: Theme: `assistant` kept surfacing across 397 memories.;
  confidence: 1.00; evidence: memory/.dreams/session-corpus/2026-04-10.txt:2-2,
  memory/.dreams/session-corpus/2026-04-10.txt:4-4, ...; note: reflection

- Added primary issue extraction for pain notifications so notify
  output explicitly states the shared main issue instead of only
  saying "多源共振". - Updated signals cron notification style ...
  commits: `1124b18` `fix: clarify signals pain notifications` ...
RAW_BUFFERClick to expand / collapse

Summary

During overnight dreaming, the light-phase work summary block emits identical commit-list content every cycle for ~6 hours, producing apparent duplicates in DREAMS.md. Only the REM reflection block (which precedes each work summary) shows incrementing memory counts, suggesting the REM input pipeline is incremental but the work-summary pipeline is not.

Evidence (inline excerpts)

DREAMS.md is auto-published from ~/.openclaw/memory/DREAMS.md. Two adjacent cycles 29 minutes apart, on the same workspace:

April 12, 2026 at 2:00 AM (cycle 1):

Reflections: Theme: `assistant` kept surfacing across 230 memories.;
  confidence: 0.96; evidence: memory/.dreams/session-corpus/2026-04-10.txt:2-2,
  memory/.dreams/session-corpus/2026-04-10.txt:4-4, ...; note: reflection

- Added primary issue extraction for pain notifications so notify
  output explicitly states the shared main issue instead of only
  saying "多源共振". - Updated signals cron notification style ...
  commits: `1124b18` `fix: clarify signals pain notifications` ...

April 12, 2026 at 2:29 AM (cycle 2, 29 min later):

Reflections: Theme: `assistant` kept surfacing across 397 memories.;
  confidence: 1.00; evidence: memory/.dreams/session-corpus/2026-04-10.txt:2-2,
  memory/.dreams/session-corpus/2026-04-10.txt:4-4, ...; note: reflection

- Added primary issue extraction for pain notifications so notify
  output explicitly states the shared main issue instead of only
  saying "多源共振". - Updated signals cron notification style ...
  commits: `1124b18` `fix: clarify signals pain notifications` ...

The REM reflection block went 230 memories397 memories (so the cycle did fire fresh and saw new corpus), but the work-summary block is byte-for-byte identical, including the same commit hash 1124b18.

This pattern continues across the same night for 6 cycles (2:00 / 2:29 / 3:29 / 4:29 / 5:29 / 6:29 AM) and the next night for another 5 cycles, producing the same 1124b18 work-summary block emitted verbatim 11 times across two nights. REM memory count climbs through 230 → 397 → 551 → 705 → 846 → 987 → 1239 → 1338 → 1430 → 1526 → 1604 across these cycles.

The full DREAMS.md is in a private repo; happy to share full samples or a session bundle on request.

Steps to reproduce

  1. Have an active workspace with git commits in the last ~24h
  2. Let dreaming run overnight (heartbeat decoupling per #70737 active)
  3. Observe DREAMS.md the next morning — work-summary content is identical across cycles

Expected behavior

Light-phase work summary should be incremental: only commits that are new since the last cycle's emit should appear. Alternatively, content could be dedup'd against prior entries within the same dreaming session window.

Actual behavior

Each cycle re-summarizes the same fixed window (apparently "last ~24h commits"), without tracking a "last-emitted cutoff" or any dedup against the prior cycle's output. Result: the same commit-list block repeats across every cycle until the underlying commit window rolls forward.

Environment

  • OpenClaw 2026.4.24
  • Heartbeat decoupling (#70737) active
  • Config: minimal — enabled: true, frequency: "0 3 * * *", storage.mode: "separate". No phase-level overrides.
  • Channel: managed dreaming cron + light-phase implicit schedule

Suspected mechanism

Light/deep cycle's commit-summarizer reads a fixed time window from git history (or a corpus snapshot) without tracking a per-phase cutoff timestamp, so identical input → identical output every cycle.

Proposed fix sketch

Persist a per-phase lastEmittedAt in dreaming state; summarizer filters input to commits.timestamp > lastEmittedAt before generating the summary, then advances lastEmittedAt on successful emit.

Related

  • #68882 (closed) added isContaminatedDreamingSnippet filter for promotion candidacy — different layer; that filter does not affect diary write path, which is what this bug is about.
  • #70737 dreaming/heartbeat decoupling — orthogonal; happens upstream of this symptom.

extent analysis

TL;DR

The issue can be fixed by persisting a per-phase lastEmittedAt timestamp in the dreaming state and filtering commits based on this timestamp to ensure incremental summaries.

Guidance

  • Review the proposed fix sketch and consider implementing a lastEmittedAt filter to track the last emitted commit timestamp for each phase.
  • Verify that the commit-summarizer is reading a fixed time window from git history and adjust the logic to use the lastEmittedAt timestamp for filtering.
  • Test the fix by running the dreaming process overnight and checking the DREAMS.md file for incremental summaries.
  • Consider adding logging or debugging statements to monitor the lastEmittedAt timestamp and commit filtering process.

Example

// Pseudo-code example of the proposed fix
function generateSummary(commits, lastEmittedAt) {
  const filteredCommits = commits.filter(commit => commit.timestamp > lastEmittedAt);
  const summary = generateSummaryText(filteredCommits);
  // Update lastEmittedAt timestamp on successful emit
  lastEmittedAt = filteredCommits[filteredCommits.length - 1].timestamp;
  return summary;
}

Notes

The fix relies on the ability to persist and retrieve the lastEmittedAt timestamp for each phase. The implementation details may vary depending on the specific storage mechanism used by the dreaming state.

Recommendation

Apply the proposed fix by implementing the lastEmittedAt filter and updating the commit-summarizer logic to ensure incremental summaries. This should resolve the issue of duplicate commit lists in the DREAMS.md file.

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…

FAQ

Expected behavior

Light-phase work summary should be incremental: only commits that are new since the last cycle's emit should appear. Alternatively, content could be dedup'd against prior entries within the same dreaming session window.

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 - 💡(How to fix) Fix [Bug]: Dreaming light-phase work summary repeats verbatim across hourly cycles, producing apparent duplicates in DREAMS.md [1 participants]