Introduction

DSH (DeepSeek Harness) is an important tool for agent development and debugging. In the Web UI, the original session management only supports renaming, forking, and archiving. The archive operation only hides sessions from the list (by modifying archivedSessionIds) and does not clean up data on disk, such as logs and workspace pending entries, so it cannot be completely removed.

This plugin fills the missing “delete” capability. After installation, it provides a delete entry in the session header and uses a double-confirmation mechanism to completely remove workspace pending entries, archive collection entries, in-memory records, and logs on disk.

Core Features

This plugin provides the following capabilities in the DSH Web UI:

  • Delete Entry: Adds a “Delete Session” button to the action area on the right side of the session title.
  • Thorough Cleanup: When deleting a session, it also cleans up workspace pending entries, archive collection entries, in-memory session records, and event logs on disk.
  • Safety Mechanisms:
    • Double Confirmation: A modal appears before deletion to prevent accidental operations.
    • Runtime Protection: Rejects deletion of sessions that are currently running to prevent write conflicts.
    • Trust Boundary: The API uses a loopback-only trust model and only allows local same-origin access.
  • Interaction Feedback: After successful deletion, it automatically switches the view and shows the result through a Toast notification.

Installation and Enablement

Installation requires two steps: building and registering the plugin:

  1. Clone the repository and build the browser-side Bundle:
git clone https://github.com/huimingli666/dsh-session-delete.git
cd dsh-session-delete
node scripts/build-client.mjs
  1. Register the plugin to the Web Profile’s Bundle list:
dsh plugin --profile web add "$PWD"

Restart DSH and refresh the browser for the changes to take effect.

Typical Usage

After activation, open any session, locate the trash icon in the action area on the right side of the title, click it, and confirm in the modal to permanently delete the session.

Limitations and Notes

  • Entry Limitation: The delete button is only available in the header action area of an opened session and cannot be invoked from the list-row menu.
  • Archive Cleanup Dependency: Cleanup of the archive collection depends on a prototype patch. If the patch is unavailable, the plugin only issues a warning without blocking the deletion flow.
  • Version Requirements: Requires Node.js version ^22.0.0 or >=24.0.0. The plugin was developed and tested on dsh 0.1.x.
  • Deletion Pipeline: On the host side, the plugin sequentially performs validation, runtime protection, workspace pending entry removal, archive collection cleanup, disk log deletion, and in-memory removal.

Summary

This plugin solves the “cannot be deleted” issue in DSH’s native session management and provides a solution for thoroughly cleaning up session data.

Plugin Directory
GitHub Repository