DeepSeek Harness (DSH) provides only archiving by default. Archiving hides rows in the sidebar but retains all data (logs, project directories, projection caches, etc.). If the data persistence layer has no deletion API, sessions will accumulate indefinitely. This plugin solves that problem by providing a true deletion option in the session menu and displaying the entire session family before deletion.

Plugin Overview

Attribute Value
Name better-dsh-session-deletetool
Author Lzcdebear
Category admin-security
License MIT

This is a DeepSeek Harness plugin whose core value is solving the issue that DSH only archives by default without deleting. It allows users to add a “Delete Session” option (not archived) to the session menu and displays the session family tree (sub-agents, derived conversations), so users can choose which components to delete collectively before deletion.

Core Features

  1. True Deletion (Not Archiving)
    DSH only archives sessions by default; this plugin provides physical deletion capability. After confirming deletion, it removes files such as logs, project records, projection caches, etc.

  2. Session Family Visualization and Deletion
    The plugin displays the session family tree, including sub-agents and derived conversations. Users can select a parent session to delete all its child sessions together, or select individual child sessions.

  3. Bulk Deletion
    A bulk deletion entry is provided to the left of the workspace search icon (trash can icon position). This entry is compatible with the search box style of the dsh-claude-style theme and supports listing sessions by workspace section for bulk operations.

  4. Deletion Scope
    The deletion operation cleans up project directories, projection caches, and terminals.

  5. Runtime Check
    If a session is running, the plugin prevents deletion and prompts the user to stop the work first.

Installation and Enablement

Use the DSH CLI to install it:

dsh plugin add github:Lzcdebear/better-dsh-session-deletetool

After the plugin is loaded, it adds a deletion option to the session menu and configures the following module injections:

{
  "bundle": {
    "patch": "./cordis.patch.yml"
  },
  "client": {
    "inject": [
      "@deepseek-ai/dsh-client-ui-sidebar",
      "@deepseek-ai/dsh-client-ui-workspace",
      "@deepseek-ai/dsh-client-locale"
    ]
  }
}

Typical Usage

  1. Delete a Single Session
    Click “Delete Session” in the session menu to delete it. The confirmation box displays the session’s family tree; select lower-level sessions and then click Confirm.

  2. Bulk Deletion
    Click the bulk deletion button to the left of the workspace search icon. This interface lists sessions by workspace section. Selecting a parent session deletes all its child sessions together, or select individual child sessions for deletion.

  3. Cascading Deletion
    In the confirmation box, select the parent session to delete all its sub-agents and derived conversations together.

Use Cases and Notes

This plugin is suitable for users who need to clean up disk space, completely remove old sessions, or manage complex agent hierarchy structures.

Notes:

  • Runtime Check: If a session is running, it must be stopped before it can be deleted.
  • Permission Requirements: The plugin runs with the permissions of the current DSH process; check the source code and license before installation.
  • Compatibility: Compatible with the search box style of the dsh-claude-style theme.

Summary

better-dsh-session-deletetool fills the gap in DSH’s session management. It not only provides true data deletion capability, but also helps developers clarify the relationships between agents and conversations through a visualized family tree, making it an effective tool for session governance.