The default session management in DeepSeek Harness (DSH) only supports renaming, forking, and archiving operations. Archiving only hides the session; the data remains on disk. Long-term use can cause storage space to bloat. The dsh-session-delete plugin adds a “Delete Session” option to the session row menu, supports permanently removing log files on disk, and includes safeguards to prevent accidental deletion of running sessions.
Core Features¶
This plugin adds a “Delete Session” entry to the DSH session row context menu, alongside Rename, Fork, and Archive.
- Permanent Deletion: Permanently removes the session log directory from disk.
- Runtime Protection: Prevents deletion of running or currently open sessions (frontend disablement + host-side double check).
- Path Safety: Strictly validates that the directory name equals the session ID to prevent path escape.
- Request Validation: Accepts only same-origin POST requests.
- Action Confirmation: Requires a two-step confirmation before deletion.
- Automatic Archiving: After deletion, the session is automatically archived and hidden immediately in the sidebar.
Installation and Enablement¶
- Install the plugin:
dsh plugin --profile web add github:Yicijiuhaobala/dsh-session-delete
- Enable the plugin: Add
"dsh-session-delete"to thedsh.profile.bundlesarray in~/.dsh/profiles/web/package.json, then restartdsh web. - Local development: If working locally, synchronize
client/client.jsandlib/index.jsto~/.dsh/profiles/web/node_modules/dsh-session-delete/, or rerunpnpm installto trigger hot updates.
Typical Usage¶
- Standard Operation: Hover the mouse over any session row, click the
⋯(three dots) in the lower-right corner, and select “Delete Session”. - Deleting Archived Sessions: To delete an archived session, remove its ID from
archivedSessionIdsin~/.dsh/storages/workspace., or directly delete the directory~/.dsh/sessions/<workspace-dir>/<session-id>/.
Technical Notes¶
Because shared UI primitives in DSH are frozen with Object.freeze, component-level patches would silently fail; this plugin is therefore implemented via DOM-level injection. The plugin is released under the MIT license.