Bug Description
The OpenClaw Control UI dashboard dropdown displays all session records including completed, killed, and timed-out subagent sessions. These persist indefinitely even after the subagents are no longer running.
Current Behavior
sessions_list API returns all sessions from the transcript store
- Dashboard dropdown shows 9+ sessions (1 main + 8 historical subagents)
- Completed/killed subagents remain visible:
smoke-test (completed)
dns-config (timeout)
vercel-deploy (timeout)
email-system (completed)
design-system (completed)
stripe-checkout (completed)
rebuild-pages (completed)
onboarding-flow (completed)
Expected Behavior
Dashboard dropdown should show:
- Active sessions only (running subagents + main session), OR
- Recent sessions (e.g., last 24-48 hours) with pagination, OR
- Provide a cleanup/archive UI to remove historical session records
Impact
- Visual clutter in the dashboard
- Confusing UX (appears like 10 agents are running when only 1 is active)
- No way to clean up via UI or CLI
- Session transcript files accumulate at
~/.openclaw/agents/main/sessions/*.jsonl
Steps to Reproduce
- Spawn multiple subagents via
sessions_spawn
- Let them complete or kill them via
subagents kill
- Open Control UI dashboard
- Check session dropdown — all historical sessions still appear
Environment
- OpenClaw version: latest (dev channel)
- OS: Pop!_OS 24.04 LTS (Linux 6.18.7)
- Node: v25.6.1
- Channel: Telegram
- Model: bailian/qwen3.5-plus
Proposed Solutions
Option A: Filter by Status (Recommended)
- Dashboard dropdown shows only
active sessions
- Add "Show History" toggle to view completed sessions
- API:
sessions_list?activeOnly=true
Option B: Time-Based Retention
- Default: show sessions from last 24 hours
- Pagination for older sessions
- Config:
dashboard.sessionRetentionHours
Option C: Manual Cleanup
- Add
openclaw sessions cleanup CLI command
- Add "Clear History" button in dashboard
- Archive transcripts to
~/.openclaw/agents/main/sessions/archive/
Additional Context
Session files are stored at:
~/.openclaw/agents/main/sessions/<sessionId>.jsonl
Current workaround: manually delete .jsonl files (not recommended without proper cleanup).
Priority: Medium (UX issue, not functional blocker)
Labels: bug, ui, sessions
Bug Description
The OpenClaw Control UI dashboard dropdown displays all session records including completed, killed, and timed-out subagent sessions. These persist indefinitely even after the subagents are no longer running.
Current Behavior
sessions_listAPI returns all sessions from the transcript storesmoke-test(completed)dns-config(timeout)vercel-deploy(timeout)email-system(completed)design-system(completed)stripe-checkout(completed)rebuild-pages(completed)onboarding-flow(completed)Expected Behavior
Dashboard dropdown should show:
Impact
~/.openclaw/agents/main/sessions/*.jsonlSteps to Reproduce
sessions_spawnsubagents killEnvironment
Proposed Solutions
Option A: Filter by Status (Recommended)
activesessionssessions_list?activeOnly=trueOption B: Time-Based Retention
dashboard.sessionRetentionHoursOption C: Manual Cleanup
openclaw sessions cleanupCLI command~/.openclaw/agents/main/sessions/archive/Additional Context
Session files are stored at:
Current workaround: manually delete
.jsonlfiles (not recommended without proper cleanup).Priority: Medium (UX issue, not functional blocker)
Labels:
bug,ui,sessions