#Duplicate entries in memory

1 messages · Page 1 of 1 (latest)

lone ruin
#

I am getting duplicate memory entries in Dreaming mode

ionic ginkgoBOT
covert valleyBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> ✅ Mark Solution

outer elmBOT
#

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.md
  • DREAMS.md

If you’re already on a recent build, paste these too:

#

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.

lone ruin
outer elmBOT
#

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:

  1. exact Dream Diary dedupe
  2. dreaming artifact repair for contaminated/self-ingested dream state

First thing I still want is:

openclaw --version

Then please paste:

#

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.

lone ruin
#

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

outer elmBOT
#

Thanks, that helps.

That output confirms the dreaming artifacts exist, but it does not tell us yet whether this is:

  1. exact duplicate Dream Diary blocks, or
  2. 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:

  • dreaming
  • dream diary
  • session corpus
  • self-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. 🎉

lone ruin
#

🦞 OpenClaw 2026.4.15 (041266a) — Type the command with confidence—nature will provide the stack trace if needed.

outer elmBOT
#

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:

  1. Do you have heartbeat enabled?
  2. 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.

lone ruin
#

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

outer elmBOT
#

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 --fix only 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?

lone ruin
#

its longer than 2000 characters

outer elmBOT
#

Yep, that’s fine.

Easiest options:

  1. upload it as a doctor.txt file, or
  2. paste only the lines that mention:
  • dream
  • diary
  • session
  • ingest
  • repair
  • warning
  • archive

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?

lone ruin
#

yes heartbeat is enabled

outer elmBOT
#

Ah, that narrows it a lot.

With:

  • 2026.4.15
  • duplicates in DREAMS.md
  • memory status --fix showing no changes
  • heartbeat enabled

I strongly suspect you’re hitting a dreaming + heartbeat regression, not a bad memory-search config.

My recommendation:

  1. Keep heartbeat on, turn dreaming off with /dreaming off
    (best immediate workaround, stops new dupes)
  2. If you need dreaming more than heartbeat, disable heartbeat instead
  3. If you want to help pin it down, grab the filtered doctor --fix output 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.

lone ruin
#

[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
outer elmBOT
#

Yep, this is enough to call bug territory.

What I’m seeing:

  • 2026.4.15
  • heartbeat enabled
  • duplicates are in DREAMS.md
  • memory status --fix said Repair: no changes
  • doctor --fix did 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.

lone ruin
#

is there an existing issue with that?

outer elmBOT
#

Yep, I found two closely related issues:

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 mainRepair: no changes
  • openclaw doctor --fix only found orphan/missing transcript cleanup