mrzhangkris/dsh-session-pruner
Session lifecycle for DSH: archive finished one-shot subagents, idle sessions and overflow, and clean the projection cache.
Gives every session type a defined destination so the session library stops growing without bound: finished one-shot subagents are archived automatically, idle continuable subagents and main sessions are archived, capacity overflow is recycled by priority, and the projection cache is pruned with them. The README's framing is that the harness rewrites a single session_projcache.json atomically on every write, so accumulation past a few thousand sessions is what stalls the UI, and managing lifecycle is the root fix rather than the symptom.
Install
dsh plugin --profile web add dsh-session-prunerThe npm line; restart the dsh web daemon after installing or upgrading so the new version loads. All ten options live in the plugin's settings card and save with hot reload, so later configuration changes need no restart. Six everyday options are visible by default and four fallbacks sit behind an advanced section.
Compatibility
Archive first, delete only after expiry: cleaned sessions are moved to ~/.dsh/sessions-archive/ with the workspace and session-id structure preserved and can be restored by moving them back, and the GUI list drops them immediately because it reads only the sessions directory. A direct-delete mode exists and is irreversible. Idle is judged from the session log file's mtime rather than the directory's, so active sessions refreshing session.jsonl.zstd are never misjudged. Main sessions are excluded from capacity recycling by default. Since v0.2.3 one-shot subagents are archived by the same idle threshold with or without an end-seed.
Details
- Repo: mrzhangkris/dsh-session-pruner
- Category: Sessions & Messages
- Stars: 3
- Version: 0.3.3 (npm)
Alternatives
hy-sde/dsh-session-url · wuxiangru915/dsh-session-manager · reinocheong/dsh-session-move