Skip to content

fountunt/dsh-session-cleaner

41Last commit Aug 15, 2026

dsh-session-cleaner DSH plugin

dsh-session-cleaner adds a session deletion feature to the DeepSeek Harness web runtime. It provides both a UI menu item in the sidebar and a server API endpoint to permanently remove sessions, including their workspace records and artifact files, without requiring a restart.

How to install the dsh-session-cleaner DSH plugin

dsh plugin --profile web add dsh-session-cleaner            # from npm

Copying does not run this command. Review the repository and version before installing the dsh-session-cleaner DSH plugin.

dsh-session-cleaner DSH plugin data source

dsh-session-cleaner DSH plugin snapshot date: Aug 16, 2026

discovered

What the dsh-session-cleaner DSH plugin can do

  • Adds a 'Delete session' item in the sidebar menu when a session row is not ambiguous.
  • Provides a POST /api-ext/session.delete endpoint for programmatic deletion.
  • Removes the session from the in-memory live store, detaches it from workspace records, and deletes on-disk artifact directories.
  • Refuses deletion of sessions with an attached agent (running or idle).
  • Prevents deletion of the current active conversation.

Where the dsh-session-cleaner DSH plugin fits

  • Clean up unfinished or unwanted sessions to keep the sidebar tidy.
  • Remove broken or stuck sessions that cannot be resumed.
  • Free up disk space by deleting artifact directories associated with deleted sessions.
  • Automate session management via the API for integration with external tools.

Who the dsh-session-cleaner DSH plugin is for

  • DSH users who want to delete specific sessions without restarting the server.
  • Developers integrating DSH with external systems who need a programmatic way to remove sessions.

dsh-session-cleaner DSH plugin limitations

  • Cannot delete sessions with an attached agent (running or idle); only idle sessions without agents can be deleted.
  • Cannot delete the current active conversation.
  • Deletion is irreversible: artifacts, workspace membership, and the live entry are all removed.
  • The session-projection cache may keep a harmless stale row until the next server restart.

dsh-session-cleaner DSH plugin: from the repository README

Quoted from the fountunt/dsh-session-cleaner README, the upstream source of the dsh-session-cleaner DSH plugin. Copyright remains with the original authors.

Delete DeepSeek Harness sessions from a **running** web runtime — files, live store, and workspace records — without restarting `dsh web`. The official web API only offers `workspace.archiveSession` (hide); there is no `session.delete`. This bundle closes that gap. ## Install ```sh dsh plugin --profile web add dsh-session-cleaner # from npm dsh plugin --profile web add github:fountunt/dsh-session-cleaner # from git # or from a local checkout dsh plugin --profile web add file:/path/to/dsh-session-cleaner ``` Then restart `dsh web` (a running instance does not hot-load new bundles). ## Usage ### Web UI (v1.0.0) The client half adds a **🗑 "Delete session" item** at the bottom of the sidebar session row ⋮ menu — the item is skipped when the row title is ambiguous (duplicate titles). Click, confirm, and the session is deleted and the sidebar refreshes. The item is disabled (greyed) while the session is running; sessions opened in the UI (idle agents) are stopped first, then deleted. The current running conversation can never be deleted. ### API The plugin registers one route on the web server: ```http POST /api-ext/session.delete Content-Type: application/json

Read the full READMERepository license: MIT

dsh-session-cleaner DSH plugin questions

How do I delete a session in DSH web?

After installing the plugin, a 'Delete session' item appears in the ⋮ menu of each session row in the sidebar. Click it, confirm, and the session is immediately deleted. The item is disabled for running sessions and the current conversation.

Can I delete a session that is currently running?

No. The plugin refuses to delete any session that has an attached agent, whether running or idle. You must first stop the session before deleting it. The current active conversation can never be deleted.

Is there an API to delete sessions programmatically?

Yes. The plugin registers a POST endpoint at /api-ext/session.delete. You can send a JSON body with the sessionId. The response will indicate success or failure. This works from the browser console of the harness page.

What happens to the session files when I delete a session?

The plugin removes the session from the live store, detaches it from workspace records, and deletes the on-disk artifact directories. The deletion is irreversible — the session and its files are permanently gone.

Why can't I delete the current conversation?

The plugin intentionally prevents deletion of the current active conversation to avoid data loss. You must start a different conversation before you can delete the previous one. The item is greyed out in the menu for the current session.