Permission Setup Review
python scripts/_prepare_workspace.py is an optional setup helper for the Session Cleaner skill. It may apply broad filesystem permissions for compatibility. Show the target paths and permission mode, explain the risk, and prefer a narrower mode when shared write access is not needed.
Session Cleaner
Clean stale session transcript files from ~/.openclaw/agents/main/sessions/.
Rules
- Always keep: current main session (the one with
agent:main:mainkey that is active) - Always keep: all group chat sessions (target address contains
oc_) - Move to backup: everything else (old main sessions, completed sub-agents, API sessions, cron/heartbeat transcripts)
- Never delete: all moved files go to
sessions/backup/, recoverable
Usage
bash scripts/clean-sessions.sh [--dry-run]
- Default: move stale files to backup
--dry-run: only report what would be moved, no changes