Skip to content

Dreaming promotion writes raw Candidate data into MEMORY.md (no distillation) #67580

@fkc0p

Description

@fkc0p

Summary

Dreaming short-term promotion writes raw Candidate: User/Assistant: ... confidence: 0.00 evidence: ... lines directly into MEMORY.md without any summarization or distillation.

Problem

The promotion pipeline works as follows:

  1. active-memory extracts recall entries from conversations → stored in .dreams/short-term-recall.json
  2. Dreaming Light/REM phases write these raw recall entries (including internal metadata like confidence, evidence, status) into memory/YYYY-MM-DD.md under managed dreaming blocks
  3. On the next sweep, memory/YYYY-MM-DD.md is scanned as a short-term memory source
  4. rehydratePromotionCandidate() reads the original text range and returns it as snippet
  5. buildPromotionSection() writes the raw snippet directly into MEMORY.md

This creates a garbage feedback loop: dreaming output flows back into memory sources, gets re-ingested, and raw internal data (Candidate entries with confidence scores, evidence paths, status fields) gets promoted as "long-term memory."

Expected Behavior

Promoted entries in MEMORY.md should be distilled/summarized knowledge, not raw dreaming pipeline artifacts.

Actual Behavior

MEMORY.md gets filled with entries like:

- Candidate: User: System: [2026-04-10 15:04:28 GMT+8] Model switched to codex-manager/gpt-5.4. Conversation info (untrusted metadata): ```json { "message_id": "1492058021642113084"... - confidence: 0.00 - evidence: memory/.dreams/session-corpus/2026-04-10.txt:40-40 - recalls: 0 - status: staged

Suggested Fixes

  1. Strip dreaming metadata before writing to daily files: When Light/REM phases write to memory/YYYY-MM-DD.md, filter out lines matching Candidate:, confidence:, evidence:, status: staged patterns
  2. Add a distillation step before promotion: Run the snippet through an LLM call to summarize/extract key facts before writing to MEMORY.md
  3. Filter managed dreaming blocks from daily ingestion: When scanning memory/YYYY-MM-DD.md for short-term recall, skip content inside <!-- openclaw:dreaming:xxx:start/end --> managed blocks to prevent feedback loops

Environment

  • OpenClaw 2026.4.11
  • memory.backend: qmd
  • dreaming.enabled: true, frequency: 0 3 * * *
  • active-memory: enabled

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions