Skip to content

[Bug]: memory status reports "ingestion state absent" after dreaming JSON→SQLite migration #92017

Description

@JUMPUNDER

Bug type

Behavior bug (incorrect output/state without crash)

Summary

After upgrading to 2026.6.5, openclaw memory status --deep reports:

Dreaming artifacts: diary present · 64 corpus files · ingestion state absent

even though dreaming session/daily ingestion state is present and functioning — it was migrated from legacy JSON sidecars into SQLite plugin state.

Steps to reproduce

  1. Upgrade to OpenClaw 2026.6.5 on macOS with memory-core dreaming enabled.
  2. Run doctor/migrations so legacy dreaming JSON files are archived:
    • ~/.openclaw/workspace/memory/.dreams/session-ingestion.jsonsession-ingestion.json.migrated
    • ~/.openclaw/workspace/memory/.dreams/daily-ingestion.jsondaily-ingestion.json.migrated
  3. Verify SQLite plugin state has ingestion rows (example):
    SELECT namespace, COUNT(*) FROM plugin_state_entries
    WHERE plugin_id='memory-core' AND namespace LIKE 'dreaming%'
    GROUP BY namespace;
    Observed on a healthy install:
    • dreaming-session-ingestion-files: 2883
    • dreaming-session-ingestion-seen: 997
    • dreaming-daily-ingestion: 10
  4. Run:
    openclaw memory status --deep

Expected behavior

Status should report ingestion state as present when either:

  • legacy session-ingestion.json exists, or
  • migrated SQLite plugin-state namespaces contain rows (dreaming-session-ingestion-files, dreaming-session-ingestion-seen, and/or dreaming-daily-ingestion).

Suggested output:

Dreaming artifacts: diary present · 64 corpus files · ingestion state present (sqlite)

Actual behavior

Status reports ingestion state absent whenever the legacy JSON file is missing — even with thousands of SQLite ingestion rows and an active dreaming pipeline.

Root cause (source-level)

auditDreamingArtifacts() in extensions/memory-core/src/dreaming-repair.ts only checks filesystem presence of:

memory/.dreams/session-ingestion.json

It does not consult migrated SQLite plugin state introduced by the memory-core-dreams-json-to-sqlite migration (extensions/memory-core/doctor-contract-api.ts).

CLI formatting in dist/cli.runtime-RyDOuSJ3.js maps audit.sessionIngestionExists directly to the user-facing string.

Evidence that dreaming is actually healthy

On the affected install (false-negative status):

  • openclaw memory rem-harness --json returns 512 recall source entries and 464 deep candidates.
  • Gateway logs show successful dreaming runs, e.g.:
    • memory-core: dreaming promotion complete (workspaces=1, candidates=8, applied=8, failed=0)
    • memory-core: dream diary entry written for light phase
  • memory/.dreams/events.jsonl updates on schedule.

Suggested fix

Update dreaming artifact audit to treat SQLite plugin-state ingestion namespaces as authoritative after migration, e.g.:

  1. If session-ingestion.json exists → ingestion state present (file)
  2. Else if dreaming-session-ingestion-files or dreaming-session-ingestion-seen has rows for the workspace → ingestion state present (sqlite)
  3. Else → ingestion state absent

Optionally mirror this in doctor output so post-migration installs don't look broken.

Impact and severity

  • Severity: low (cosmetic / misleading diagnostics)
  • Blast radius: users who migrated on 2026.6.5 may think dreaming ingestion is broken and attempt unnecessary repairs/restores of .migrated JSON files.

OpenClaw version

2026.6.5 (5181e4f)

Operating system

macOS 26.5.1 (arm64)

Install method

npm (Homebrew node)

Additional information

Related migration id: memory-core-dreams-json-to-sqlite

Legacy archived files are expected and should not be restored manually once SQLite rows exist.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low-priority cleanup, docs, polish, ergonomics, or speculative work.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions