DeepSeek Harness (DSH) uses a plugin-based architecture, and context management is a core part of agent development. During debugging or development, accidentally sent messages, incorrect model responses, or tool calls can pollute the context and cause subsequent reasoning to drift from the expected behavior. Although DSH provides a session reset feature, when fine-grained control is required, removing specific content at the message level is more efficient. The following section introduces viplocco/dsh-delete-message, a message-level deletion plugin designed to address this pain point.

Core Features

The plugin primarily provides the following capabilities:

  • Full message type support: covers user input, assistant replies (including thought cards and tool calls), machine-injected context lines, retry prompts, and error banners.
  • Separate handling of context and transcript: deletion operations remove content from the model context through the host’s surface-replace contract, and hide it from the visible transcript on the browser side by maintaining a ledger of deleted sequence numbers.
  • Fine-grained deletion scope: supports “step-level deletion” (removing only the reply and tool calls for a given step) and “whole-window deletion” (cleaning up injected lines, error banners, and replies within a failed turn).
  • Native experience and feedback: reuses host icons and confirmation dialogs, and supports bilingual Chinese/English interfaces. A pre-check is performed before deletion, with non-deletable items greyed out along with reasons; transition feedback animations are also provided during the deletion process.

Installation and Enablement

The installation command is as follows:

dsh plugin --profile web add github:viplocco/dsh-delete-message#v0.2.3

After installation, the DSH Web process or DSH Desktop must be completely restarted for the plugin to take effect.

Typical Usage

The plugin provides a delete button in the action area of each message.

  1. Clicking the trash icon in different locations performs different levels of deletion.
  2. In multi-step turns, clicking the trash icon on a Think card or tool call card deletes only that step.
  3. Clicking the trash icon on an injected context line or error banner cleans up the entire reply attempt (including the failed turn and injected lines).
  4. The interface supports bilingual Chinese/English, and confirmation text automatically adjusts based on the message role.

Notes

  1. Host coupling: the plugin relies on host-specific coupling (React fiber introspection, CSS-modules hashed class names, DOM hooks), so host upgrades may cause functionality to silently fail.
  2. Restart required: after updating the plugin or upgrading the host core, a full process restart is required.
  3. Server-side validation: the server re-validates before deletion, accepts only closed turns, and returns machine-readable reason codes.

Summary

dsh-delete-message is a lightweight tool designed to help developers quickly clean up context in the DSH environment and reduce debugging costs. For developers who frequently iterate on prompts or debug complex multi-step interactions, it is a practical auxiliary tool.

For full documentation and source code, refer to: GitHub