Deletes DSH session logs, workspace records and artifact directories with a family tree, batch delete, and one-click workspace binding. Its HTTP routes have no DSH access check, so a web page open in your browser could call them.
Install
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:w1207433681/better-dsh-session-cleaner
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
A DSH session deletion plugin with a family tree, workspace artifact folders, and optional folder deletion.
This build is workspace-independent. It derives artifact paths from each session header.cwd and contains no machine-specific root.
Features
- Delete session logs, workspace records, archive/pin entries, and projection cache.
- Family tree for subagents and derived conversations.
- Show workspace artifact paths, folder sizes, open buttons, and per-folder checkboxes.
- Cross-workspace artifact resolution under \sessions.
- Two binding sources: artifact_workdir.txt sidecar and session-artifacts.json manifest.
- Missing folders are never created automatically. The dialog offers an explicit Create and bind button.
- One-click workspace binding from the header icon beside the workspace controls.
- Detailed workspace-binding view with bound/unbound badges and Rebind actions.
- Durable binding state: the header icon stays green for bound sessions.
- A one-time installer that writes AGENTS.md rules and the initializer script.
Install
git clone https://github.com/w1207433681/better-dsh-session-cleaner.git
Copy the repository contents to:
C:\Users\You\.dsh\profiles\desktop\node_modules\better-dsh-session-cleaner
Restart DSH completely after changing Host-side files.
Workspace binding
- The folder-plus icon beside the workspace header controls binds the current workspace in one click.
- The bulk-delete dialog header offers Detailed workspace binding.
- A read-only workspace-status route keeps the green state durable.
Command-line installer:
powershell -NoProfile -ExecutionPolicy Bypass -File .\node_modules\better-dsh-session-cleaner\scripts\install-workspace.ps1 -Workspace .
For each new session:
powershell -NoProfile -ExecutionPolicy Bypass -File .dsh\session-workspace.ps1 -Name "topic"
The marked AGENTS.md block is intentionally compact: a start marker, one rule line, and an end marker. Binding detection only checks for the marker, so shortening the block keeps every workspace bound. A full single-paragraph template is in docs/AGENTS.template.md (~50% fewer injected tokens per session).
Development
npm run check
npm test
Credits
Based on better-dsh-session-deletetool 0.7.5 by Lzcdebear.
Original project: https://github.com/Lzcdebear/better-dsh-session-deletetool
License
MIT
Links
More in this category
ranxianglei/billion-context★ 8616
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★ 4803
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★ 812
Visual, non-linear conversation workspace for DeepSeek Harness — sessions, follow-ups and branches become a browsable conversation map.
ECNU/EduWork#dsh-side-chat★ 429
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★ 401
Adds an archived-sessions page in Settings to search, restore, and delete archived DeepSeek Harness sessions by workspace.
Nwflower/dsh-chat-import★ 332
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.