DeepSeek Harness (DSH) currently only offers an “Archive” function; archived sessions remain on disk and cannot be completely cleaned up. The dsh-session-delete plugin adds “Real Delete” capability to the session “…” menu, truly deleting session logs and workspace registrations after a secondary confirmation.
What is it¶
This is a client-side plugin maintained by EarthPretender. It addresses the pain point of DSH’s inability to completely remove session data, achieving irreversible deletion of sessions via a secondary confirmation mechanism and the official registry interface.
Core Features¶
Menu & Confirmation
Adds a red “Delete Session” row below “Archive Session” in the session “…” menu. The first click changes it to “Click again to confirm deletion”; if there is no operation within 6 seconds, it automatically reverts. If the session has running tasks, it displays “Click again: Stop tasks and force delete”.
Deletion Logic
Deletes the session log files (path sessions/<workspace>/<session_id>/) and cleans up the workspace registry (executing unpin → unarchive → detachSession). Upon successful deletion, it broadcasts the api-session/removed event, and the list row is removed immediately without needing a restart.
Safety & Idempotency
Authentication inherits the official /api channel. Supports idempotent operations; repeated clicks do not cause errors. Sessions used during the current startup are disabled before deletion. Sessions with executing tasks have their tasks stopped before forced deletion.
Installation & Activation¶
First, edit the profile’s package.json (path ~/.dsh/profiles/desktop/package.json), and add entries to dsh.profile.bundles and dependencies:
{
"dsh": {
"profile": {
"bundles": [
"dsh-session-delete"
]
}
},
"dependencies": {
"dsh-session-delete": "github:EarthPretender/dsh-session-delete"
}
}
After adding the entries, enter the profile directory and execute the installation command:
pnpm install
Finally, restart DeepSeek Harness.
Typical Usage¶
- Restart DeepSeek Harness (effective after the first installation).
- Click any session row in the sidebar → “…” → The red “Delete Session” at the very bottom.
- First click → “Click again to confirm deletion”, click again to execute.
- If the session has running tasks → “Click again: Stop tasks and force delete”, click again to stop tasks first and then delete.
Applicable Scenarios & Notes¶
Suitable for scenarios requiring thorough cleaning of session data. The plugin runs with the permissions of the current DSH process, compatible with the DSH 0.2.0-rc series, and requires Node >= 22 on the host side. Deletion is irreversible; only orphan data such as shared attachment/projection caches may remain.
Self-check¶
The plugin includes a zero-dependency self-check command:
npm test