Lzcdebear/better-dsh-session-deletetool
better-dsh-session-deletetool
better-dsh-session-deletetool is a community DeepSeek Harness plugin. Read the repository README before installing.
Install
npx @deepseek-ai/dsh plugin --profile web add github:Lzcdebear/better-dsh-session-deletetoolRestart `dsh web` after install. Bundle APIs can change during the developer preview.
README badge
[](https://dshhub.dev/plugins/better-dsh-session-deletetool)Paste this into your README. The star count updates with every catalog sync.
From the README
Excerpt from Lzcdebear/better-dsh-session-deletetool, cleaned of badges and images.
better-dsh-session-deletetool
Delete a conversation from DeepSeek Harness — DSH ships archive only.
Why this exists
DSH can only archive a conversation. Archiving hides the row from the sidebar and keeps every
artifact: the log, the workspace account, the projection checkpoint all stay on disk, and the
conversation can be restored at any time. The persistence seam has no deletion API at all —
@deepseek-ai/dsh-session-persistence-jsonl states it plainly:
Nothing deletes session files — logs accumulate under
rootuntil removed externally; the seam has no deletion API.
So a long-lived profile accumulates conversations forever. This plugin adds the missing step: a
Delete conversation row in each session's ⋯ menu that really removes the data — and the dialog
it opens is also the one place that shows a conversation's whole family before you touch it.
What it deletes
For the chosen session, the Host half:
- removes the session's artifact directory — the current log, every retained historical format
generation, and any session-local file in it (
ctx.sessionPersistence.locate(header)gives the path); - removes the descendants you selected — child sessions are sessions of their own with their own
logs. DSH records every child in its parent's header (
SessionHeader.parentSession), and writes that field for every relation it creates: the Subagent runtime sets it withorigin: 'subagent', a fork sets it withisSeeded, and Agent Teams resolves its roster through the same field. The plugin walks that lineage breadth-first and unions it with the durablesubagentCatalogprojection (ctx.subagents.listDescendants), so a child whose own header no longer reads is still named. Descendants are deleted deepest first, gathered before anything is removed, and only the ticked ones go — up to 200 per request; - drops the workspace account — the id leaves every Workspace record's
sessionIds(Workspace.detachSession) and the registry-global archive and pin sets; - drops the projection checkpoint — the
session_projcachedomain record and its<id>.jsonfile; - closes the shells the session owned —
ctx.terminalsare part of no admission family, and the service only reaps them when the Agent is released, which can be long after the log is gone; - tells connected pages — one
api-session/removedper removed id, the same event the shipped Session controller emits when a Session is disposed, so the rows leave the sidebar immediately.
Seeing the family, and choosing what goes with it
The sidebar lists a subagent session and a derived conversation as rows of their own, and nothing there says which conversation spawned them; DSH itself never draws that relation. This dialog is the one place it is drawn: the session's whole family as one tree, the branches below the branches included.
…

