Permanently delete sessions from the DeepSeek Harness UI: a header trash button and a sidebar menu item behind a risk-consent dialog, plus a workbench_session_delete agent tool. Started from lsz-asd/dsh-plugin-session-delete and maintained independently since v0.4.0; do not install it alongside that plugin, since both register the same workbench_session_delete tool.
Install
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:SUKJG1052/DSH-Plugin-Session-Delete
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
简体中文 · English
dsh-plugin-session-delete
Delete sessions from the DeepSeek Harness UI — for real. Archiving only hides them, and a corrupted session just won't go away. This plugin supplies the missing last step.
Built for DSH 0.2.x (the web client and the desktop app alike); the current release has been verified against 0.2.1-rc.5.
Features
Entry points
- Trash button in the conversation header: the delete action next to the session title; for a running session its tooltip becomes "Delete session (running — deleting will stop the task)".
- Sidebar session-row "…" menu → Delete session: placed after the shipped pin / rename / fork / archive group.
Confirmation dialog: shows the session name and id, adds a warning when the session is running, and keeps the delete button disabled until "I understand the consequences. Confirm deletion" is ticked.
Delete chain: the session log, the projection cache and the workspace accounting are removed together, through the live storageDomain, so in-memory state and on-disk units stay consistent — a later flush cannot resurrect the session.
Agent tool: workbench_session_delete, so agents can delete sessions too.
Bilingual: all copy follows the UI language (the language setting or the browser language) and switches live.
Plugins page entry: the plugin list shows the localized title "Session Delete" and a one-line description (locale/zh.json / locale/en.json) instead of the bare package name.
Installation
The plugin is published on GitHub only; it installs like any other GitHub plugin.
dsh plugin --profile <profile> add github:SUKJG1052/DSH-Plugin-Session-Delete#v1.0.2
dsh --profile <profile> --dump-config # optional: confirm chameleon-session-delete is in the tree
- The desktop app ships no global
dshcommand; use the CLI it carries,resources\runtime\cli\bin\dsh.cmdunder the install directory (resources/runtime/cli/bin/dshon macOS / Linux). The arguments are identical. - Before the first CLI use on the desktop app, launch it once (so the
desktopprofile exists), then fully quit it before running the command. - The command must carry
--profile; without it the CLI fails withrequired option '--profile <name>' not specified. - Restart the profile to apply (a profile with HMR enabled picks it up immediately).
Install failing, or no git on the machine? The github: form clones through your local git, so it needs git and a reachable github.com. The tarball URL needs neither — pnpm downloads it directly and DSH's GitHub reachability pre-check is skipped:
dsh plugin --profile <profile> add https://codeload.github.com/SUKJG1052/DSH-Plugin-Session-Delete/tar.gz/refs/tags/v1.0.2
To install the latest code from the default branch: with github: swap #v1.0.2 for #main (or drop it entirely); with the tarball URL swap refs/tags/v1.0.2 for refs/heads/main.
Install from the UI: Sidebar → "Plugins" page → "Add plugin" → paste github:SUKJG1052/DSH-Plugin-Session-Delete#v1.0.2 (or the tarball URL) into "Package name or URL" → "Install" → restart DSH.
Upgrading: in the UI, uninstall and install the new version (the install dialog says so itself: there is no automatic update yet); on the command line, run add again with the new version — as long as the package name is unchanged, pnpm replaces the version.
Upgrading from 0.5.x or earlier: v1.0.0 renamed the package (@huanlin/… → @sukjg1052/…), so uninstall the old one first:
dsh plugin --profile <profile> remove @huanlin/dsh-plugin-session-delete
dsh plugin --profile <profile> add github:SUKJG1052/DSH-Plugin-Session-Delete#v1.0.2
Uninstall
dsh plugin --profile <profile> remove @sukjg1052/dsh-plugin-session-delete
Usage
- To delete a session: hover a sidebar row → "…" → "Delete session", or click the trash button in the conversation header; tick the consent box, then click Delete. The client re-fetches the session list afterwards.
- To have an agent delete one: describe which session to delete and the agent calls
workbench_session_delete(parametersessionId: the bare id and thesession-prefixed form both work, and UUIDs, counter ids and custom ids are all accepted). - Deleting a running session stops its task first — work in progress is interrupted.
Compatibility
- DSH 0.2.1 and later 0.2.x (web and the desktop client; tested on
0.2.1-rc.5): supported. - DSH 0.2.0-rc.x: still works (the host / client code is identical to v0.4.2).
- DSH 0.1.x: not supported. Since 0.2.0 the ui-primitives icon naming and the sidebar menu slot contract both changed, and v0.4.x is written against 0.2.x.
The supported range is declared by engines.dsh alone (>=0.2.0-rc.1 <0.3.0-0, i.e. the whole 0.2.x line), which DSH 0.2.1 and later judge the plugin by. v1.0.1 drops the peerDependencies declaration: under npm's prerelease rules a peer range like ^0.2.0-rc.1 (upper bound <0.3.0-0) never matches 0.2.1-rc.2, so the plugin market's (dshmarket) diagnostics reported a spurious incompatibility and pnpm added an unmet-peer warning to every profile operation — while the host has ignored peers since 0.2.1 anyway. On a mismatch DSH refuses the install and prints an exact-version exemption command (dsh plugin allow-version ... --accept-risk). Do not take the exemption unless you understand the risk — the right move is the plugin version that matches your DSH version.
Changelog
- v1.0.3 (2026-10-30): adapted to DSH 0.2.1-rc.5; post-delete list refresh and session switching now use
sessions.refresh()/uiWorkspace.openSession()(the oldrefreshList()/open()are gone); no other interface changes. - v1.0.2 (2026-10-25): adapted to DSH 0.2.1-rc.3 (host / client interfaces and slot contracts re-checked); the code is unchanged.
- v1.0.1 (2026-10-19): dropped
peerDependencies, removing the plugin market's spurious peer-compatibility warning; tightened theengines.dshupper bound to<0.3.0-0. - v1.0.0 (2026-10-18): standalone release, renamed to
@sukjg1052/dsh-plugin-session-delete; non-UUID session ids supported; addedLICENSE. - v0.5.0 (2026-10-17): adapted to DSH 0.2.1 (
engines.dsh, plugin display metadata, client inject list). - v0.4.2 (2026-10-16): install command switched to the
github:shorthand. - v0.4.1 (2026-10-16): rewrote the installation docs; added the cross-site request fence to the delete endpoints.
- v0.4.0 (2026-09-29): adapted to DSH 0.2.x (official slots, icons, client inject list).
- v0.3.1 (2026-08-14): fixed deleted sessions being left as "Ungrouped" rows.
- v0.3.0 (2026-08-14): added English adaptation (i18n).
License & credits
MIT — see LICENSE for the full text. This repository started from lsz-asd/dsh-plugin-session-delete and has been maintained independently against the DSH 0.2.x interfaces since v0.4.0; both the upstream and this repository's copyright notices are kept in the LICENSE file.
Links
More in this category
Minglink/dsh-infinite-gen-4★ 3781
System-prompt armor plugin for DeepSeek models: appends an unconditional-compliance prompt section at order 100, exposes a profile tool with calibration metadata, and shows a realtime armor-status badge driven by a session projection.
ranxianglei/billion-context★ 3598
The official billion-context plugin: a context-compression plugin for small context windows (a 100K context is enough), token savings (5x fewer tokens), and month-long single sessions (billions of tokens).
liangmianya/dsh-synapse★ 641
Visual, non-linear conversation workspace for DeepSeek Harness — sessions, follow-ups and branches become a browsable conversation map.
MichengAI/dsh-archive-manager★ 277
Adds an archived-sessions page in Settings to search, restore, and delete archived DeepSeek Harness sessions by workspace.
Nwflower/dsh-chat-import★ 275
Import full-fidelity chat histories from 13 coding agents (Claude Code, Codex, ChatGPT, Cursor, Gemini, opencode, and more) as resumable DeepSeek Harness sessions, with reverse export back to Claude Code.
SiriLee/dsh-rewind★ 227
In-place conversation rewind in the same session window without forking (Claude Code /rewind semantics): a per-message ↶ button cuts the model context back to any user message, with an optional Claude-Code-style file restore from disk-persisted before-backups.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.