Introduction¶
In the DeepSeek Harness (DSH) sidebar, sessions can be archived, but there is no “delete” option. To actually free up disk space, you have to manually delete directories under ~/.dsh/sessions/<workspace>/<uuid>/, then manually edit workspace.json and clean up the projection caches. If any single step is missed, the sidebar may end up with empty shell sessions that can no longer be opened.
The community plugin dsh-session-archive-delete (maintainer: device1999, category: memory) turns this workflow into a confirmable pipeline: it can first perform a full local backup, verify it file by file, and only then delete the originals, or perform a complete deletion with the risks explicitly acknowledged. Package name: @device1999/dsh-session-archive-delete, version 0.1.1 per current documentation, MIT license; the GitHub repository device1999/dsh-session-archive-delete has 1 star. Directory page: SkillHub plugin page.
What Is This¶
This plugin extends the DSH client via Cordis patches: it adds delete-related options at the bottom of the “…” menu for any session in the sidebar. Its positioning is “dsh session delete” — on top of DSH’s native archive-only feature, it provides delete after backup or complete deletion, and handles subagent sessions, metadata, and caches, avoiding ledger inconsistency that occurs when manually deleting directories.
Core Features¶
The capabilities listed in the README below can all be verified in the interface or settings after installation.
| Capability | Description |
|---|---|
| Backup delete | Copies the session directory, caches, and metadata snapshot to a specified location, and deletes the originals only after verification passes |
| Complete delete | Deletes directly without backup (can coexist with backup delete, or only one can be shown) |
| Subagent sessions | Automatically finds the subagents derived from the session and backs up or deletes them together |
| Custom backup location | System folder dialog or manually entered path; supports four backup folder naming rules |
| Path validation | Invalid paths are flagged immediately and are never written into settings |
| One-click restore instructions | Each backup directory contains a RESTORE.txt with step-by-step instructions for copying back into the DSH data directory |
Security-related behaviors (from the original documentation): after copying, file sizes and counts are compared one by one, and the process is aborted on any mismatch; before deletion, references are removed from workspace.json and persisted to disk; after deletion, the directory removal result is rechecked; the session directory must be under ~/.dsh/sessions and its directory name must match the session id; if the session being deleted is currently running, the current turn is cancelled first before deletion.
The pipeline can be summarized as:
Confirm → Copy session directory + cache + metadata snapshot → Verify file by file → Delete originals → Clean up ledger
Any failing step aborts the process, and the original session remains intact.
Installation and Enablement¶
In the DSH ecosystem, plugins are usually installed via a package name or profile; the following commands all come from the repository README. Do not assemble github:owner/repo forms that do not appear in the documentation.
Method 1: DSH interface (recommended)
Left sidebar Plugins → top-right Add Plugin → enter the package name:
@device1999/dsh-session-archive-delete
Restart DSH after installation completes.
Method 2: Command line
dsh plugin --profile <profile> add @device1999/dsh-session-archive-delete
<profile> is generally desktop or web; you can check it under ~/.dsh/profiles/.
System requirements (from the original documentation): DSH 0.2.x (Web / desktop client); Windows / macOS / Linux; the Node engine requires ^20.0.0 || >=22.0.0. On Windows, the system folder dialog depends on PowerShell 7; without pwsh it falls back to in-page directory browsing.
Uninstall
dsh plugin --profile <profile> remove dsh-session-archive-delete
Restart DSH; backup folders already generated are not removed by uninstalling and must be cleaned up manually.
Typical Usage¶
Deleting a Session¶
- Click “…” on the session row in the sidebar
- Select “Backup delete” or “Complete delete”
- Review the session name, ID, and backup path in the confirmation dialog
- Click “Confirm”
After a successful deletion, the sidebar refreshes; if the deleted session was the current one, the view automatically jumps to the next session.
Settings¶
Open Settings → Backup Delete:
| Setting | Options |
|---|---|
| Deletion mode | Show both menu items / Show only “Backup delete” / Show only “Complete delete” |
| Backup location | Select a folder or edit the address bar; if left empty, the default rules apply |
| Backup folder naming | Date+topic / First 8 characters of ID+topic / Topic only / First 8 characters+topic+date |
Settings are saved in ~/.dsh/dsh-session-archive-delete.json.
Default backup location priority (from the original documentation):
- Path entered in settings
- Environment variable
DSH_ARCHIVE_ROOT - Plugin config
workspaceRoot - Infer the most-used workspace directory from session records
- When none are available:
<user home directory>/DSH-Archived Sessions
The backup location cannot be set inside ~/.dsh, otherwise DSH may treat it as a data directory and rescan it.
Backup Directory Structure¶
<backup location>/<folder generated by naming rule>/
sessions/<workspace directory>/<session id>/ original session files
projcache/<session id>.json UI projection cache
meta/workspace.json metadata snapshot before deletion
meta/session_projcache.json
manifest.json manifest (including the subagent list, etc.)
RESTORE.txt restore steps
Restoring from a Backup¶
Follow the RESTORE.txt inside the backup; the steps are roughly as follows (DSH must be fully quit beforehand):
- Copy
sessions/<workspace>/<session id>back to~/.dsh/sessions/<workspace>/ - Copy
projcache/<session id>.jsonback to~/.dsh/storages/session_projcache/sessions/ - In
~/.dsh/storages/workspace.json, add the session id back into thesessionIdsof the corresponding workspace - Start DSH
Use Cases and Caveats¶
Who it’s for: users who have long used DSH for agent or conversation development, have a large number of sessions, find that archived sessions still occupy disk space, and want a deletion path with rollback capability; teams or individuals who need to keep a local copy before cleanup are also well suited to the “Backup delete” mode.
Permissions and trust: the plugin reads and writes ~/.dsh and session files under the permissions of the current DSH process. Before installing, it is recommended to read the GitHub source code and the MIT license to confirm the behavior matches your security policy.
Known limitations (from the original documentation): default backup location inference relies on the host sessionQuery; subagent relationships come from the session header’s parentSession, and since session files are zstd-compressed, they cannot be parsed by reading the disk alone; the backup is a full copy, so large sessions consume corresponding disk space.
The community directory site SkillHub has no official affiliation with DeepSeek / High-Flyer; the plugin comes from community maintainers and is not an official app store listing.
Conclusion¶
If you are already manually deleting ~/.dsh/sessions to free up space, this plugin consolidates backup, verification, ledger cleanup, and subagent cascade into a single chain accessible from the sidebar menu, while leaving a recoverable backup structure. For more information, visit the SkillHub directory page and the GitHub repository.