Skip to content

memory-core: narrative session cleanup fails with "missing scope: operator.admin" during dreaming phases #71956

Description

@kobewang1234

Description

The memory-core plugin's dreaming promotion cycle fails to clean up narrative sessions for all three phases (light, rem, deep). The cleanup step errors with missing scope: operator.admin, suggesting the internal API call lacks the required permission scope.

Environment

  • OpenClaw: 2026.4.21 (f788c88)
  • Node: v22.22.2
  • OS: Ubuntu 24.04 (aarch64, AWS Graviton 3)
  • Plugin: memory-core (bundled), active-memory (bundled)

Reproduction

  1. Enable memory-core and active-memory plugins with default config
  2. Wait for the nightly dreaming promotion cycle (runs at ~03:01 UTC daily)
  3. Check gateway logs

Observed Behavior

All three dreaming phases fail cleanup with the same error:

[plugins] memory-core: narrative session cleanup failed for light phase: missing scope: operator.admin
[plugins] memory-core: narrative session cleanup failed for rem phase: missing scope: operator.admin
[plugins] memory-core: narrative session cleanup failed for deep phase: missing scope: operator.admin
[plugins] memory-core: dreaming promotion complete (workspaces=1, candidates=4, applied=0, failed=0).

This occurs every night. The dreaming promotion itself still runs (reporting candidates and applied counts), but the session cleanup step is skipped entirely.

Expected Behavior

The memory-core plugin should have the necessary operator.admin scope for its internal cleanup operations during dreaming phases, or the cleanup should use an appropriately scoped internal token.

Impact

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions