Introduction¶
When running agents via the Web GUI in DeepSeek Harness (DSH), the sidebar often accumulates a large number of sessions. If a record is merely “invisible” from the list, it often does not mean the disk space and runtime state have been cleaned up: Harness stores the same session across the live store, workspace records, registry residue (pin/archive), and disk directories. Modifying only one layer can easily leave behind ghost rows, expired workspaces, or directories that still occupy space.
The community plugin dsh-dialogue-cleanup (maintained by Winnie-0721, categorized as a client-side plugin on SkillHub) targets the principle that “deleting a session should actually delete it.” It initiates deletion from the running Web runtime—without restarting the process or leaving the current window—and implements the deletion logic uniformly on the Host side. This prevents inconsistencies between the single-delete and batch-delete paths.
What is this¶
In one sentence: Delete DSH sessions from the running Web GUI—including live store entries, workspace records, registry residue, and disk artifacts. A single npm package contains both the Host half (Cordis plugin) and the Web client half, installed into the Host according to official plugin specifications.
- Repository: Winnie-0721/dsh-dialogue-cleanup
- Directory Page: SkillHub Plugin Page
- License: MIT (per README and
package.jsonin the materials) - Compatible with DSH 0.2.0-rc.2 (per README badges and description)
Core Features¶
The following introduces the capabilities explicitly documented in the materials for this plugin, without covering configuration items not appearing in the README or package.json.
Single Deletion and Batch Management¶
- Single Deletion: Hover over a session row in the sidebar, open the
...menu, and select Delete session (registered atorder: 500, positioned after the official Archive item). After confirmation, it removes the live entry, workspace record, registry residue, and disk artifacts. - Batch Deletion: Open Settings → Dialogue Cleanup, where you can search, filter by project/status/session type/archive, sort, and paginate; check deletable rows or use “Select all deletable” to perform a batch deletion in a single request.
Host-side Deletion Semantics¶
The deletion implementation is centralized in the Host’s lib/service.js (deleteSession), accessed via thin adapters for both HTTP and slot UI. This ensures that single and batch deletions do not evolve into separate sets of logic. Key points of the deletion order described in the materials include:
- Refuse deletion of running sessions (409
refused); the Host determinesdeletable, so the UI does not guess safety. - Detach from the live store to prevent ghost rows from appearing after deletion.
- Clean up workspace records and subsequent steps (the README continues to describe registry and disk artifacts at the truncation point; paths and auditing are handled by
lib/artifacts.jsandlib/audit.jsrespectively).
Unlike the upstream behavior of “always returning 200,” this plugin uses real HTTP status codes for errors (e.g., 400 / 403 / 404 / 405 / 409 / 429 / 500). Result rows report ok / failed / degraded status, the number of directories removed, etc.; if the live store cannot be detached, it marks detached: false rather than faking a success.
Client-side Display Design Choices¶
- Archived sessions visible by default: Archiving is not deletion; hiding them by default would block the cleanup of disk usage. The panel provides a tri-state filter (hide archived / all / archived only), with default display including archives.
- Explicit marking of subagent rows: The official sidebar hides rows with
origin: 'subagent'; when they appear in this plugin’s list, they are distinguished by badges (material examples:空闲[Idle] /运行中[Running] (unselectable) /子代理[Subagent] /已归档[Archived]). - Irreversible Confirmation: Uses native
<dialog>+showModal(), closed only via Cancel orEsc; clicking the overlay does not close it, preventing accidental clicks on irreversible deletions.
The client registers via official slots and does not manipulate the DOM directly:
sidebar.workspaces.session.menu.item→ Single delete menu item.settings.section(id: dialogue-cleanup,order: 25) → Settings entry and batch panel.
Installation and Activation¶
In an environment with the DSH CLI already available, install the Web-side plugin according to the README Quick Start:
dsh plugin --profile web add dsh-dialogue-cleanup
Notes:
- Package name matches the npm release:
dsh-dialogue-cleanup(current version in materials is 1.1.2). - Runtime environment requires Node >= 20.0.0 (
enginesinpackage.json). - Host-side code changes require a DSH process restart; pure client-side changes do not (see
docs/RELEASING.mdin the repository for details).
Typical Usage¶
After installation, follow the two paths described in the README:
- Clean up current conversation: Target session in sidebar →
...→ Delete session → Read the warning and session ID in the confirmation layer → Confirm permanent deletion. - Centralized history cleanup: Settings → Dialogue Cleanup → Narrow down range with filters → Check deletable sessions → Execute batch deletion; running rows are unselectable and must be finished or switched before deletion.
The batch panel screenshots and confirmation layer screenshots are generated by scripts/render-shot.mjs in the repository based on the actual component tree and CSS (the README’s “Honest limitations” section clarifies they are neither manual mocks nor live GUI captures).
Applicable Scenarios and Notes¶
Who it’s for: Developers who use DSH via a local or single-machine Web GUI for long periods, have accumulated sessions and workspace directories, need verifiable batch cleanup results, and want the deletion path to be consistent with the Host permission model.
Please be aware before use:
- The plugin executes file system deletions and API calls with the permissions of the current dsh process; read the source code and MIT license before installation to ensure compliance with your security and compliance requirements.
- Deletion is irreversible; deleting running sessions will be rejected—this is a deliberate design choice, not a defect.
- SkillHub is a community plugin directory and has no official affiliation with DeepSeek/High-Flyer; star and fork counts are subject to the directory/GitHub display at the time (the lead indicates GitHub 2 stars).
Conclusion¶
dsh-dialogue-cleanup turns “deleting a session” into a Host-side, auditable operation with dual UI entry points (sidebar single delete + settings page batch delete), and strives to truthfully report detach and disk cleanup results. To view instructions, release chain, and limitations, please visit the GitHub Repository or the SkillHub Directory Page.