Bug Report: memory-core Dreaming Cleanup Fails
Summary
The memory-core plugin's dreaming feature successfully writes dream diary entries, but fails to clean up narrative sessions due to a missing RBAC scope (operator.admin).
Environment
- OpenClaw Version: 2026.4.14 (commit after 2026.3.31)
- OS: Windows 11 (NT 10.0.26200 x64)
- Node: v24.14.1
- Agent:
data (workspace: D:\Openclaw\workspace-data)
Steps to Reproduce
- Configure
memory-core plugin with dreaming enabled:
{
"memory-core": {
"enabled": true,
"config": {
"dreaming": {
"enabled": true,
"frequency": "0 3 * * *",
"timezone": "Asia/Singapore"
}
}
}
}
- Wait for the cron job to fire at 03:00 Asia/Singapore
- Observe gateway logs
Expected Behavior
- Dream diary entries are written (works)
- Narrative session cleanup completes successfully (fails)
Actual Behavior
Gateway logs show:
03:21:17 [plugins] memory-core: dream diary entry written for light phase [workspace=D:\Openclaw\workspace-data].
03:21:17 [plugins] memory-core: narrative session cleanup failed for light phase: missing scope: operator.admin
03:21:55 [plugins] memory-core: dream diary entry written for rem phase [workspace=D:\Openclaw\workspace-data].
03:21:55 [plugins] memory-core: narrative session cleanup failed for rem phase: missing scope: operator.admin
Analysis
- Diary writing: Works fine (data is not lost)
- Session cleanup: Fails because the dreaming module does not have the required
operator.admin RBAC scope to delete/archive sessions
- This appears to be a regression introduced by the 3.31 security framework (RBAC scopes for session management)
Impact
| Aspect |
Severity |
Notes |
| Data loss |
None |
Dream diary entries are written successfully |
| Disk usage |
Low |
Old narrative sessions accumulate over time |
| System stability |
None |
Non-fatal error, gateway remains stable |
Suggested Fix
The dreaming module should either:
- Request the
operator.admin scope when performing session cleanup
- Use a different mechanism (e.g., self-cleanup via its own session context)
- Skip cleanup when the scope is not available (graceful degradation)
Config Reference
Full memory-core config:
{
"memory-core": {
"enabled": true,
"config": {
"dreaming": {
"enabled": true,
"frequency": "0 3 * * *",
"timezone": "Asia/Singapore",
"verboseLogging": false,
"storage": {
"mode": "inline",
"separateReports": false
}
}
}
}
}
Bug Report: memory-core Dreaming Cleanup Fails
Summary
The
memory-coreplugin's dreaming feature successfully writes dream diary entries, but fails to clean up narrative sessions due to a missing RBAC scope (operator.admin).Environment
data(workspace: D:\Openclaw\workspace-data)Steps to Reproduce
memory-coreplugin with dreaming enabled:{ "memory-core": { "enabled": true, "config": { "dreaming": { "enabled": true, "frequency": "0 3 * * *", "timezone": "Asia/Singapore" } } } }Expected Behavior
Actual Behavior
Gateway logs show:
Analysis
operator.adminRBAC scope to delete/archive sessionsImpact
Suggested Fix
The dreaming module should either:
operator.adminscope when performing session cleanupConfig Reference
Full
memory-coreconfig:{ "memory-core": { "enabled": true, "config": { "dreaming": { "enabled": true, "frequency": "0 3 * * *", "timezone": "Asia/Singapore", "verboseLogging": false, "storage": { "mode": "inline", "separateReports": false } } } } }