Skip to content

Memory Dreaming: filter assistant process chatter from session-corpus candidates #80664

Description

@ArthurNie

Summary

OpenClaw Memory Dreaming can currently ingest assistant internal process chatter from session transcripts into memory/.dreams/session-corpus/*, which then appears in Light/REM/Deep candidate surfaces and can become durable-memory promotion candidates.

Examples observed in a real workspace Light Sleep report:

  • Assistant: Oops worktree maybe not created yet due first command still running. poll.
  • Assistant: Now inspect.
  • Assistant: Need commit PR.

These are execution scratch notes, not learnable user facts or durable decisions.

Proposed behavior

Add a first-class candidate hygiene filter in the Dreaming session-corpus ingestion path:

  • Reject obvious assistant process chatter before it enters session-corpus recall / Light / REM / Deep candidate surfaces.
  • Preserve explicit durable signals, including user decisions/corrections, verified artifacts, PR numbers, commit SHAs, and acceptance results.
  • Ideally expose reject counts/reasons for observability.

Candidate v0 reject patterns

Reject session-corpus snippets like:

  • Assistant: Need ...
  • Assistant: Now ...
  • Assistant: Oops ...
  • Need commit PR
  • terse standalone process actions such as inspect, commit, push, merge, poll

But preserve assistant-authored lines that contain durable signals such as:

  • Arthur confirmed/decided/approved/rejected/corrected ...
  • decision, accepted, verified, PASS
  • commit <sha>
  • PR #<number>

Likely hook point

In the installed bundle I inspected, the Dreaming session ingestion path normalizes snippets via something equivalent to:

const snippet = normalizeSessionCorpusSnippet(lines[index] ?? "");
if (snippet.length < SESSION_INGESTION_MIN_SNIPPET_CHARS) continue;

A minimal hook would be:

const snippet = normalizeSessionCorpusSnippet(lines[index] ?? "");
if (snippet.length < SESSION_INGESTION_MIN_SNIPPET_CHARS) continue;
if (shouldRejectDreamingSessionCorpusSnippet(snippet)) continue;

Acceptance test

Given a controlled session transcript containing:

  • Assistant: Need commit PR.
  • Assistant: Now inspect.
  • Assistant: Oops worktree maybe not created yet due first command still running. poll.

those lines should not appear in newly generated memory/.dreams/session-corpus/YYYY-MM-DD.txt or later Light/REM/Deep candidate outputs.

A durable line such as Arthur confirmed PR #123 accepted; verification PASS. should remain eligible.

Why it matters

This prevents process scratch from contaminating long-term memory candidate pipelines while preserving legitimate decision/evidence signals.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal backlog priority with limited blast radius.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.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