What problem does it solve?
OpenClaw accumulates thousands of old cron session files under ~/.openclaw/agents/main/sessions/, which bloats sessions.json and slows down session management. This Skill inspects the session directory, removes obsolete .jsonl files while preserving the main session, and rebuilds sessions.json so it only references files that still exist on disk.
Core Features & Use Cases
- Session Inventory Check: Counts session files and measures sessions.json size before taking any action.
- Safe Cleanup: Deletes old cron session .jsonl files while explicitly preserving the main session to avoid losing the primary conversation.
- Index Rebuild: Reconstructs sessions.json so it only references sessions that still exist on disk, then reports before-and-after counts.
- Use Case: After weeks of scheduled cron runs, your OpenClaw sessions.json has grown to several megabytes with thousands of stale entries. Invoke this Skill to prune the old cron sessions and shrink the index back to a healthy size.
Quick Start
Clean up my OpenClaw sessions by deleting old cron session files and rebuilding sessions.json.