Remove stale subagent session entries from OpenClaw's sessions.json index so they disappear from the webchat sidebar.
OpenClaw tracks sessions in ~/.openclaw/agents/. 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.
共 1 个版本