`openclaw sessions cleanup` uses `session.maintenance` settings from config:
- Scope note: `openclaw sessions cleanup` maintains session stores/transcripts only. It does not prune cron run logs (`cron/runs/<jobId>.jsonl`), which are managed by `cron.runLog.maxBytes` and `cron.runLog.keepLines` in [Cron configuration](/automation/cron-jobs#configuration) and explained in [Cron maintenance](/automation/cron-jobs#maintenance).
-`--dry-run`: preview how many entries would be pruned/capped without writing.
- In text mode, dry-run prints a per-session action table (`Action`, `Key`, `Age`, `Model`, `Flags`) so you can see what would be kept vs removed.
-`--enforce`: apply maintenance even when `session.maintenance.mode` is `warn`.
-`--active-key <key>`: protect a specific active key from disk-budget eviction.
-`--agent <id>`: run cleanup for one configured agent store.
-`--all-agents`: run cleanup for all configured agent stores.
-`--store <path>`: run against a specific `sessions.json` file.
-`--json`: print a JSON summary. With `--all-agents`, output includes one summary per store.