Introduction¶
When using DeepSeek Harness (DSH) and related AI terminal tools (such as Claude Code, Codex CLI, and WorkBuddy), local session files accumulate over time. Managing these files manually is not only cumbersome but also prone to accidental deletion of important data. The dsh-session-sweeper plugin aims to provide a safe entry point for session management, allowing you to scan, inspect, and clean up these local history records in the DSH Web interface.
What is this¶
This is a DSH plugin maintained by HrxSpace. It scans and manages sessions from all local terminal tools on the computer (Claude Code, Codex, WorkBuddy, DSH, etc.).
Core Features¶
The plugin provides the following core capabilities:
- Session Scanning and Listing: Scans and lists sessions, including title, project, message count, size, and last active time.
- Content Preview: Views session content, with preview support including DSH logs.
- Safe Cleanup: Defaults to an isolation-first strategy, moving files to the trash and generating a SHA-256 manifest; supports one-click batch recovery.
- Hard Delete: Provides a hard delete function, but requires entering the confirmation phrase
DELETE. - Directory Reading: Supports reading sessions under specific directories (Claude Code, Codex, WorkBuddy, DSH).
- API and Privacy: Provides a same-origin JSON API (
/sweeper/api/*) and has no network access permissions.
Installation and Enablement¶
Install using the official command:
dsh plugin --profile web add github:HrxSpace/dsh-session-sweeper
After installation, restart dsh web, then open Settings -> Session Sweeper in the Web UI.
Typical Usage¶
On the Session Sweeper page, you can see a list of all local sessions. If you want to perform a hard delete, the system will require you to enter the confirmation phrase DELETE.
For test environments or custom paths, you can use the following environment variables:
* DSH_SWEEPER_HOME: Redirects the source directory to scan
* DSH_SWEEPER_RECYCLE: Redirects the trash root directory
Applicable Scenarios and Notes¶
The plugin runs in the permission context of the current dsh process. It is recommended to check the source code and license before performing operations.
- Data Safety Model: The default isolation window is 24 hours, and active sessions are skipped. Sessions currently in use cannot be cleaned up.
- File Operation Scope: The plugin only touches session files and does not modify configurations, credentials, memory, or to-dos.
- Directory Read/Write:
- Read:
~/.claude/projects/**,~/.codex/sessions/**,~/.workbuddy/projects/**,~/.dsh/sessions/** - Write: Trash directory only (default is
~/.hist-sweeper/recycle)
- Read:
- Uninstall Behavior: The recycle directory and audit logs are retained after uninstallation. Manually delete
~/.hist-sweeperto completely clean up.
Short Conclusion¶
For more details, visit the GitHub repository.