dsh-session-purger: Permanently Delete DSH Sessions and All Sub-Agent Sessions

Introduction

When running agent tasks in DeepSeek Harness (DSH), the sidebar accumulates a large number of session records. Subagents can also spawn multi-layer sub-conversations. DSH’s built-in capability is mainly archiving: session and subagent-related data still remains on disk, and logs, projection caches, workspace records, etc. continue to occupy space. If you need to completely remove a session and its entire subagent tree from storage, archiving is not enough. Below we introduce the community plugin dsh-session-purger (catalog entry ricardoyan/dsh-session-delete, maintained by RicardoYan, categorized under admin-security), which adds “Delete Session” to the session menu, complementing DSH’s built-in archiving.

What Is This

dsh-session-purger is a DSH plugin that adds Delete Session to the ⋯ menu on session rows, permanently deleting the current session along with all its derived subagent sessions (at any depth). The npm package name and the plugin id used for uninstallation are both dsh-session-purger; the GitHub repository is RicardoYan/dsh-session-delete, the currently published version is 0.2.1, and the license is MIT. In the DSH community catalog SkillHub entry, the plugin is categorized as admin-security.

Core Features

According to the README, the plugin’s capabilities can be summarized as follows:

  1. Full-tree deletion: When deleting a target session, all subagent sessions at every level beneath it are removed as well.
  2. Storage cleanup: It cleans up session logs, projection caches, workspace records, spill files, and browser UI state.
  3. Double confirmation: The first click on “Delete Session” displays the number of subagent sessions that will be deleted as a side effect; only on the second click does it execute, reducing the chance of accidental deletion.
  4. Explicitly excluded scope: It does not delete sessions created by forks, nor does it delete project files in the workspace folder.
  5. Files in use: If some files are in use at deletion time, cleanup automatically continues on the next DSH startup.

The deletion operation is irreversible. Before using it, confirm that there is nothing in the session that still needs to be kept.

Installation and Activation

The installation command follows the repository README (do not construct github:owner/repo based on the repository directory name on your own):

dsh plugin --profile desktop add github:RicardoYan/dsh-session-purger#v0.2.1

If you are using the DSH Web client, replace desktop in --profile desktop with your profile name (usually web). Restart DSH after installation for the plugin to take effect.

Uninstallation:

dsh plugin --profile desktop remove dsh-session-purger

Versions and runtime environment (from package.json and the README):

  • Requires @deepseek-ai/dsh: >=0.2.1-rc.1 <0.3.0-0
  • Node: ^22.19.0 || >=24.0.0

The plugin integrates with DSH via a Cordis patch (cordis.patch.yml) and targets the web platform on the client side. DSH adopts an “everything is a plugin” extension model; community catalogs such as SkillHub are independent sites with no official affiliation with DeepSeek / High-Flyer.

Typical Usage

  1. Install according to the commands in the previous section and restart DSH.
  2. In the session list, find the session you want to remove and click the ⋯ button on the right side of that row.
  3. Select Delete Session. The first click displays the number of subagent sessions that will be deleted as a consequence; after confirming, click again to perform the permanent deletion.

No additional configuration files are needed; the interaction path is consistent with the session sidebar menu.

Use Cases and Cautions

Who it is for

  • DSH users who need to regularly clean up experimental sessions, failed tasks, or session trees containing large numbers of subagents, and want to free up both disk space and UI state.
  • Administrators or daily maintainers who care about admin-security capabilities and want something more thorough than “archive only”.

Important notes

  • The plugin reads and writes storage under the permissions of the current DSH process; before installing, you should read the source code and the MIT license to confirm it meets your security policy.
  • The feature depends on DSH’s storage layout and only applies to the dsh version range above; after a major version upgrade, check whether engines.dsh still matches.
  • Permanent deletion cannot be recovered; fork sessions and workspace project files are not deleted by this plugin—if they also need to be cleaned up, handle them separately.

Conclusion

dsh-session-purger fills the gap left by DSH’s default behavior where “archived data still remains on disk” by providing a hard-delete path: one menu entry and two confirmations let you remove the persistent traces on the DSH side of a session and all its subagents (excluding project files and fork sessions). For more information, see the community catalog https://www.skillhub.cn/plugins/RicardoYan/dsh-session-delete and GitHub https://github.com/RicardoYan/dsh-session-delete.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye