Introduction

In DeepSeek Harness (hereinafter referred to as DSH), a settled user message is often not isolated text, but rather a prerequisite for all subsequent turns. For DSH users who need to correct prompts, rerun tasks, or compare results from different branches, the core problem is not “send a new message,” but rather: can we return to a settled user message, modify it, and have the conversation rerun from that turn?

dsh-turn-fork is the DSH plugin provided to address this problem. It organizes editing, retrying, regenerating, and version tree navigation around “turns,” and emphasizes that branch logs remain readable after a dsh process restart.

What is this

ruby1304/dsh-turn-fork is a plugin for DeepSeek Harness sessions, licensed under MIT. Its core positioning is turn-atomic: editing and rerunning around a single settled user message, rather than simply appending a new message at the end of a session.

Basic information is as follows:

  • Plugin Name: dsh-turn-fork
  • License: MIT
  • Install Command: dsh plugin add dsh-turn-fork
  • Plugin Directory Page: https://www.skillhub.cn/plugins/ruby1304/dsh-turn-fork
  • GitHub: https://github.com/ruby1304/dsh-turn-fork

Key configurations in package.json related to this introduction are as follows, indicating it targets the DSH web client and injects several DSH client modules:

{
  "version": "0.1.0",
  "dsh": {
    "client": {
      "platform": "web",
      "inject": [
        "@deepseek-ai/dsh-client-connection",
        "@deepseek-ai/dsh-client-runtime",
        "@deepseek-ai/dsh-client-ui-conversation"
      ]
    }
  }
}

The plugin provides a Chinese/English bilingual interface via the dsh-client-locale service.

Core Features

The following introduces the capabilities provided by the plugin.

Editing Settled User Messages

The plugin supports editing settled (confirmed) user messages and rerunning the conversation from that turn.

The operation path is: open the Turn Fork tab, select a user message, modify the text, select a downstream strategy, and then save. After saving, a new branch session will be created from the completed prefix, and the turn will be rerun.

There are two downstream strategies:

  1. truncate: Discard all content after the edited turn.
  2. preserve: Replay each turn after and including the edited turn, and display the number of turns to be replayed before confirmation.

Retrying Historical Turns and Regenerating Latest Replies

The plugin provides three types of entry points for operations:

  • per-turn buttons in the tab, for retrying any historical turn;
  • per-message buttons on assistant replies, for regenerating the corresponding reply;
  • regenerate button in the session header, for regenerating the latest assistant reply.

Version Tree Timeline

The plugin provides a version tree Timeline for viewing and managing different branches.

The version tree tab will:

  • List each branch and operation summary;
  • Mark the current version;
  • Provide Undo / Redo navigation;
  • Provide an Open operation;
  • Display warnings for running branches and provide a Stop control.

Branch Log Persistence

The plugin’s branch logs remain readable after a dsh process restart. It is noted that it fixes the P0 persistence defect in dsh-message-edit.

Using Only Official Slots

The plugin only uses the following official slots:

  • Timeline tab;
  • session-header actions;
  • per-assistant-message actions.

It does not perform DOM injection, nor does it locate messages by guessing text.

Installation and Enabling

First, install the plugin:

dsh plugin add dsh-turn-fork

Then restart dsh.

After installation, the plugin registers the Turn Fork tab, session header actions, and actions on each assistant message.

Typical Usage

The following provides a reproducible usage path.

Editing a User Message

  1. Open the Turn Fork tab.
  2. Select the user message to be modified.
  3. Modify the message text.
  4. Select a downstream strategy: truncate or preserve.
  5. Save.

After saving, the plugin creates a new branch session from the completed prefix and reruns that turn.

Retrying or Regenerating

You can select the entry point based on the goal:

  • Use the per-turn button in the tab to retry a specific historical turn;
  • Use the per-message button on an assistant reply to regenerate that reply;
  • Use the regenerate button in the session header to regenerate the latest reply.

Viewing the Version Tree

View the version tree in the Turn Fork tab:

  • View each branch and its operation summary;
  • View the current version marking;
  • Use Undo / Redo to navigate between branches;
  • Use Open to open a specific branch;
  • If a branch is running, view the warning and use the Stop control.

Selecting the Cascade Strategy

Before saving the edit, you need to select a downstream strategy:

  • truncate: Discard all content after the edited turn;
  • preserve: Replay each turn after and including the edited turn, and display the number of turns to be replayed before confirmation.

Suitable Scenarios and Notes

Who is this for

Suitable for developers who need to correct historical user messages in DSH sessions, rerun a specific turn, or compare results from different branches. Especially suitable for scenarios where prompts or task inputs are repeatedly adjusted and the branch lineage needs to be preserved.

Permissions and License

The plugin runs with the permissions of the current dsh process. Source code, license, and exposed interfaces should be checked before installation.

The license is MIT; the client bundle preset is vendored from the DeepSeek Harness repository (MIT, © DeepSeek).

Assistant Message Editing Not Supported

This plugin explicitly does not support editing assistant messages. It is noted that editing assistant messages fakes source: {kind:'model'} and discards tool calls, so this capability is excluded.

Branch Deletion and Garbage Collection

The platform currently does not have a session-delete API, so branches cannot be garbage collected (GC) for now. The version tree is just a lineage display and does not imply that branches can be reclaimed by the platform.

Migration from dsh-message-edit

Old corrupted event format logs will be rejected by the persistence layer and cannot be fixed in place. Before upgrading, you must use the official export process or wait for the upstream fix.

HTTP Trust Fence

The /turn-fork route has trust fence requirements:

  • Browser Origin must be localhost, 127.0.0.1, or [::1], and the port must match exactly;
  • Port matching is only relaxed when the server explicitly exposes remotely at 0.0.0.0;
  • A loopback Host is required when there is no Origin;
  • POST requests must use application/json, and the body must not exceed 64 KiB.

Test Criteria

dsh-test --suite full reports flaky under the local runner because the absolute path/timestamp differs for every attempt. The quick suite is the authoritative lifecycle gate, and CI runs in Docker.

Conclusion

The value of dsh-turn-fork is to turn “modifying historical user messages and rerunning” into an actionable, revertible, and traceable branch process within a DSH session. It organizes functionality around turns, branches, and persistent logs, making it suitable as a client plugin for DSH session debugging and branch comparison scenarios.

Related addresses:

  • Plugin Directory Page: https://www.skillhub.cn/plugins/ruby1304/dsh-turn-fork
  • GitHub: https://github.com/ruby1304/dsh-turn-fork