Context
Session JSONL files are now read-only in the VFS (EPERM on write/rm/mv). Users need a way to clean up old sessions without bypassing protections.
Proposal
Add a CLI command for session cleanup, scoped to the current user's sessions only:
hivemind sessions prune # list pruneable sessions
hivemind sessions prune --before 2026-04-01 # delete sessions older than date
hivemind sessions prune --session-id abc-123 # delete specific session
hivemind sessions prune --all # delete all own sessions
Rules
- Only delete sessions where
author matches the logged-in user from credentials
- Cannot delete other users' sessions
- Deletes both the session rows (sessions table) and the corresponding summary (memory table)
- Requires confirmation unless
--yes is passed
Related
PR #33 added EPERM guards on session files. This command provides the controlled alternative.
Context
Session JSONL files are now read-only in the VFS (EPERM on write/rm/mv). Users need a way to clean up old sessions without bypassing protections.
Proposal
Add a CLI command for session cleanup, scoped to the current user's sessions only:
Rules
authormatches the logged-in user from credentials--yesis passedRelated
PR #33 added EPERM guards on session files. This command provides the controlled alternative.