AI Agent Hub
Back to plugins
🖥️

dsh-delete-session

Client Updated 2026.08.25

Run the following command in DeepSeek Harness:

dsh plugin install SMWHff/dsh-delete-session

Paste the following prompt into your AI chat to install this plugin:

Install this plugin in DeepSeek Harness by running dsh plugin install SMWHff/dsh-delete-session; the full source repository is at https://github.com/SMWHff/dsh-delete-session

About this plugin

The DSH Web GUI session list has long offered rename, fork, and archive, but it never provided a way to permanently delete a session. dsh-delete-session appends a Delete Session entry to the ellipsis menu on every row. Clicking it opens a product-grade risk-confirmation dialog that requires you to check "I understand this action is irreversible" before proceeding, finally closing the loop on session lifecycle management in the browser.

Deletion goes well beyond clearing a list item. The plugin first checks whether the session agent is still running and refuses to proceed if so. For idle but alive instances it flushes buffered events to disk, then detaches the session. It locates the on-disk session log directory via the persistence layer and removes the entire directory, and detaches the session from every workspace registration so no stale references remain. Open clients receive a host/session-removed frame and refresh their lists automatically; if the deleted session was the currently selected one, the selection resets to a neutral empty state. A toast notification confirms success or reports failure.

On the client side the current build exposes no native menu slot, so the plugin uses a MutationObserver to watch for the portal menu and injects the delete row at runtime. Session identity is resolved by unique display title first, then by DOM row position among same-titled sessions; if resolution fails outright the row is simply not injected. This plugin is aimed at developers who work daily in DSH Web mode and want a complete, safe, and consistent way to clean up historical sessions without touching the filesystem manually.

Use Cases

  • Cleaning up a large backlog of historical sessions in a long-running project
  • Removing one-off debug sessions after the task is done so they stop cluttering the list
  • Detaching stale workspace-linked sessions and erasing their on-disk log directories in one step

Best For

  • Engineers who develop and debug daily in DSH Web mode
  • Team leads maintaining multi-workspace, multi-session environments
  • Self-hosting users who care about disk footprint and session data hygiene