Permanently deletes one session from the sidebar session menu, or several at once from the "..." menu beside the sidebar section title: tick sessions in the list (running ones are refused), then confirm in a dialog — log directory, workspace membership, live Host instances and the client list row are all cleaned. The same "..." menu also collects the session search and view options. It also sweeps rows whose log is already gone, and retries a user message or an assistant reply from the button right of Copy.
Install
# from a prebuilt release tarball
dsh plugin --profile web add -w "https://github.com/shuiqian520/dsh-session-delete/releases/latest/download/dsh-session-delete.tgz"
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:shuiqian520/dsh-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 · 中文
A DeepSeek Harness (DSH) plugin that permanently deletes a session from the sidebar session menu and adds a Retry button right of Copy on both user messages and assistant replies.
- Delete means delete: the session log directory, its workspace membership, the live Host instances, and the client list row are all cleared together — no ghost rows, no "ungrouped" leftovers, no restart required.
- Retry resends that input: retrying an assistant reply resends the user input right before it; retrying a user message resends that message. The DSH event log is append-only, so the old reply stays above and the new one is appended below.
Screenshots
| Session row "…" menu | Permanent-delete confirmation |
|---|---|
![]() |
![]() |
The same two images are declared to the plugin marketplace through
screenshots.json; replacing the files under assets/ is enough to
update them (edit screenshots.json to reorder, add or drop — up to 8).
Requirements
DSH 0.2.x (Web UI or Desktop). No runtime dependencies and no @deepseek-ai/dsh-*
peerDependencies, so no version gating applies. Node ≥ 22 is only needed for development.
Install
Put this directory in your workspace and run the plugin manager's
install_bundle with the directory's absolute path as the target. It installs the package
into the current profile, applies the bundled cordis.patch.yml
(- insert: id: session-delete), and adds dsh-session-delete to dsh.profile.bundles.
Profiles with HMR pick it up immediately; otherwise restart DSH once.
Alternatively, npm pack the package and install the produced .tgz, or junction the
directory into <profile>/node_modules and add the dependency + bundle entry by hand
(host changes need a restart; client changes need a restart and a page reload).
Usage
- Delete a session: session row "…" → "Delete this session" → confirmation dialog. Running sessions are refused (the menu item is disabled and the Host re-checks); sessions whose log is already gone are still offered, as a list-only cleanup.
- Bulk delete: the "⋯" menu at the right of the workspace section title (next to "Add workspace") collects session search / view options / bulk delete. Pick "Bulk delete sessions", tick rows in the list (running sessions cannot be ticked), then the menu offers "select all deletable / clear selection / delete the N selected… / exit". Confirming opens the same dialog as the single-session delete, so both look and behave identically. The search and view-option entries delegate to the official buttons — our menu closes first and the official logic takes over, so search and view options behave natively.
- Retry: the refresh icon right of Copy on an assistant reply or a user message. Text only — image and file attachments are not resent.
Routes
| Method | Path | Purpose |
|---|---|---|
| GET | /api/session-delete/status?sessionId=<id> |
{ running, artifactExists, deletable, reason } |
| POST | /api/session-delete/delete |
body { sessionId, confirm: true } → { ok, mode, detached, disposed, announced } |
| GET | /api/session-delete/sessions?limit=<n> |
read-only session list used by "select all deletable" |
| POST | /api/session-delete/delete-many |
body { sessionIds, confirm: true } → per-session results |
| POST | /api/session-delete/sweep |
clean leftover rows whose log no longer exists |
| GET | /api/session-delete/retry-source?sessionId=<id>&messageId=<id> |
read-only: the text that message would resend |
mode is one of purge (default, permanent), recycle, quarantine (fallback holding
area) or ghost (the log is already gone; only the list row is cleared).
Retry has no Host route: sessionController.prompt is a @Remote method whose
definition needs the gateway-provided signal, so a plugin calling it directly throws
Cannot read properties of undefined (reading 'throwIfAborted'). Delivery goes through the
official client session binding instead —
sessions.using(id, { source: 'workspaceOperation' }, (ref) => ref.binding.session.prompt([{ type: 'text', text }], 'queue'))
— and the Host only resolves the text to resend.
Configuration
| Field | Default | Meaning |
|---|---|---|
trashMode |
purge |
purge deletes permanently; recycle prefers the OS recycle bin and falls back to a holding area |
quarantineDir |
~/.dsh/trash/session-delete |
holding area used by the fallback path |
Localization
Visible text goes through the Client locale service (locale.register + locale.bind),
with zh and en dictionaries; everything falls back to Chinese when the service or a
dictionary is missing. Manifest metadata lives in locale/zh.json,
locale/en.json and icon.svg. Host-side error strings are
Chinese only, which is a known limitation.
Safety notes
- Deletion is permanent by default and cannot be undone; set
trashMode: recycleif you need a recoverable path. - The plugin declares no hard
inject. Every Host service it uses is soft-injected insideapply, so a missing or renamed service only means "no routes registered" — it can never park the bundle aspendingand break web boot. sweeponly touches sessions whose log directory does not exist; anything with a log on disk is reported back inkeptand left alone.
Development
node --test test/smoke.mjs
The suite uses a real temporary directory plus injected executor and store stubs; it never
touches a real session. Implementation notes and the official contracts this plugin relies
on are in docs/internals.md.
License
Links
More in this category
ranxianglei/billion-context★ 8746
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).
Minglink/dsh-infinite-gen-4★ 4848
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.
liangmianya/dsh-synapse★ 860
Visual, non-linear conversation workspace for DeepSeek Harness — sessions, follow-ups and branches become a browsable conversation map.
ECNU/EduWork#dsh-side-chat★ 435
Open temporary side conversations from a message with a snapshot of its history, then archive them on close; optional annotation integration adds selection-based questions. Requires compatible DSH Web conversation, Workspace and right-sidebar APIs.
MichengAI/dsh-archive-manager★ 407
Adds an archived-sessions page in Settings to search, restore, and delete archived DeepSeek Harness sessions by workspace.
Nwflower/dsh-chat-import★ 335
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.


Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.