Introduction¶
When developing agents using DeepSeek Harness (DSH), sessions and sub-agent sessions in the sidebar accumulate continuously during debugging iterations. Manually deleting these directories or cleaning up configuration files is not only tedious but also prone to accidentally deleting important data. The dsh-session-remover plugin provides a recoverable cleaning method by adding a deletion entry to the UI menu and utilizing the Windows Recycle Bin mechanism.
Overview¶
This is a DSH plugin (package name dsh-session-remover) developed by the maintainer sailoumili. It addresses the pain point of cleaning up sidebar session management, allowing users to directly delete conversations and their sub-agent sessions from the menu, moving files to the Windows Recycle Bin instead of permanent deletion.
Installation¶
Installation must be performed separately for the Web and Desktop profiles. After installation, the plugin must be enabled in the DSH plugin settings, and the client must be restarted.
# Web Version
dsh plugin --profile web add dsh-session-remover
# Desktop Version
dsh plugin --profile desktop add dsh-session-remover
Usage¶
After enabling the plugin, two new functions will be added to the operation menu of the sidebar session rows.
-
Delete a Single Session
Hover the mouse pointer over any session row in the sidebar and click the “…” at the end of the row.
Click “Delete Conversation” in the pop-up menu.
Click “OK” in the confirmation dialog.
The page refreshes automatically, and the session row disappears. -
Batch Delete Sessions
Click “Batch Delete…”.
Check the target conversations in the overlay (supports select all/deselect all).
Check the confirmation item and click “Delete the selected N items”.
During batch deletion, close operations are not responsive; wait for execution to complete.
Working Principles and Cleanup¶
When performing deletion operations, the plugin carries out several cleanup tasks:
- Recycle Bin Mechanism: Moves the conversation and its sub-agent session directories to the Windows Recycle Bin. Before deletion, it checks if the Recycle Bin function is enabled on the target disk; if not, it refuses to delete.
- Record Cleanup: Simultaneously cleans up three types of records: projection cache, workspace accounting, and archive collections.
- Sub-session Handling: Deletes sub-agent sessions along with the parent session (sub-sessions do not appear in the sidebar or search). Independent forked sessions created by “fork” do not belong to sub-agent sessions and will not be deleted along with the parent.
Notes¶
- Platform Limitations: Supports Windows only. The deletion logic relies on the system script host
cscript.exe; on other systems, it will report an error and refuse to operate. - Restored Location: Since the plugin clears workspace accounting, restored conversations will appear under “Ungrouped” in the sidebar rather than in the original workspace.
- Attachment Handling: The plugin does not recover attachments because they are content-addressed and lack reference counting, making it impossible to safely determine their ownership.
- Security Restrictions: The deletion interface
/api/session.deleteonly accepts local requests (e.g.,127.0.0.1); LAN access will return a 403. - Disk Requirements: If the session directory is located on a network drive, USB drive, or a disk with the Recycle Bin disabled (such as FAT/exFAT), the plugin will refuse to delete and will not fall back to permanent deletion.
Summary¶
dsh-session-remover provides DSH users with a visual session cleaning solution, reducing the risk of accidental deletion through the Recycle Bin mechanism. The installation and usage process is simple, but it is necessary to verify the operating system environment and disk Recycle Bin settings before use.