OpenClaw operations guide
Preview OpenClaw memory forget with --dry-run
Stop the Gateway that owns the memory store, then run openclaw memory forget --agent <agent-id> --session <id-or-key> --dry-run --json. The preview lists tracked entries without deleting them. Check mixedLineageEntryKeys for entries shared with other sessions that a purge would remove in full. The original transcript stays in the session store.
Last updated · Published
The OpenClaw Native Memory Activation Kit is an optional paid kit with memory rollout, retrieval verification and promotion-policy templates.
By CWYN · Reviewed November 27, 2026 against the OpenClaw 2026.11.5 memory CLI reference · Checked against docs, not run
When a detail from an old chat still appears in memory search, identify the source before deciding what to remove. The built-in memory plugin can preview the artifacts it can trace to one session. Original transcripts, untracked workspace text and external copies have their own retention paths.
1. Identify the exact agent and session
Confirm that the target agent uses the bundled memory-core store you intend to inspect. Use openclaw sessions --agent <agent-id> --limit all --json to locate the exact key or full case-sensitive session ID. Keep those identifiers and the output private. 2026.11.5 memory provenance reference
2. Use a maintenance window for the preview
On 2026.11.5, stop the Gateway that owns the state directory through its service owner. Run the CLI with the same configuration and state on the Gateway host or in the deployment’s maintenance container. Even previews can initialize writable stores and require exclusive ownership. 2026.11.5 memory CLI reference
3. Preview only the selected session
Run openclaw memory forget --agent <agent-id> --session <id-or-key> --dry-run --json. Keep --dry-run in place. The command deletes immediately without it, without a confirmation prompt. Confirm the selected agent and sessionResolutions before reading the artifact counts. Restart the Gateway through the same owner when the preview is complete.
4. Check whole-entry removals and separate retention
Review mixedLineageEntryKeys for entries that would be removed in full even though they also came from other sessions. Use curatedWrites and untargetableEntryKeys as leads for manual inspection. Inventory the original transcript, archives, backups and external stores separately. Documented deletion boundaries
5. Test the retention check with harmless data
In an isolated test profile, seed a distinct phrase for the target session and a second phrase for a session that should stay searchable. After an authorized test cleanup, repeat the preview and confirm the expected search behavior from a fresh session. Before approving a production cleanup, agree on the affected artifacts, retained copies and how they will be handled. A search miss verifies only the retrieval route you tested.
Get your free CWYN Score to choose your next setup improvement.