Foreword¶
DeepSeek Harness (DSH) session persistence uses append mode, and the public service does not expose a deletion method. In the Agent runtime, the disposal handle belongs only to the creator, and plugins cannot safely remove logs while an active writer is present. dsh-delete solves this issue with a two-phase strategy: at runtime it only persists the deletion request and hides the conversation; after restart it completes the atomic move and archival of the log.
Feature Overview¶
dsh-delete is a Memory plugin maintained by Hyna-hla. It adds recoverable conversation deletion capabilities to DSH. Core features include:
- Conversation Menu Entry: Adds a “Delete conversation” option to the
…menu in the conversation list. - Command-Line Interface: Registers the
/delete-conversationhuman command. - Immediate Hide and Queue: Immediately adds the conversation to the deletion queue and hides it from the list after confirmation.
- Lifecycle Validation: Web Workspace validates the full lifecycle state of a session before building the session index.
- Recoverable Archive: On DSH restart, moves the log directory to a recoverable trash directory (default:
~/.dsh/conversation-trash).
Installation and Enablement¶
After installing the plugin, restart DSH for the changes to take effect. Use the official CLI command to add the plugin:
node /path/to/DSH/apps/cli/lib/bin.js plugin --profile web add /path/to/DSH-DELETE
After installation, Web Workspace waits for the conversationDeletion service to complete startup recovery before building the session index.
Usage¶
Interface Operation¶
Find the target conversation in the conversation list, click the … menu at the end of the row, and select Delete conversation. After the confirmation card appears, click Delete conversation.
Command-Line Operation¶
The command requires the literal CONFIRM, and the value must be case-sensitive.
- Delete the current conversation:
/delete-conversation CONFIRM - Delete a specified conversation:
/delete-conversation <session-id> CONFIRM
After confirmation, the target conversation immediately disappears from the list. The next time DSH starts, the log will be moved into the trash directory.
Configuration and Notes¶
Configuration Items¶
The plugin supports the following configuration options (configured in cordis.patch.yml):
| Field | Default Value | Description |
|---|---|---|
stateDir |
~/.dsh/conversation-trash |
Trash directory. Must be an absolute path and must be located outside the conversation directory |
commandName |
delete-conversation |
Optional human command alias (without a leading /) |
Security and Limitations¶
- Confirmation Mechanism: Deletion operations must include the literal
CONFIRM; otherwise, no write operation is performed. - Backend Limitations: Only the JSONL backend is supported; the SQLite backend is explicitly rejected.
- Atomic Operations: Log moves use same-filesystem renames and do not use
unlink, ensuring recoverability after a crash. - Node Version: Building and running require Node.js version
^22.19.0 || >=24.0.0. - Data Retention: Logs are moved to a recoverable trash directory. Final cleanup policy is determined by the deployment administrator.
Recover Data¶
If you need to recover an accidentally deleted conversation, stop DSH, enter the trash directory, delete the deletion.json file, and then move the corresponding directory back to its original location. Note: Recovery must be performed while DSH is stopped. Recovery during runtime may cause data corruption.
Ecosystem Information¶
- Repository: https://github.com/Hyna-hla/DSH-DELETE
- Directory Page: https://www.skillhub.cn/plugins/Hyna-hla/DSH-DELETE
- License: MIT