Description
The Memory Dreaming Promotion cron job (runs daily at 03:00) creates 5-7 dreaming-narrative-{light,rem,deep}-xxx sessions under the main agent. These sessions appear in the Control UI agent switcher dropdown, cluttering the interface with "梦境叙事" (dream narrative) entries.
Steps to Reproduce
- Enable Dreaming (default setting)
- Wait for the daily cron trigger (or run manually)
- Open Control UI → click agent switcher (top-left)
- Observe 5-7 dreaming-narrative-xxx entries mixed with real agents
Root Cause
After dreaming completes, the .jsonl session files remain in agents/<agent>/sessions/, and the sessions.json registry retains dreaming session entries. The UI reads from sessions.json, so even deleting .jsonl files alone does not fix the display.
Expected Behavior
Dreaming sessions should either:
- Be automatically cleaned from
sessions.json after completion
- Be filtered out from the UI agent switcher (e.g., using a hidden session kind)
- Use a separate session namespace that the UI ignores
Current Workaround
Manual cleanup after each dream run:
# Step 1: Delete dreaming .jsonl files
for f in agents/main/sessions/*.jsonl; do
grep -q "Write a dream" "$f" 2>/dev/null && rm "$f"
done
# Step 2 (critical): Remove dreaming entries from sessions.json registry
python3 -c "
import json
path = 'agents/main/sessions/sessions.json'
with open(path) as f:
data = json.load(f)
for k in [k for k in data if 'dreaming' in k]:
del data[k]
with open(path, 'w') as f:
json.dump(data, f, indent=2)
"
# Step 3: Restart Gateway
openclaw gateway restart
Without Step 2, the UI continues to show dreaming sessions even after files are deleted.
Environment
- OpenClaw version: 2026.4.21
- OS: macOS Sequoia (ARM64)
- Node: v22.22.0
- Dreaming: enabled (default)
- Cron job: Memory Dreaming Promotion (0 3 * * *)
Description
The Memory Dreaming Promotion cron job (runs daily at 03:00) creates 5-7
dreaming-narrative-{light,rem,deep}-xxxsessions under the main agent. These sessions appear in the Control UI agent switcher dropdown, cluttering the interface with "梦境叙事" (dream narrative) entries.Steps to Reproduce
Root Cause
After dreaming completes, the
.jsonlsession files remain inagents/<agent>/sessions/, and thesessions.jsonregistry retains dreaming session entries. The UI reads fromsessions.json, so even deleting.jsonlfiles alone does not fix the display.Expected Behavior
Dreaming sessions should either:
sessions.jsonafter completionCurrent Workaround
Manual cleanup after each dream run:
Without Step 2, the UI continues to show dreaming sessions even after files are deleted.
Environment