Preface¶
When running agent conversations in DeepSeek Harness (DSH), the Session accumulates user prompts, assistant replies, and tool call records turn by turn. These records become part of the model context for subsequent requests. If a particular turn goes in the wrong direction, contains an invalid tool chain, or you simply want to “undo” an intermediate turn within the same Session, the common practice is to create a new Session or manually clear the history—the former loses workspace association and subsequent turns, while the latter is not intuitive in the Harness native interface.
Below, we introduce the community plugin dsh-turn-delete: it allows you to delete a completed top-level turn without deleting or replacing the entire Session, while preserving the Session id, title, workspace association, and subsequent turns. The plugin was released by maintainer hanshenmesen and is categorized as a client plugin in the SkillHub community directory; as of writing, the GitHub repository has approximately 59 stars.
What is This¶
dsh-turn-delete is a DeepSeek Harness client plugin (npm package name dsh-turn-delete, current version 0.1.0, MIT license). It adds a delete operation next to the last assistant reply of each completed top-level turn. After confirmation, it removes the turn’s prompt, assistant messages, and tool records from the current model-visible surface of the Session, and records the deletion behavior via a persistent zero-content replacement event. The original append-only event log remains intact for auditing and replay.
DeepSeek Harness uses an “everything is a plugin” extension approach; SkillHub (https://www.skillhub.cn) is a community directory for Skills targeting Chinese users, with no official affiliation with DeepSeek / High-Flyer. The installation and behavior instructions in this article are based on the plugin’s GitHub README.
Core Features¶
Verified through the README, the plugin provides the following capabilities:
-
Delete by Turn, Not Session
When selecting a completed normal Session Turn, its prompt, assistant messages, and tool records are removed from the current model surface; the Session id, title, workspace association, subsequent turns, and original event log remain unchanged. -
UI Entry and Operational Constraints
The delete button appears only on completed normal Session Turns; Subagent transcripts do not expose this operation. Deletion requires double confirmation, and is disabled while the Session is running. -
Persistence and Idempotency
Deletion is recorded via a durable zero-content replacement event; it remains effective after page refresh or profile restart. Repeated requests for the same target are idempotent operations. -
Safe Rejection Boundaries
If the target Turn is still open, or has been merged into a compaction replacement with other history, the plugin rejects deletion to avoid removing only part of the model-visible context. -
Dual-Half Design
The Host half registers aPOST /dsh-turn-deleteendpoint, acquires a maintenance lease for the target Agent, validates the complete closed-turn surface span, appends the zero-content replacement, and waits forsessions.flush(). The Browser half contributes UI to theconversation.chat.assistant-actionsandconversation.chat.turnTailslots; the Conversation definition projects a tombstone onto the target turn.
Installation and Activation¶
It is recommended to install via npm to the web profile:
dsh plugin --profile web add dsh-turn-delete
You can also install from the GitHub source:
dsh plugin --profile web add github:hanshenmesen/dsh-turn-delete
Or install the pre-built release package:
dsh plugin --profile web add https://github.com/hanshenmesen/dsh-turn-delete/releases/latest/download/dsh-turn-delete.tgz
After installation, you need to restart dsh web for it to take effect. Uninstall command:
dsh plugin --profile web remove dsh-turn-delete
Environment requirements (from README compatibility notes):
- DeepSeek Harness
0.1.0-rc.6and0.1.0-rc.7 - Node.js 22.19 or newer version
- Web profile and web-based desktop shell
DeepSeek Harness is still in the developer preview phase; after upgrading Harness, it is recommended to verify the plugin still works by deleting an intermediate turn in a disposable Session with three short turns.
Typical Usage¶
- Install and restart
dsh webin the web profile. - Open a Session with multiple completed turns (README Demo scenario: delete an intermediate turn while preserving the same Session and subsequent turns).
- Locate the delete (trash can) operation next to the last assistant reply of the target turn, click it, and confirm in the confirmation dialog.
- Confirm the Session is still in the list and subsequent turns are readable; the deleted turn no longer enters subsequent model context. The Demo GIF provided in the README was recorded in a real model flow of DeepSeek Harness
0.1.0-rc.7.
If the Session is running, the target turn is not closed, or the turn has participated in compaction, the delete button will be unavailable or the request will be rejected—consistent with the plugin’s design to prevent partial deletion of model context.
Applicable Scenarios and Notes¶
Who is this for
- DSH users who need to correct an intermediate turn within the same Session without recreating the Session.
- Agent developers who want to preserve workspace associations and subsequent turns while cleaning up a single turn’s model-visible history.
Pre-use notes
- Like all DSH plugins, this package runs with Harness process permissions; before installing third-party plugins, you should review the source code and confirm the MIT license terms. Deletion changes future model context but deliberately retains the original append-only event for auditing.
- The plugin does not delete the Session itself, nor does it guarantee complete erasure of all historical traces from the UI; the Host focuses on the model surface and persistent tombstones, while the browser half has a narrowed display compatibility layer between adjacent turn tails in the Chat interface—model context deletion does not rely on this layer.
- Subagent transcript turns are not supported; only top-level normal Session turns are available.
Links¶
- SkillHub directory page: https://www.skillhub.cn/plugins/hanshenmesen/dsh-turn-delete
- GitHub repository: https://github.com/hanshenmesen/dsh-turn-delete
By following the steps above, you can precisely delete a single completed turn while preserving the Session and subsequent conversations, without needing to redo the entire Session.