Bug type
Behavior bug (incorrect output quality)
Summary
Dreaming can stage raw transport/session metadata as durable short-term candidates and later promote that garbage into MEMORY.md.
This is more severe than the already-reported "daily file pollution" / "raw session-corpus reflections" issues, because the bad metadata is not only shown in Dream Diary or REM reflections — it can survive the whole pipeline and be written into long-term memory.
In my local run, a generated promotion block in MEMORY.md contained transcript-wrapper noise such as:
Conversation info (untrusted metadata)
Sender (untrusted metadata)
- raw
message_id values (5417, 5421)
- staged-candidate style metadata copied from Dreaming artifacts
I had to manually delete that promotion block from MEMORY.md.
What I observed locally
Environment:
- OpenClaw
2026.4.14
- macOS arm64
- Dreaming enabled via
memory-core
- Default runtime model currently configured as
derouter-gpt/gpt-5.4
Relevant docs currently say Dream Diary runs a background subagent turn using the default runtime model:
docs/concepts/dreaming.md
Relevant local config:
{
"agents": {
"defaults": {
"model": {
"primary": "derouter-gpt/gpt-5.4"
}
}
}
}
Observed pipeline behavior:
- Dreaming generated low-signal candidate/reflection content based on transcript wrapper metadata
- Dreaming output polluted
DREAMS.md and daily memory files
- A deep-phase promotion block was appended to
MEMORY.md
- That promotion block contained metadata garbage rather than a distilled memory
The removed bad block in MEMORY.md was under a heading like:
## Promoted From Short-Term Memory (2026-04-16)
and included a promotion marker pointing back to a daily-memory source range, but the promoted content itself contained transport/session metadata rather than a real durable fact.
Why this seems distinct from existing issues
There are already related issues, but this appears to be the next step of the same contamination chain:
What I am reporting here is the combination of those problems in one live path:
raw transport metadata -> staged candidate / diary pollution -> daily memory pollution -> erroneous promotion into MEMORY.md
So even if the Dream Diary / daily-file pollution is tolerated temporarily, the current pipeline can still corrupt long-term memory quality.
Expected behavior
Transport-layer/session-wrapper text should never become a promotable durable-memory candidate.
At minimum, the pipeline should reject candidates/snippets containing patterns like:
Conversation info (untrusted metadata)
Sender (untrusted metadata)
System (untrusted) blocks
- raw JSON envelope blobs
message_id, sender_id, timestamps from inbound wrappers
- reply tags such as
[[reply_to_current]]
And deep promotion should refuse to write such content into MEMORY.md even if it somehow survives earlier filters.
Actual behavior
Metadata garbage can survive multiple stages and end up in MEMORY.md.
Likely root cause
This looks like a defense-in-depth gap across multiple layers:
- Session-corpus ingestion does not sufficiently strip transport wrappers
- Light/REM candidate generation treats metadata-heavy text as valid evidence
- Daily-file inline dreaming output makes the bad snippets easier to persist and re-ingest
- Deep promotion trusts
candidate.snippet too much and does not run a final "is this memory-worthy / is this metadata garbage" gate before appending to MEMORY.md
Suggested fixes
-
Ingress filtering
- Strip inbound envelope blocks and reply tags before Dreaming corpus generation
- Exclude
Conversation info, Sender, System (untrusted), raw JSON objects, and obvious metadata keys
-
Candidate validation
- Reject staged candidates whose snippet is dominated by metadata tokens / ids / wrapper text
- Downrank or zero-score candidates containing
message_id, sender_id, timestamps, or channel envelope markers
-
Promotion safety gate
- Before appending to
MEMORY.md, run a deterministic final filter:
- if snippet matches metadata-wrapper heuristics -> skip promotion
- optionally log the skip reason into dreaming events for debugging
-
Write-path separation
-
Distilled promotion
Impact
Medium to high.
Low-quality Dream Diary output is annoying but recoverable. Pollution of MEMORY.md is worse, because users may trust it as curated long-term memory and not notice that transport metadata has been promoted as if it were meaningful autobiographical memory.
Extra note
I already manually cleaned the affected local files, so I cannot paste the full bad block verbatim anymore without restoring it from history. But the concrete garbage pattern was unmistakable: Conversation info / Sender / raw message_id fields had been promoted into MEMORY.md as if they were a legitimate durable memory.
Bug type
Behavior bug (incorrect output quality)
Summary
Dreaming can stage raw transport/session metadata as durable short-term candidates and later promote that garbage into
MEMORY.md.This is more severe than the already-reported "daily file pollution" / "raw session-corpus reflections" issues, because the bad metadata is not only shown in Dream Diary or REM reflections — it can survive the whole pipeline and be written into long-term memory.
In my local run, a generated promotion block in
MEMORY.mdcontained transcript-wrapper noise such as:Conversation info (untrusted metadata)Sender (untrusted metadata)message_idvalues (5417,5421)I had to manually delete that promotion block from
MEMORY.md.What I observed locally
Environment:
2026.4.14memory-corederouter-gpt/gpt-5.4Relevant docs currently say Dream Diary runs a background subagent turn using the default runtime model:
docs/concepts/dreaming.mdRelevant local config:
{ "agents": { "defaults": { "model": { "primary": "derouter-gpt/gpt-5.4" } } } }Observed pipeline behavior:
DREAMS.mdand daily memory filesMEMORY.mdThe removed bad block in
MEMORY.mdwas under a heading like:## Promoted From Short-Term Memory (2026-04-16)and included a promotion marker pointing back to a daily-memory source range, but the promoted content itself contained transport/session metadata rather than a real durable fact.
Why this seems distinct from existing issues
There are already related issues, but this appears to be the next step of the same contamination chain:
memory/YYYY-MM-DD.mdMEMORY.mdwithout distillationWhat I am reporting here is the combination of those problems in one live path:
So even if the Dream Diary / daily-file pollution is tolerated temporarily, the current pipeline can still corrupt long-term memory quality.
Expected behavior
Transport-layer/session-wrapper text should never become a promotable durable-memory candidate.
At minimum, the pipeline should reject candidates/snippets containing patterns like:
Conversation info (untrusted metadata)Sender (untrusted metadata)System (untrusted)blocksmessage_id,sender_id, timestamps from inbound wrappers[[reply_to_current]]And deep promotion should refuse to write such content into
MEMORY.mdeven if it somehow survives earlier filters.Actual behavior
Metadata garbage can survive multiple stages and end up in
MEMORY.md.Likely root cause
This looks like a defense-in-depth gap across multiple layers:
candidate.snippettoo much and does not run a final "is this memory-worthy / is this metadata garbage" gate before appending toMEMORY.mdSuggested fixes
Ingress filtering
Conversation info,Sender,System (untrusted), raw JSON objects, and obvious metadata keysCandidate validation
message_id,sender_id, timestamps, or channel envelope markersPromotion safety gate
MEMORY.md, run a deterministic final filter:Write-path separation
Distilled promotion
Impact
Medium to high.
Low-quality Dream Diary output is annoying but recoverable. Pollution of
MEMORY.mdis worse, because users may trust it as curated long-term memory and not notice that transport metadata has been promoted as if it were meaningful autobiographical memory.Extra note
I already manually cleaned the affected local files, so I cannot paste the full bad block verbatim anymore without restoring it from history. But the concrete garbage pattern was unmistakable:
Conversation info/Sender/ rawmessage_idfields had been promoted intoMEMORY.mdas if they were a legitimate durable memory.