openclaw - ✅(Solved) Fix [Bug]: Dreaming fallback triggers constantly when using named agent (agents/<name>/sessions/ path not recognized) [1 pull requests, 1 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#70534Fetched 2026-04-24 05:56:47
View on GitHub
Comments
0
Participants
1
Timeline
4
Reactions
0
Participants
Timeline (top)
labeled ×2cross-referenced ×1referenced ×1

When using a named agent (--agent main or equivalent), Dreaming's corpus collector cannot find session data and falls back to daily memory files permanently. This contradicts the v2026.4.10 changelog which states fallback should "only" trigger on dedicated subagent-runtime errors.

Error Message

on the dedicated subagent-runtime error"

Root Cause

  • This path mismatch was not documented. There is no mention in docs or changelog that Dreaming does not support named agents.
    • Related issues that may share root cause: #65472, #68876, #70104
    • The fallback mechanism itself is well-designed; the problem is that v2026.4.10's hardening did not cover this trigger path.

Fix Action

Fixed

PR fix notes

PR #1: Fix: serialization race + session path normalize (fixes #70537, #70534)

Description (problem / solution / changelog)

Добавлены:

  • pkg/serialize/MarshalFresh и concurrent unit test (fixes #70537)
  • pkg/sessions NormalizeSessionPath/MatchesEitherPath и unit tests (fixes #70534)

Примечание: коммит был создан без прогонки pre-commit хуков (--no-verify) — в репозитории есть текущие линт-ошибки в TypeScript, не относящиеся к этим правкам. Пожалуйста, запустите CI и ревью.

Changed files

  • extensions/discord/src/voice/manager.e2e.test.ts (modified, +3/-1)
  • extensions/github-copilot/models.test.ts (modified, +3/-3)
  • extensions/github-copilot/stream.test.ts (modified, +2/-2)
  • extensions/github-copilot/stream.ts (modified, +50/-10)
  • extensions/memory-core/src/memory/manager-search-preflight.ts (modified, +4/-1)
  • fix2.py (removed, +0/-84)
  • go.mod (added, +3/-0)
  • openclaw-proxy.cjs (added, +238/-0)
  • patch_fetch.js (added, +13/-0)
  • patch_stream.cjs (added, +8/-0)
  • patch_stream.ts (added, +8/-0)
  • pkg/serialize/serialize.go (added, +9/-0)
  • pkg/serialize/serialize_test.go (added, +47/-0)
  • pkg/sessions/path.go (added, +20/-0)
  • pkg/sessions/path_test.go (added, +23/-0)
  • pnpm-lock.yaml (modified, +15/-193)
  • src/agents/agent-command.ts (modified, +5/-0)
  • src/channels/plugins/setup-wizard-helpers.ts (modified, +3/-3)
  • src/gateway/server.sessions.gateway-server-sessions-a.test.ts (modified, +6/-2)
  • test-copilot-direct.mjs (added, +66/-0)
  • test-copilot.mjs (added, +61/-0)
  • test.js (added, +2/-0)
  • test.sh (added, +68/-0)
  • ui-dev.log (added, +2188/-0)
  • ui/lain.html (added, +10/-0)
  • ui/src/lain/main.ts (added, +1668/-0)
  • ui/src/lain/styles.css (added, +596/-0)
  • ui/vite.config.ts (modified, +7/-1)
RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

When using a named agent (--agent main or equivalent), Dreaming's corpus collector cannot find session data and falls back to daily memory files permanently. This contradicts the v2026.4.10 changelog which states fallback should "only" trigger on dedicated subagent-runtime errors.

Steps to reproduce

  1. Initialize OpenClaw with a named agent
  2. Enable Dreaming
  3. Observe short-term-recall.json — all entries sourced from memory/YYYY-MM-DD.md, not session corpus
  4. Check session-corpus/ directory — does not exist
  5. Check session-ingestion.json — does not exist

Expected behavior

Per v2026.4.10 changelog:

"harden request-scoped diary fallback so scheduled dreaming only falls back on the dedicated subagent-runtime error"

Fallback should not trigger when corpus is simply missing due to a path mismatch.

Actual behavior

  • sessionCorpusDir defaults to ~/.openclaw/sessions/ (does not exist)
  • Real session data is at ~/.openclaw/agents/main/sessions/ (not checked)
  • Corpus collector finds nothing → fallback activates permanently
  • short-term-recall.json: 4892 entries, all from daily memory logs
  • recallCount on all entries: 0
  • Daily promoted count: ~4 out of 4892

OpenClaw version

2026.4.21

Operating system

macOS 14.1.1

Install method

No response

Model

MiniMax-M2.7-highspeed

Provider / routing chain

Not applicable. This issue is local to the corpus ingestion pipeline (sessionCorpusDir path resolution). No gateway, proxy, or model router is involved in the reproduction path.

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

  • Promotion queue flooded with operational log noise
  • Meaningful session memories never accumulate signal
  • Dreaming narrative output (literary dream entries) still works — the issue appears isolated to the corpus ingestion → promotion pipeline

Additional information

  • This path mismatch was not documented. There is no mention in docs or changelog that Dreaming does not support named agents.
  • Related issues that may share root cause: #65472, #68876, #70104
  • The fallback mechanism itself is well-designed; the problem is that v2026.4.10's hardening did not cover this trigger path.

extent analysis

TL;DR

The most likely fix is to update the sessionCorpusDir path to match the location of the session data for named agents.

Guidance

  • Verify that the sessionCorpusDir path is correctly set to ~/.openclaw/agents/main/sessions/ for named agents.
  • Check the documentation and changelog for any updates or mentions of named agent support in Dreaming.
  • Investigate related issues (#65472, #68876, #70104) to see if they share a common root cause.
  • Consider adding a configuration option to specify the sessionCorpusDir path for named agents.

Example

No code snippet is provided as the issue is related to configuration and path resolution.

Notes

The issue appears to be specific to named agents and the sessionCorpusDir path resolution. The fallback mechanism itself is well-designed, but the hardening in v2026.4.10 did not cover this trigger path.

Recommendation

Apply a workaround by updating the sessionCorpusDir path to match the location of the session data for named agents, as the issue is likely due to a path mismatch.

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

Per v2026.4.10 changelog:

"harden request-scoped diary fallback so scheduled dreaming only falls back on the dedicated subagent-runtime error"

Fallback should not trigger when corpus is simply missing due to a path mismatch.

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 fallback triggers constantly when using named agent (agents/<name>/sessions/ path not recognized) [1 pull requests, 1 participants]