openclaw - ✅(Solved) Fix [Bug]: Dreaming Issue without a Main agent assignment [1 pull requests, 2 comments, 3 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#69811Fetched 2026-04-22 07:47:59
View on GitHub
Comments
2
Participants
3
Timeline
8
Reactions
0
Author
Timeline (top)
commented ×2labeled ×2assigned ×1cross-referenced ×1

memory-core dreaming appears enabled and the managed cron job exists, but the job silently depends on the default main heartbeat lane being enabled.

If any agents.list[] entry has a heartbeat block, only those agents get heartbeats. In my setup I had a dedicated heartbeat agent with a heartbeat block, but no heartbeat block on main. That caused the managed dreaming cron (which targets main) to skip with error: "disabled" even though dreaming looked enabled in status output.

There also seems to be a second issue during manual testing:

  • openclaw cron run <dreaming-job-id> returns { ok: true, enqueued: true }
  • gateway logs show the dreaming sweep actually runs
  • but openclaw cron runs --id ... does not record the manual run

Error Message

If any agents.list[] entry has a heartbeat block, only those agents get heartbeats. In my setup I had a dedicated heartbeat agent with a heartbeat block, but no heartbeat block on main. That caused the managed dreaming cron (which targets main) to skip with error: "disabled" even though dreaming looked enabled in status output. "error": "disabled",

Root Cause

So dreaming looks enabled, but the actual managed job skips because main heartbeat is considered disabled.

Fix Action

Workaround

Adding a silent heartbeat block to main unblocked the heartbeat lane: json5 { id: "main", default: true, heartbeat: { every: "60m", target: "none", }, } After restart: returned: json { "status": "skipped", "reason": "no-target", "preview": "NO_REPLY" } which suggests main heartbeat is now active.

PR fix notes

PR #69875: fix(memory/dreaming): surface blocked status when heartbeat is disabled for main

Description (problem / solution / changelog)

Summary

Surface a blocked line in both openclaw memory status and /dreaming status|on|off when dreaming is enabled but heartbeat for main is not firing — currently fails silently.

  • Both the CLI status and the /dreaming slash command now flag a blocked cron, instead of appearing healthy while silently not running.
  • Added a Troubleshooting section in dreaming docsexplaining the blocked state and its common causes.
  • Memory-core reuses existing heartbeat-state logic from core instead of re-implementing heartbeat rules in the extension.

Refs #69811, #46046.

Scope note

Observability only, not execution semantics. The cron hardcodes sessionTarget: "main" regardless of the configured default agent — so if a user sets default: true on a non-main agent, dreaming still silently never runs. Fixing that is a behavior change to the cron target itself and belongs in a follow-up.

Test plan

  • pnpm test extensions/memory-core (503 pass)
  • pnpm tsgo:prod, pnpm lint:{core,extensions}, pnpm plugin-sdk:api:check
  • Manual preview against a live config with heartbeat.every: "0m" — renders as expected

Changed files

  • CHANGELOG.md (modified, +4/-0)
  • docs/concepts/dreaming.md (modified, +12/-0)
  • extensions/memory-core/src/cli.runtime.ts (modified, +8/-1)
  • extensions/memory-core/src/cli.test.ts (modified, +129/-0)
  • extensions/memory-core/src/dreaming-command.test.ts (modified, +91/-0)
  • extensions/memory-core/src/dreaming-command.ts (modified, +6/-1)
  • extensions/memory-core/src/dreaming.ts (modified, +31/-4)
  • src/plugin-sdk/infra-runtime.ts (modified, +1/-0)

Code Example

## Evidence / commands used
openclaw gateway status
openclaw cron status
openclaw cron list
openclaw cron runs --id <dreaming-job-id> --limit 20
openclaw cron run <dreaming-job-id>
openclaw system heartbeat last
openclaw memory status --deep
openclaw logs --follow
RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

memory-core dreaming appears enabled and the managed cron job exists, but the job silently depends on the default main heartbeat lane being enabled.

If any agents.list[] entry has a heartbeat block, only those agents get heartbeats. In my setup I had a dedicated heartbeat agent with a heartbeat block, but no heartbeat block on main. That caused the managed dreaming cron (which targets main) to skip with error: "disabled" even though dreaming looked enabled in status output.

There also seems to be a second issue during manual testing:

  • openclaw cron run <dreaming-job-id> returns { ok: true, enqueued: true }
  • gateway logs show the dreaming sweep actually runs
  • but openclaw cron runs --id ... does not record the manual run

Version

  • OpenClaw 2026.4.15
  • commit 041266a

Steps to reproduce

  1. Enable dreaming: json5 plugins: { entries: { "memory-core": { enabled: true, config: { dreaming: { enabled: true, }, }, }, }, }
  2. Configure agents like this: json5 agents: { defaults: { workspace: "/home/akessel56/.openclaw/workspace", userTimezone: "America/Chicago", }, list: [ { id: "main", default: true, }, { id: "main-a", default: false, }, { id: "heartbeat", workspace: "~/.openclaw/workspace-heartbeat", tools: { allow: ["read", "write", "exec"], heartbeat: { every: "60m", model: "google/gemini-3.1-flash-lite-preview", isolatedSession: true, lightContext: true, target: "discord", to: "channel:1482214704784080906", directPolicy: "block", }, }, ], }
  3. Restart Gateway
  4. check status: bash openclaw memory status --deep openclaw cron list openclaw cron runs --id <dreaming-job-id> --limit 20

Expected behavior

So dreaming looks enabled, but the actual managed job skips because main heartbeat is considered disabled.

Expected behavior

One of these should happen:

  1. Dreaming should not depend on main heartbeat being enabled, or
  2. Dreaming status should explicitly report that it is blocked because main heartbeat is disabled, or
  3. Per-agent heartbeat configuration should not make dreaming silently fail when another agent has heartbeat enabled.

At minimum, the current status output is misleading because dreaming appears enabled/scheduled while the actual job skips with disabled.

Actual behavior

openclaw memory status --deep shows dreaming configured: txt Dreaming: 0 3 * * * (America/Chicago) · limit=10 · minScore=0.8 · minRecallCount=3 · minUniqueQueries=3 · recencyHalfLifeDays=14 · maxAgeDays=30 openclaw cron list shows the managed job exists: txt Memory Dreaming Promotion ... cron 0 3 * * * @ America/Chicago ... But openclaw cron runs --id <dreaming-job-id> --limit 20 shows scheduled runs skipped: json { "entries": [ { "status": "skipped", "error": "disabled", "summary": "openclaw_memory_core_short_term_promotion_dream" } ] }

OpenClaw version

Version - OpenClaw 2026.4.15 - commit 041266a

Operating system

  • Raspberry Pi 5 / Linux ARM64 Debian 12 - Bookworm

Install method

npm global

Model

gemini-3.1-flash-lite-preview

Provider / routing chain

openclaw > google

Additional provider/model setup details

No response

Logs, screenshots, and evidence

## Evidence / commands used
openclaw gateway status
openclaw cron status
openclaw cron list
openclaw cron runs --id <dreaming-job-id> --limit 20
openclaw cron run <dreaming-job-id>
openclaw system heartbeat last
openclaw memory status --deep
openclaw logs --follow

Impact and severity

Affected systems: Dreaming Severity: Blocks workflow Consequence dreaming cron fails.

Additional information

Workaround

Adding a silent heartbeat block to main unblocked the heartbeat lane: json5 { id: "main", default: true, heartbeat: { every: "60m", target: "none", }, } After restart: returned: json { "status": "skipped", "reason": "no-target", "preview": "NO_REPLY" } which suggests main heartbeat is now active.

Additional observation: manual run history mismatch

After the workaround, running: bash openclaw cron run <dreaming-job-id> returned: json { "ok": true, "enqueued": true, "runId": "manual:..." } But: bash openclaw cron runs --id <dreaming-job-id> --limit 20 did not record a new run entry.

At the same time, gateway logs showed the dreaming sweep actually ran:

txt memory-core: managed dreaming cron could not be reconciled (cron service unavailable). memory-core: narrative generation used fallback for light phase because subagent runtime is request-scoped. memory-core: narrative session cleanup failed for light phase: Plugin runtime subagent methods are only available during a gateway request. memory-core: narrative generation used fallback for rem phase because subagent runtime is request-scoped. memory-core: narrative session cleanup failed for rem phase: Plugin runtime subagent methods are only available during a gateway request. memory-core: dreaming promotion complete (workspaces=3, candidates=0, applied=0, failed=0). So there may be a second bug where manual dreaming cron runs execute but do not show up in cron runs.

extent analysis

TL;DR

The managed dreaming cron job silently depends on the default main heartbeat lane being enabled, causing it to skip with an "disabled" error, and can be fixed by adding a heartbeat block to the main agent configuration.

Guidance

  • To fix the issue, add a heartbeat block to the main agent configuration, as shown in the workaround provided in the issue: heartbeat: { every: "60m", target: "none" }.
  • Verify that the dreaming cron job is no longer skipping by checking the cron runs with openclaw cron runs --id <dreaming-job-id> --limit 20.
  • If manual runs are not being recorded, check the gateway logs to confirm that the dreaming sweep is actually running, and investigate further to resolve the discrepancy.
  • Consider updating the dreaming status output to explicitly report when it is blocked due to the main heartbeat being disabled, to avoid misleading status information.

Example

{
  "id": "main",
  "default": true,
  "heartbeat": {
    "every": "60m",
    "target": "none"
  }
}

Notes

The provided workaround fixes the issue, but there may be a second bug related to manual dreaming cron runs not being recorded in cron runs. Further investigation is needed to resolve this discrepancy.

Recommendation

Apply the workaround by adding a heartbeat block to the main agent configuration, as it fixes the immediate issue and allows the dreaming cron job to run as expected.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

One of these should happen:

  1. Dreaming should not depend on main heartbeat being enabled, or
  2. Dreaming status should explicitly report that it is blocked because main heartbeat is disabled, or
  3. Per-agent heartbeat configuration should not make dreaming silently fail when another agent has heartbeat enabled.

At minimum, the current status output is misleading because dreaming appears enabled/scheduled while the actual job skips with disabled.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - ✅(Solved) Fix [Bug]: Dreaming Issue without a Main agent assignment [1 pull requests, 2 comments, 3 participants]