mirror of https://github.com/openclaw/openclaw.git
1.8 KiB
1.8 KiB
| summary | read_when | title | |
|---|---|---|---|
| CLI reference for `openclaw sessions` (list stored sessions + usage) |
|
sessions |
openclaw sessions
List stored conversation sessions.
openclaw sessions
openclaw sessions --agent work
openclaw sessions --all-agents
openclaw sessions --active 120
openclaw sessions --json
Scope selection:
- default: configured default agent store
--agent <id>: one configured agent store--all-agents: aggregate all configured agent stores--store <path>: explicit store path (cannot be combined with--agentor--all-agents)
Cleanup maintenance
Run maintenance now (instead of waiting for the next write cycle):
openclaw sessions cleanup --dry-run
openclaw sessions cleanup --agent work --dry-run
openclaw sessions cleanup --all-agents --dry-run
openclaw sessions cleanup --enforce
openclaw sessions cleanup --enforce --active-key "agent:main:telegram:dm:123"
openclaw sessions cleanup --json
openclaw sessions cleanup uses session.maintenance settings from config:
--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.
- In text mode, dry-run prints a per-session action table (
--enforce: apply maintenance even whensession.maintenance.modeiswarn.--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 specificsessions.jsonfile.--json: print a JSON summary. With--all-agents, output includes one summary per store.
Related:
- Session config: Configuration reference