-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
[Bug]: Dreaming phase completion events lack outcome normalization (no success/failure/partial status) #97690
Copy link
Copy link
Closed
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, 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.Very strong issue quality with high-confidence source-level or clear reproduction.
Description
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, 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.Very strong issue quality with high-confidence source-level or clear reproduction.
Type
Fields
Priority
None yet
Bug type
Behavior bug (incorrect output/state without crash)
Beta release blocker
No
Summary
memory.dream.completedevents record only file paths and line counts but carry no outcome field (success, failure, partial, timeout). Agent runs normalize terminal state throughagent-run-terminal-outcome.ts(7 distinct reasons: completed, hard_timeout, timed_out, cancelled, aborted, blocked, failed), but dreaming phases have no equivalent. When a dreaming phase fails partway through, the failure is logged separately and the completion event is either never emitted or emitted without indicating partial success.Steps to reproduce
openclaw.jsonwithdreaming.enabled: true.timeoutMson a dreaming execution config (e.g.,timeoutMs: 5000).memory.dream.completedevent in the event log — it containsphase,lineCount,storageModebut nostatusorreasonfield.memory-core: dreaming promotion failed for workspace ...) but the event log has no record of the failure.Expected behavior
The
MemoryHostDreamCompletedEventtype should include an outcome field (e.g.,outcome: "completed" | "partial" | "failed" | "timed_out") analogous toAgentRunTerminalOutcome.reason. This would allow:Actual behavior
MemoryHostDreamCompletedEvent(defined insrc/memory-host-sdk/events.ts:58-66) has these fields only:No
status,reason,error, oroutcomefield. Failed dreaming runs are invisible in the event log.OpenClaw version
2026.6.5
Operating system
macOS 15.4
Install method
pnpm from source
Model
N/A (dreaming system behavior, not model-specific)
Provider / routing chain
N/A
Logs
Evidence from source:
src/memory-host-sdk/events.ts:58-66—MemoryHostDreamCompletedEventtype definition: no outcome/status field.extensions/memory-core/src/dreaming-markdown.ts:111-119— event emission: onlyphase,lineCount,storageModeare recorded.src/agents/agent-run-terminal-outcome.ts:18-25—AgentRunTerminalReasonhas 7 distinct terminal reasons that normalize agent run outcomes. Dreaming has no equivalent.extensions/memory-core/src/dreaming-narrative.ts:960-962— narrative generation failure is caught and logged but never recorded in the event:"Narrative generation is best-effort — never fail the parent phase."extensions/memory-core/src/dreaming.ts:695— failure is logged to console but not persisted in the event log:"memory-core: dreaming promotion failed for workspace ..."Impact and severity
Affected: All users with dreaming enabled who rely on event logs for monitoring or diagnostics.
Severity: Medium (failures are invisible in structured event data; only visible in unstructured logs).
Frequency: Every failed or partial dreaming run.
Consequence: Doctor checks and status dashboards cannot distinguish successful from failed dreaming runs. Partial runs cannot be identified for retry. Health metrics based on event logs undercount failures.
Additional information
The
DEFAULT_MEMORY_DEEP_DREAMING_RECOVERY_ENABLED = trueconfig (insrc/memory-host-sdk/dreaming.ts:45) is for memory recovery (re-promoting forgotten memories when health score drops below 0.35), NOT for crash recovery (resuming a dreaming phase that crashed mid-execution). These are fundamentally different recovery concerns.The existing
qa/maturity-scores.yaml(97K) tracks dreaming maturity scores but has no structured way to correlate them with run outcomes from the event log.