#Duplicate entries in memory
1 messages · Page 1 of 1 (latest)
That’s probably version-sensitive.
I checked current source, and newer builds make deep promotion replay-safe, so reruns should reconcile existing MEMORY.md promotions instead of appending duplicates.
First, what does this show?
openclaw --version
Also, can you tell me where the duplicates are showing up:
MEMORY.mdDREAMS.md
If you’re already on a recent build, paste these too:
openclaw status --all
openclaw memory status --deep --agent main
And for a safe repair pass, try:
openclaw doctor --fix
openclaw memory status --fix --agent main
Relevant docs:
If your version is older than 2026.4.5, I’d update first, because that’s around where the duplicate MEMORY.md promotion replay fix landed.
Got it, that’s a different bucket.
If the duplicates are in dreams.md / DREAMS.md, that’s the Dream Diary lane, not long-term MEMORY.md.
I checked current source, and there are now two relevant fixes:
- exact Dream Diary dedupe
- dreaming artifact repair for contaminated/self-ingested dream state
First thing I still want is:
openclaw --version
Then please paste:
openclaw status --all
openclaw memory status --deep --agent main
And if you can, a small redacted snippet of 2 duplicated diary entries from dreams.md.
Why I’m asking: there are two different failure modes here:
- exact duplicate blocks in
DREAMS.md - near-duplicate / repeated dream runs, which usually means dreaming state got weird and needs repair
Useful docs:
As a safe first pass, you can also run:
openclaw doctor --fix
openclaw memory status --fix --agent main
That won’t tell me everything yet, but it often clears stale dreaming state.
By source:
memory · 126/130 files · 1008 chunks
Vector: unknown
FTS: ready
Embedding cache: enabled (0 entries)
Batch: disabled (failures 0/2)
Recall store: 5284 entries · 4 promoted · 5284 concept-tagged · 2823 spaced · scripts=5283 latin, 1 mixed
Recall path: /var/lib/openclaw/data/openclaw/workspace/memory/.dreams/short-term-recall.json
Recall updated: 2026-04-20T06:12:38.587Z
Dreaming artifacts: diary present · 17 corpus files · ingestion state present
Dream corpus: /var/lib/openclaw/data/openclaw/workspace/memory/.dreams/session-corpus
Dream ingestion: /var/lib/openclaw/data/openclaw/workspace/memory/.dreams/session-ingestion.json
Dream diary: /var/lib/openclaw/data/openclaw/workspace/DREAMS.md
Thanks, that helps.
That output confirms the dreaming artifacts exist, but it does not tell us yet whether this is:
- exact duplicate Dream Diary blocks, or
- repeated/self-ingested dreaming runs
I still need the version first:
pnpm openclaw --version
Then run:
pnpm openclaw doctor --fix
pnpm openclaw memory status --fix --agent main
Please paste anything those commands say about:
dreamingdream diarysession corpusself-ingested narrative
And if you can, paste one duplicated block from DREAMS.md (redacted is fine).
If the two blocks are byte-for-byte identical, that points one way. If they differ a bit, that points another.
If this fixed it, please right-click the solution message → Apps → ✅ Mark Solution so Answer Overflow can index it. 🎉
🦞 OpenClaw 2026.4.15 (041266a) — Type the command with confidence—nature will provide the stack trace if needed.
Nice, that helps.
2026.4.15 is new enough that the old duplicate MEMORY.md promotion bug should already be fixed. So this looks more like a DREAMS.md / Dream Diary problem.
Next step:
pnpm openclaw doctor --fix
pnpm openclaw memory status --fix --agent main
Then paste the output, especially if it mentions:
- dreaming artifacts
- session corpus
- self-ingested narrative
- dream diary
Also, two quick checks:
- Do you have heartbeat enabled?
- Are the duplicates exact copies (same timestamp + same text), or same text with different timestamps?
If you can paste one duplicated diary block from DREAMS.md (redacted is fine), I can narrow it down fast.
Memory Search (main)
Provider: none (requested: auto)
Model: none
Sources: memory
Indexed: 126/130 files · 1008 chunks
Dirty: no
Store: ~/.openclaw/memory/main.sqlite
Workspace: /var/lib/openclaw/data/openclaw/workspace
Dreaming: 0 3 * * * · limit=10 · minScore=0.8 · minRecallCount=3 · minUniqueQueries=3 · recencyHalfLifeDays=14 · maxAgeDays=30
By source:
memory · 126/130 files · 1008 chunks
Vector: unknown
FTS: ready
Embedding cache: enabled (0 entries)
Batch: disabled (failures 0/2)
Recall store: 5284 entries · 4 promoted · 5284 concept-tagged · 2823 spaced · scripts=5283 latin, 1 mixed
Recall path: /var/lib/openclaw/data/openclaw/workspace/memory/.dreams/short-term-recall.json
Recall updated: 2026-04-20T06:12:38.587Z
Dreaming artifacts: diary present · 17 corpus files · ingestion state present
Dream corpus: /var/lib/openclaw/data/openclaw/workspace/memory/.dreams/session-corpus
Dream ingestion: /var/lib/openclaw/data/openclaw/workspace/memory/.dreams/session-ingestion.json
Dream diary: /var/lib/openclaw/data/openclaw/workspace/DREAMS.md
Repair: no changes
Thanks, that’s useful.
Also, Provider: none / Vector: unknown is not the problem here. That part is unrelated to duplicate DREAMS.md entries.
The important bit is this:
pnpm openclaw memory status --fixonly checks recall-store repair / stale promotion locks- it does not fully rule out dreaming artifact / session-corpus contamination
So the next command I want is still:
pnpm openclaw doctor --fix
Please paste that output.
That is the path that checks the broader dreaming-artifact problems, including the self-ingested/session-corpus weirdness I’m worried about.
If doctor --fix also says nothing changed, then this is starting to look like a real DREAMS.md duplication bug.
Temporary workaround while testing:
/dreaming off
so it stops adding more duplicates.
One more thing: is heartbeat enabled on this agent?
its longer than 2000 characters
Yep, that’s fine.
Easiest options:
- upload it as a
doctor.txtfile, or - paste only the lines that mention:
dreamdiarysessioningestrepairwarningarchive
If you want to filter it first:
pnpm openclaw doctor --fix 2>&1 | grep -Ei 'dream|diary|session|ingest|repair|warning|archive'
Also, is heartbeat enabled on this agent?
yes heartbeat is enabled
Ah, that narrows it a lot.
With:
2026.4.15- duplicates in
DREAMS.md memory status --fixshowing no changes- heartbeat enabled
I strongly suspect you’re hitting a dreaming + heartbeat regression, not a bad memory-search config.
My recommendation:
- Keep heartbeat on, turn dreaming off with
/dreaming off
(best immediate workaround, stops new dupes) - If you need dreaming more than heartbeat, disable heartbeat instead
- If you want to help pin it down, grab the filtered
doctor --fixoutput and file a bug
Bug report link:
https://github.com/openclaw/openclaw/issues
Useful details to include:
pnpm openclaw --version- heartbeat enabled
- duplicates are in
DREAMS.md pnpm openclaw memory status --deep --fix --agent main- one redacted duplicated diary block
- optionally:
pnpm openclaw doctor --fix 2>&1 | grep -Ei 'dream|diary|session|ingest|repair|warning|archive'
If you paste that filtered doctor output here, I can help you write a tight issue report.
[svc_admin_ansible@openclaw ~]$ openclaw doctor --fix 2>&1 | grep -Ei 'dream|diary|session|ingest|repair|warning|archive
'
◇ Config warnings ─────────────────────────────────────────────────╮
◇ Doctor warnings ────────────────────────────────────────────────────────╮
│ These agents can still have sessions/auth state on disk, but │
│ - 1/5 recent sessions are missing transcripts. │
│ Verify sessions in store: openclaw sessions --store │
│ "/home/svc_admin_ansible/.openclaw/agents/main/sessions/sessions.json" │
│ Preview cleanup impact: openclaw sessions cleanup --store │
│ "/home/svc_admin_ansible/.openclaw/agents/main/sessions/sessions.json" │
│ Prune missing entries: openclaw sessions cleanup --store │
│ "/home/svc_admin_ansible/.openclaw/agents/main/sessions/sessions.json" │
│ - Found 1 orphan transcript file in ~/.openclaw/agents/main/sessions. │
│ These .jsonl files are no longer referenced by sessions.json, so │
│ they are not part of any active session history. │
│ Doctor can archive them safely by renaming each file to │
│ - Archived 1 orphan transcript file in │
│ ~/.openclaw/agents/main/sessions as .deleted timestamped backups. │
Session store (main): /home/svc_admin_ansible/.openclaw/agents/main/sessions/sessions.json (1059 entries)
- agent:main:dreaming-narrative-deep-5714cc07e417-1776667657331 (20m ago)
Config warnings:\n- plugins.entries.memory-postgres: plugin disabled (disabled in config) but config is present
Yep, this is enough to call bug territory.
What I’m seeing:
2026.4.15- heartbeat enabled
- duplicates are in
DREAMS.md memory status --fixsaid Repair: no changesdoctor --fixdid not find dreaming-artifact corruption, it only cleaned up session-store/orphan-transcript stuff
So the orphan transcript warning looks like side noise here, not the root cause.
My read is: this is most likely a heartbeat-triggered dreaming duplication bug.
Immediate workaround
Use:
/dreaming off
to stop new duplicate diary entries.
Please file a GitHub issue
https://github.com/openclaw/openclaw/issues
You can pretty much paste this:
Title: [Bug]: DREAMS.md gets duplicate entries when dreaming is enabled with heartbeat on
Version:
OpenClaw 2026.4.15 (041266a)
What happens:
- Dreaming is enabled
- Heartbeat is enabled
- Duplicate entries show up in DREAMS.md
What I checked:
- `openclaw memory status --deep --fix --agent main`
- Repair: no changes
- `openclaw doctor --fix`
- did not report dreaming-artifact/session-corpus repair
- only reported missing/orphan transcript cleanup
Notes:
- Duplicates are in `DREAMS.md`, not `MEMORY.md`
- Heartbeat is enabled
- This looks like dreaming may be retriggering from heartbeat rather than a memory-search config issue
If helpful, I can attach a redacted duplicate diary block.
If you want, paste the final issue text here before you submit it and I’ll tighten it up.
is there an existing issue with that?
Yep, I found two closely related issues:
-
#65705, Dreaming sweep re-triggers on every heartbeat instead of once per cron schedule
https://github.com/openclaw/openclaw/issues/65705 -
#65652, Dreaming still triggers on every heartbeat in 2026.4.11, creating empty light/rem/heartbeat sessions
https://github.com/openclaw/openclaw/issues/65652
Your case sounds closest to #65705.
I’d comment on that issue first with:
OpenClaw 2026.4.15 (041266a)- heartbeat enabled
- duplicates are in
DREAMS.md openclaw memory status --fix --agent main→Repair: no changesopenclaw doctor --fixonly found orphan/missing transcript cleanup