Preface¶
When DeepSeek Harness performs the “Delete workspace” action, it only removes the entry from the workspace list, while preserving session directories and log files. Long-term use can cause a large number of unrecoverable session directories to accumulate on disk. Although the official archiving feature was introduced in dsh 0.1.7, there is no entry point for physically deleting archived sessions. The dsh-session-manager plugin provides cross-workspace capabilities for listing, restoring, and permanently deleting archived sessions through a top-level settings page and the session context menu.
Core Features¶
Settings Page¶
In the DSH settings interface, you can find the “Session Manager” page. This page lists detailed information for all archived sessions, including title, workspace, project directory, update time, and running status. In the list, you can restore an individual session or click the red “Delete permanently” button to delete it permanently. Select all is also supported via the header checkbox or row selection, followed by batch deletion. All deletion operations require a confirmation dialog.
Session Context Menu¶
In the session list in the left sidebar, hover over a row and click the ⋯ menu. Below built-in options such as “Rename”, “Fork session”, and “Archive session”, a red “Delete permanently” item will appear. This menu item uses the native danger style, and clicking it triggers the same confirmation dialog as in the settings page.
Agent Tools¶
The plugin provides three tool functions for Agents to operate on archived sessions in code:
* session_list_archived: Lists all archived sessions in JSON format.
* session_restore_archived: Restores an archived session by ID (without a confirmation step).
* session_delete_permanently: Permanently deletes an archived session by ID. This tool requires the confirm: true parameter, and it rejects unknown IDs, non-archived IDs, or sessions containing running tasks.
Installation and Enablement¶
This plugin depends on dsh 0.1.7, as it introduced the sidebar.workspaces.session.menu.item slot (for context menu items) and size-neutral product icons.
- Clone the repository locally:
git clone https://github.com/SunshineR04/dsh-session-manager.git
- Add the plugin to the specified profile configuration:
dsh plugin --profile <name> add "file:/path/to/dsh-session-manager"
The plugin will be installed via pnpm and appended to `dsh.profile.bundles`. If you do not see the plugin after refreshing the page, restart the DSH desktop app.
Note: Do not install it by the bare npm name
dsh-session-manager. An unrelated standalone project exists under that name (maintained by hkkz9522), and installing the wrong package may cause functional issues.
Typical Usage¶
- View archived sessions: Have the Agent call the
session_list_archivedtool, or view all archived sessions in Session Manager within DSH Settings. - Restore a session: Click the restore button corresponding to the session in the settings page, or have the Agent call the
session_restore_archivedtool. - Delete permanently: Select the session in the settings page and confirm deletion, or click the red delete button in the session context menu. To delete via the Agent, call
session_delete_permanentlywithconfirm: true.
Notes¶
- Physical deletion: The plugin performs direct physical deletion and does not go through a backup layer. Be sure to confirm before deleting.
- Environment limitation: Each
DSH_HOMEsupports only one host. If two DSH instances share the same Home directory and attempt concurrent deletion, the process that writes later will silently overwrite the marker of the previous one, causing the previous session marker to be lost and the files to already have been deleted. - Version requirement: dsh >= 0.1.7 is required. Versions below this level cannot render the context menu item, and only the settings page will be available.
- Dependency: Requires
@deepseek-ai/schemasteryversion >= 3.18.0.
Conclusion¶
dsh-session-manager solves the pain point that archived sessions in DSH cannot be physically cleaned up. It provides an intuitive graphical interface and scriptable tools to help developers manage disk space effectively. For more details, refer to the plugin directory or the GitHub repository.