openclaw - 💡(How to fix) Fix memory-core narrative cleanup invokes runtime subagent methods outside gateway-request context [1 comments, 2 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#72099Fetched 2026-04-27 05:34:53
View on GitHub
Comments
1
Participants
2
Timeline
2
Reactions
0
Author
Timeline (top)
closed ×1commented ×1

During the nightly dreaming cycle (light/rem/deep), the memory-core plugin generates narratives successfully but fails during the cleanup phase with:

Plugin runtime subagent methods are only available during a gateway request.

Cleanup runs after the gateway-request context has been torn down, while the subagent method bindings only exist for the lifetime of that request.

Root Cause

During the nightly dreaming cycle (light/rem/deep), the memory-core plugin generates narratives successfully but fails during the cleanup phase with:

Plugin runtime subagent methods are only available during a gateway request.

Cleanup runs after the gateway-request context has been torn down, while the subagent method bindings only exist for the lifetime of that request.

Fix Action

Workaround

None needed for data integrity — generation completes correctly. The cleanup failure is harmless beyond log noise and possibly leaves temporary state uncleared.

Code Example

Plugin runtime subagent methods are only available during a gateway request.

---

{"subsystem":"memory-core","phase":"rem","msg":"Plugin runtime subagent methods are only available during a gateway request","ts":"2026-04-26T03:00:01.255Z"}
RAW_BUFFERClick to expand / collapse

Summary

During the nightly dreaming cycle (light/rem/deep), the memory-core plugin generates narratives successfully but fails during the cleanup phase with:

Plugin runtime subagent methods are only available during a gateway request.

Cleanup runs after the gateway-request context has been torn down, while the subagent method bindings only exist for the lifetime of that request.

Observed

  • Generation: succeeds (data written)
  • Cleanup: fails noisily — no data loss, but log spam
  • Frequency: 14 occurrences in a single dreaming cycle on 2026-04-26 between 03:00:01 and 03:00:37 UTC, across light / rem / deep phases (4–5 cycles)
  • Source line: dist/subsystem-bmJ5rL4Q.js:338:14
  • Host version: openclaw 2026.4.23 (subsequently upgraded to 2026.4.24 — bug not specifically retested but no related changelog entry observed)

Expected

Cleanup should either run inside the gateway-request context, or the cleanup path should not depend on runtime subagent methods.

Workaround

None needed for data integrity — generation completes correctly. The cleanup failure is harmless beyond log noise and possibly leaves temporary state uncleared.

Sample log entry

{"subsystem":"memory-core","phase":"rem","msg":"Plugin runtime subagent methods are only available during a gateway request","ts":"2026-04-26T03:00:01.255Z"}

(14 entries of the same shape, alternating across light/rem/deep phases, between 03:00:01.255Z and 03:00:37.489Z.)

extent analysis

TL;DR

Modify the memory-core plugin to run cleanup within the gateway-request context or refactor it to not depend on runtime subagent methods.

Guidance

  • Identify the specific code in dist/subsystem-bmJ5rL4Q.js:338:14 that triggers the error and assess its dependency on runtime subagent methods.
  • Consider refactoring the cleanup process to run synchronously within the gateway request or use an asynchronous approach that does not rely on subagent methods.
  • Review the upgrade to openclaw 2026.4.24 and verify if any related changes might indirectly address the issue, despite no explicit changelog entry.
  • Analyze the log entries to understand the pattern and frequency of the error, which might provide insights into the root cause or necessary fixes.

Example

No specific code example can be provided without more context on the memory-core plugin's implementation.

Notes

The provided information suggests a design or architectural issue rather than a simple bug, which might require significant changes to the plugin or its interaction with the gateway request context.

Recommendation

Apply a workaround by refactoring the memory-core plugin to not depend on runtime subagent methods during cleanup, as upgrading to a fixed version is not explicitly implied as a solution.

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…

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 - 💡(How to fix) Fix memory-core narrative cleanup invokes runtime subagent methods outside gateway-request context [1 comments, 2 participants]