Introduction¶
When using DeepSeek Harness (DSH) with the billion-context plugin enabled, a large number of session records are stored locally. By default, these records are persisted in the index.db file. The official tooling only provides a CLI-based cleanup method, but within a DSH agent session, CLI commands are intercepted by the sandbox and cannot be executed. This plugin moves the cleanup entry point to the Host main process, bypassing the agent sandbox restriction.
What It Is¶
lujyang007/dsh-bili-sessions is a DSH plugin that lets you list, delete, and wipe billion-context session records directly from the DSH UI. It calls bili sessions rm under the hood to properly release reference counts and run vacuum, avoiding session data loss that can occur from manually maintaining multi-table counters.
Core Features¶
- List all sessions: shows title, first sentence, size, timestamp, chunk count, and model
- Select and delete individual sessions: check a session, click Delete, with a second confirmation
- One-click wipe all sessions: also requires a two-step confirmation
- Protects the currently active session by default: prevents accidental deletion of the live context
- Automatically masks API keys in titles and first sentences: reduces sensitive information leakage
Installation¶
The recommended way is to search for dsh-bili-sessions in DSH’s “Plugins → Plugin Marketplace.”
Install from source:
git clone https://github.com/lujyang007/dsh-bili-sessions.git
dsh plugin --profile desktop add ./dsh-bili-sessions
Replace --profile with the profile name you actually use (typically desktop for the desktop client). Alternatively, you can use plugin_manager’s install_bundle inside DSH, specifying the local path to this repository as the target.
Typical Usage¶
After installation, find “Context Cache Cleanup” in the DSH sidebar. Check the sessions you want to remove, then click “Delete Selected” (click again to confirm), or simply click “Clear All” (also a two-step confirmation).
Use Cases & Notes¶
Ideal for developers who frequently need to clean up billion-context sessions and want to avoid manual database maintenance or sandbox limitations that block CLI execution. The plugin requires billion-context to be installed locally and DSH >= 0.2.0.
Make sure to verify the permissions of your current DSH process, and review the source code and license before installing. This plugin is released under the MIT License.
Conclusion¶
With dsh-bili-sessions, you can safely manage billion-context sessions right within the DSH interface, avoiding issues caused by manual database manipulation or sandbox restrictions. See the directory page and source repository at the links below.