After operating for extended periods, DeepSeek Harness accumulates large amounts of archived session data, which can consume disk space and interfere with current session management. Managing this data manually is not only cumbersome but can also lead to accidental deletion or inconsistent state. The dsh-session-cleaner plugin resolves this issue by providing a dedicated “Archived Sessions” page. It does not modify existing menus; instead, it reuses DSH’s semantic design and focuses on centralized management of archived sessions.
It is maintained by TheM14 and is released under the MIT license. Its core value is centralized management of archived sessions, supporting restore, safe deletion, leftover cleanup, and history continuation based on a new preset.
Core Features¶
- Session List: Lists archived sessions by workspace, including title, creation time, log status, and online status.
- Preset Check: Shows the valid preset for each session and marks missing or corrupted presets.
- Session Restore: Restores a session to its original workspace and updates the official sidebar immediately.
- Permanent Deletion: Permanently deletes archived sessions through a rollback-aware quarantine and commit process.
- Leftover Cleanup: Cleans up ghost archived entries, orphan workspace slots, orphan projection cache rows, and quarantined logs.
- History Continuation: Creates a full history continuation, allowing you to select any available system or user preset to continue the conversation.
Installation and Enabling¶
After cloning and building the repository locally, add the plugin to the dsh Web configuration.
cd path\to\dsh-session-cleaner
dsh plugin --profile web add .
dsh web
Usage¶
- Open dsh settings and select “Archived Sessions”.
- Select “Restore” to return the conversation to its original workspace.
- Select “Delete” and confirm to permanently remove log and registry data.
- Select the target preset and choose “Continue with preset” to create a new session with full inherited history.
- Select “Clean leftovers” to remove safely identifiable remnants.
Data Safety and Limitations¶
Deletion follows a strict sequence to ensure data safety:
验证 archived + not live
-> rename log into quarantine
-> commit workspace registry
-> commit projection cache
-> purge quarantined log
If committing the registry or projection cache fails, the plugin stops and attempts to roll back previous changes. If the logical deletion commit succeeds but file cleanup fails, the quarantined log is retained in the $DSH_HOME/storages/.dsh-session-cleaner-trash/ directory and can be removed via the “Clean leftovers” feature.
Note the following limitations:
* Deletion is permanent; active sessions are never deleted.
* If the host still owns the session, restart dsh and do not open the session again before deletion.
* Each request requires the plugin-specific sentinel header.
* Request body size is limited to 64KB.
Use Cases and Cautions¶
This plugin is suitable for users who need to thoroughly clean up archived data or start new tasks based on the history of old sessions. Because the plugin runs with the current process privileges, review the source code and license before installing.