dsh-session-deleter
Permanently delete DeepSeek Harness conversations from the sidebar — ordinary conversations and archived ones, with a confirmation step. This is an unofficial community plugin, not affiliated with DeepSeek.
DeepSeek Harness can archive a conversation but has no delete action: archived logs stay on disk forever. This plugin adds Delete conversation permanently to the conversation row menu and removes the conversation's Session log and its derived state from the profile.
Features
- One destructive item in the shared conversation row menu (
…or right-click), available for ordinary and archived conversations. - A confirmation dialog with English and Chinese copy, focus trapping, Escape-to-close, and inline failure feedback.
- Immediate removal from the sidebar: an idle live Agent is closed before its files are removed, so the row does not linger as an "Ungrouped" ghost.
- Refuses a conversation that is running or still has reported work in progress (subagents, background jobs, scheduled reminders), including an archived one.
- Refuses to delete the conversation currently open in the main view; switch to another conversation first.
- Verifies the storage path against the Session id before deleting anything.
- Restores the temporary archive state when closing or removing the conversation fails.
Requirements
- DeepSeek Harness
0.2.2-rc.2with the Web GUI (the plugin declaresengines.dsh: ^0.2.2-rc.2). - No build step and no runtime dependencies.
Install
From npm
- Open Settings → Plugins in DeepSeek Harness.
- Choose Add plugin.
- Enter
dsh-session-deleterand confirm. - If DeepSeek Harness asks for a restart, restart it.
From GitHub
Choose Add plugin and enter the repository URL:
https://github.com/2Wren/dsh-session-deleter
From a local checkout
Clone the repository and enter its absolute path in Add plugin, or use the agent tool:
plugin_manager install_bundle /absolute/path/to/dsh-session-deleter
Installing a local directory links it. Replacing an already-loaded copy requires a restart.
Usage
- Open the sidebar conversation row's
…menu, or right-click the row. - Choose Delete conversation permanently.
- Confirm in the dialog.
Archived conversations are hidden by default. Switch the sidebar filter to All conversations (show archived) or Archived only to reach them.
The row disappears immediately after a successful deletion. Deleting is final: there is no undo and no recycle bin.
What is deleted
- The Session's append-only log directory under the configured session
persistence root, including every stored format generation and the
session.lockfile. - The Session's projection-cache record.
- Its Workspace accounting, pin, and archive entry.
What is kept
- Attachments are content-addressed and may be shared by other conversations, so they are left in place.
- The full-text Session search index is not rewritten; a profile that enables it may keep entries for the deleted conversation until the process restarts.
- The project directory itself and every other conversation.
How it works
DeepSeek Harness exposes no Session deletion API, so the plugin performs the operation carefully on the Host:
POST /api/session.deleteruns on the authenticated, owner-only/apichannel. It acceptsapplication/jsononly and validates the Session id.- The Host asks
ctx.sessionPersistence.stat()for the selected log file and checks that the file lives in exactly<project>/<sessionId>/; anything else is refused without touching the filesystem. - It asks the Workspace activity waterfall for running work, then archives the Session so the durable archive gate blocks new model steps.
- The plugin keeps the Agent handle that the registry normally discards (by
wrapping
ctx.agents.resume/create) and disposes an idle live Agent. That removes the Session from the in-memory store and publishes the removal to the sidebar. - It removes the Session-owned directory, deletes the projection-cache record, and clears the Workspace accounting, pin, and archive entry.
- Any failure after the temporary archive restores the previous archive state.
This relies on internal DeepSeek Harness APIs, not only on stable public
surfaces. The declared engines.dsh range is part of the contract: check the
plugin against a new DSH release before widening it.
Limitations
- The conversation open in the main view cannot be deleted from its dialog; the button is disabled and the dialog explains why.
- A conversation opened before this plugin version loaded may not have a retained handle; its row can remain as an inert entry until DeepSeek Harness restarts, although the log files are already gone.
- Subagent conversations are refused; they are managed by their parent.
- Version-sensitive: a DSH upgrade can change the internal APIs this plugin
uses. Pin the tested version and re-test before widening
engines.dsh.
Uninstall
Open Settings → Plugins, find dsh-session-deleter, and remove it. Removing
the plugin does not restore conversations it already deleted.
Development
git clone https://github.com/2Wren/dsh-session-deleter.git
cd dsh-session-deleter
npm test # Host, route, live-disposal, and browser-factory tests
npm run pack:check
The tests create temporary Session-shaped directories; they never touch the
real profile. There is no build step: index.js runs on the Host and client.js
is the browser bundle loaded by the DeepSeek Harness module loader.
To iterate inside DeepSeek Harness, install the checkout through Add plugin with its absolute directory path, then restart when Host code changes.
See CONTRIBUTING.md for the review checklist, and RELEASING.md for the npm release process.
License
MIT. DeepSeek Harness is a separate project with its own license; this repository contains no DeepSeek Harness source code.
No comments yet. Be the first to write one.