Install
openclaw skills install @saybanet/sayba-session-cleanupClean up stale or unwanted subagent sessions from OpenClaw webchat sidebar. Use when subagent sessions persist in the UI after completion, when the sidebar is cluttered with old subagent entries, or when the user asks to remove/clear/delete subagent sessions from the chat interface.
openclaw skills install @saybanet/sayba-session-cleanupRemove stale subagent session entries from OpenClaw's sessions.json index so they disappear from the webchat sidebar.
OpenClaw tracks sessions in ~/.openclaw/agents/<agent>/sessions/sessions.json. Subagent entries with missing transcript files are "ghost" sessions that still show in the UI. This skill removes those entries from the index.
python3 scripts/cleanup_sessions.py
Removes subagent sessions whose transcript .jsonl files no longer exist on disk.
python3 scripts/cleanup_sessions.py --all
Removes every subagent session entry regardless of transcript status.
python3 scripts/cleanup_sessions.py --dry-run
Shows what would be removed without making changes.
python3 scripts/cleanup_sessions.py --agent main
Only clean sessions for the main agent.
Always restart the gateway for changes to take effect:
Use the gateway tool: action=restart
Or via CLI: openclaw gateway restart
Then refresh the webchat page.