Skip to content

[Bug]: Dreaming narrative generation times out for all 3 phases on v2026.4.25 warm gateway — #69487 fix appears regressed/incomplete #72837

@RayWoo

Description

@RayWoo

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

On v2026.4.25 stable, memory-core narrative generation reliably times out for all three dreaming phases (light, rem, deep) regardless of gateway warm-up state. This contradicts the resolution of #69487 ("First dreaming-narrative subagent run after gateway idle exceeds NARRATIVE_TIMEOUT_MS due to plugin-host cold-start", closed 2026-04-25 by @steipete with "Closing this as implemented after Codex review").

Key difference from #69487: this is not cold-start — failures persist 22 minutes into a warmed gateway and across consecutive triggers. Underlying dream output (memory.dream.completed events with lineCount > 0, reportPath written) is unaffected; only the narrative prose-summary step fails.

Steps to reproduce

  1. Fresh install v2026.4.25 on Debian 11 (or restart existing v4.25 gateway)
  2. Wait ≥20 min after gateway becomes ready (long enough that [Bug]: First dreaming-narrative subagent run after gateway idle exceeds NARRATIVE_TIMEOUT_MS due to plugin-host cold-start #69487's "first sweep" cold-start excuse does not apply)
  3. Trigger dreaming via openclaw cron run <memoryDreamingPromotionJobId>
  4. Observe gateway log: grep 'narrative generation ended with status=timeout' /tmp/openclaw/openclaw-$(date +%Y-%m-%d).log

Expected behavior

Per #69487 resolution, narrative generation completes for all phases on a warm gateway within NARRATIVE_TIMEOUT_MS.

Actual behavior

Two consecutive runs on the same gateway, both failed identically:

Run 1 — cold (gateway just restarted, 4 min uptime)

13:15:08.993  WARN  memory-core: narrative generation ended with status=timeout for light phase.
13:17:03.143  WARN  memory-core: narrative generation ended with status=timeout for rem phase.
13:17:03.151  WARN  memory-core: narrative generation ended with status=timeout for deep phase.

Run 2 — warm (22 min uptime)

13:31:46.973  WARN  memory-core: narrative generation ended with status=timeout for light phase.
13:31:46.982  WARN  memory-core: narrative generation ended with status=timeout for rem phase.
13:32:20.344  WARN  memory-core: narrative generation ended with status=timeout for deep phase.

In both runs, dreams themselves completed (events.jsonl entries with memory.dream.completed for all 3 phases, storageMode: "separate"). Only the narrative prose-summary failed.

Suspected root cause: NARRATIVE_TIMEOUT_MS = 15000 is too aggressive

dist/dreaming-narrative-BzMUwuXQ.js:42:

const NARRATIVE_TIMEOUT_MS = 15e3;  // 15 seconds

15 seconds is short for any LLM call (Claude/GPT model calls regularly take 5–15s end-to-end for non-trivial prompts; under any provider latency or queueing, this is tight). #69487's discussion mentioned a 60s timeout — either v4.25 reduced this, or the symptom in #69487 was a different NARRATIVE_TIMEOUT_MS than the one in dreaming-narrative-BzMUwuXQ.js.

Environment

Item Value
OpenClaw version 2026.4.25 (stable)
OS Debian 11 (AWS Bitnami)
Node 24.13.0 (NVM)
Models primary openai/gpt-5.4-mini, fallback moonshot/kimi-k2.6
Memory search openai/text-embedding-3-small

Mitigation suggestion

Either (a) raise NARRATIVE_TIMEOUT_MS to 60s+ or expose it as a config knob, or (b) ensure narrative subagent reuses the gateway-bindable plugin runtime path described in #69487's closure note even on subsequent runs (not just the first).

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions