Preface¶
The extension method of DSH is plugin-oriented, and the community plugin directory is an independent site with no official affiliation to DeepSeek / High-Flyer, nor should it be understood as an official app store. For a running DeepSeek Harness web runtime, a common pain point is: a session has become unavailable from the interface, but the live store, workspace records, and disk artifacts remain in the running instance. dsh-session-cleaner addresses this issue by providing a Web UI entry point and an API route to delete running sessions, where the deletion itself does not require restarting dsh web.
What This Is¶
dsh-session-cleaner is a DeepSeek Harness plugin for the dsh web runtime environment, maintained by fountunt, licensed under MIT.
Its one-line positioning is: delete sessions for a running DeepSeek Harness web runtime, removing live store, workspace records, and disk artifacts without restarting dsh web.
Verified basic information is as follows:
- Plugin name:
dsh-session-cleaner - Maintainer:
fountunt - License:
MIT package.jsonversion:1.0.2peerDependenciesrequirement:@deepseek-ai/cordis ^4.0.1- GitHub repository:
https://github.com/fountunt/dsh-session-cleaner
Core Features¶
The following verified capabilities are described below.
- Delete DeepSeek Harness sessions, covering three types of data:
fileslive storeworkspace records
-
Delete sessions within a running
dsh webruntime, where the deletion itself does not require restartingdsh web. -
Add a
Delete sessionentry at the bottom of the⋮menu in the sidebar session row. -
Register a Web API route:
POST /api-ext/session.delete
This route supports a JSON request body with the field sessionId.
- Perform three types of cleanup during deletion:
- Remove live store entries
- Remove workspace records
- Delete disk artifact directories
Installation and Enablement¶
The installation command is as follows:
dsh plugin --profile web add github:fountunt/dsh-session-cleaner
After installation, dsh web needs to be restarted. Running instances will not hot-load new bundles, so two things are distinguished here:
- After installing or updating a plugin,
dsh webneeds to be restarted to load the plugin. - Once the plugin is enabled, deleting running sessions itself does not require restarting
dsh web.
If @deepseek-ai/cordis is already installed in the environment, please confirm the version satisfies:
@deepseek-ai/cordis ^4.0.1
Typical Usage¶
Web UI¶
After enabling the plugin, the Delete session entry can be seen at the bottom of the ⋮ menu in the sidebar session row.
Usage steps:
-
Locate the target session row in the sidebar.
-
Open the
⋮menu on the right side or at the bottom of that row. -
Click
Delete session. -
Confirm the deletion.
-
The sidebar will refresh.
Verified interface behaviors are as follows:
- When a session is running, this entry is disabled and displayed in gray.
- Idle agents already open in the UI are stopped first, then the deletion is performed.
- Ambiguous rows such as duplicate titles skip this entry.
- The current conversation cannot be deleted through this endpoint.
API¶
The interface registered by the plugin is:
POST /api-ext/session.delete
Content-Type: application/json
Example request body:
{ "sessionId": "..." }
On a same-origin harness page, it can also be called from the browser console:
await fetch('/api-ext/session.delete', {
method: 'POST',
headers: { 'content-type': 'application/json' },
body: JSON.stringify({ sessionId: '...' })
});
Applicable Scenarios and Notes¶
Suitable usage scenarios:
- Need to clean up DeepSeek Harness sessions in a running
dsh web. - Need to remove live store entries, workspace records, and disk artifact directories simultaneously.
- Want to perform batch or repeated session deletion operations via the Web UI or same-origin API.
Important notes before use:
-
This plugin runs under the permissions of the current
dshprocess and may modify the live store, workspace records, and disk artifacts. Review the source code before installation and confirm acceptance of theMITlicense. -
Deletion is irreversible.
artifacts,workspace membership, andlive entrywill all be removed. -
Sessions with attached agents will be rejected. Attached agents in either
runningoridlestatus will cause this endpoint to reject the deletion; the current conversation cannot be deleted through this endpoint. -
The sidebar entry is disabled for running sessions; idle agents are stopped first before deletion.
-
The
session-projection cachemay retain harmless stale rows until the next restart.
Conclusion¶
The value of dsh-session-cleaner is quite specific: it breaks down session deletion in a running DeepSeek Harness web runtime into three types of cleanup—live store, workspace records, and disk artifacts—and provides both Web UI and API entry points. For developers who need to maintain the session lifecycle of dsh web, this is a client-side plugin that can be directly incorporated into cleanup workflows.
Repository address:
https://github.com/fountunt/dsh-session-cleaner