Preface¶
DeepSeek Harness (dsh) is an open-source agent framework developed by DeepSeek AI, which emphasizes “everything is a plugin” in its architecture. Session logs are designed to be append-only and immutable: after an agent finishes a round, user messages, thinking blocks, tool calls, and final replies are all finalized. In practical use, the common need is not to erase a previous sentence from the history, but to correct a miswritten prompt and rerun, to regenerate an unsatisfactory final reply, or to rerun from a specific wrong turn while keeping the original session for reference.
The community plugin dsh-message-edit does exactly this. It does not rewrite existing events or modify the internal DSH engine. Every edit, regeneration, or retry will create a new session branch from before the target turn. The original session is always preserved and can be switched back to at any time.
This article is collated after cross-checking the plugin directory page, GitHub repository README, npm page, and DeepSeek Harness official repository. The community plugin directory (https://deepseek-harness-plugin.com) is an independent site and has no official affiliation with DeepSeek / HyperMind. Do not treat it as an official app store.
What is this¶
dsh-message-edit is a session and message plugin maintained by Moeblack, with its source code hosted at the GitHub repository Moeblack/dsh-message-edit. The npm package name is also dsh-message-edit, and the current version is 0.2.3 (released on 2026-08-16). Both package.json and npm declare the MIT license; there is no separate LICENSE file in the root directory of the repository as of this writing. The main language is TypeScript. As of the time of this article’s review, the GitHub repository shows 25 stars, while the directory page shows 18 stars; use the repository’s star count as the accurate figure. The directory page收录 date is 2026-08-15.
It adds event-sourcing-based “message editing and regeneration” capabilities to DeepSeek Harness:
- Allows editing of finalized user text, assistant reasoning blocks (assistant.reasoning), and reply text (assistant.response)
- Supports rerolling the last finalized assistant reply
- Supports retrying any historical turn in the Timeline
- Provides version switching in the session title bar and Timeline tab
The dsh.client.platform field in package.json is web. Client packages related to session UI will be injected on the browser side, so a web interface profile is required to see the Timeline and title bar controls.
Core Features¶
Edit, Regenerate, and Retry¶
The repository README lists three types of operations:
1. Edit Message: Targets finalized user text, assistant.reasoning thinking blocks, and assistant.response reply text.
2. Regenerate: Branches from before the turn of the last finalized assistant reply, and regenerates using the original user input.
3. Retry Any Turn: Select any historical turn in the Timeline to re-execute.
None of the three operations modify history in-place. The plugin treats a full turn as an atomic unit: the turn/start, model request, tool calls, tool results, and turn/end of the target turn will not be copied and reassembled separately. The new version branches off from the closed boundary before that turn.
The workflow for editing user messages, Reroll, and Retry is: roll back the entire target turn, then submit the target user input as a new turn to the Agent. For assistant block editing, the workflow is: roll back the entire target turn, construct a new fully closed turn using the original user input plus the edited assistant content; the original tool chain will not enter the new version.
Cascade Strategy¶
For cases where there are subsequent user inputs after the target point, the plugin provides two cascade strategies:
- truncate (default): Only re-execute the target input, and the old subsequent content after that point will not be brought into the new branch.
- preserve: Retain subsequent user inputs and re-execute them sequentially in the new branch; all assistant outputs and tool chains will be regenerated.
If preserve is selected when editing an assistant block, subsequent user inputs will be handed to the Agent one by one to generate a new complete tool chain.
Version Timeline¶
Each version will append an indivisible message-edit/version effect pair: effect records the forward operation, and inverse records the recovery target. Recovery does not delete events, but switches to an existing version along the inverse chain. Undo follows last-in-first-out: only the current atomic effect is undone at a time, and earlier effects are retained; subsequent branches are also always retained and can be reapplied from the parent version.
The parentSession in the session header forms a version tree, and must match the inverse.sessionId in the event. The Timeline performs value-level projection through ctx.sessionQuery.traceSession() and readSession(), then derives the undo stack and re-applicable child versions from the atomic inverse chain.
There are two UI entry points:
- Session title bar (conversation.session.header.actions, id message-edit-controls): ← undoes the current atomic effect, → reapplies the latest direct child effect, and displays the effect chain count and “reroll last reply”.
- Timeline tab (registered to conversation.view, id message-edit-timeline, order: 15): Located between Trajectory (10) and Prompt Studio (20), displaying the full known branch tree, operation time, pre-edit and post-edit content, and the current version.
The product copy is in Chinese. The components use CSS Modules and --dsw-* semantic tokens, and no additional UI libraries are introduced.
HTTP Interface¶
The Host side also exposes two HTTP interfaces for easy calling by scripts or other clients:
- GET /message-edit?sessionId=: Reads editable messages, retryable turns, and the full version tree.
- POST /message-edit: Executes edit, reroll, or retry, and returns the newly published Session ID.
The README does not provide a complete request body example; refer to the current repository implementation for the fields.
Installation and Activation¶
The installation command given on the directory page is as follows, run in the DeepSeek Harness terminal:
dsh plugin add github:Moeblack/dsh-message-edit
For reproducible installation, the directory page recommends fixing the commit hash (replace commit with the actual commit hash):
dsh plugin add github:Moeblack/dsh-message-edit#commit
The repository README more clearly points to the web profile, since the client plugin platform is web:
dsh plugin --profile web add dsh-message-edit
This installs from the npm package name dsh-message-edit. For local development, you can use symlinks:
dsh plugin --profile web add -w link:/path/to/dsh-message-edit
The README notes that dsh plugin is a pnpm forwarding tool: after add, it will recognize the dsh.bundle declaration and include the plugin into the profile’s dsh.profile.bundles, and take effect after restarting dsh. After modifying the source code locally and rebuilding, you also need to restart to update the changes.
Build from source:
npm install
npm run build
The build artifacts are index.mjs (Host plugin), client.js (Browser plugin), and corresponding source maps. The build depends on the @deepseek-ai/*@0.1.0-rc.6 type packages on npm, and no longer depends on the dsh source tree.
The directory page reminds: the plugin runs with the permissions of the current dsh process, and may execute code during installation. Please check the source code repository and license before installing.
Typical Usage¶
After installing and restarting dsh with the Web UI, open an existing session:
1. A message editing control will appear in the session title bar. If you are dissatisfied with the last round of assistant replies, you can directly trigger reroll; use ← / → to roll back to the previous version or switch to the latest child version.
2. A new Timeline tab will appear in the conversation area, sandwiched between Trajectory and Prompt Studio. Here you can view the branch tree, each operation time and pre-edit and post-edit content, and you can also select any historical turn to Retry.
3. When editing a finalized user message or assistant block, the plugin will create a new Session before that turn. The original session will not be overwritten, and you can compare the two branches.
4. If there are multiple rounds of user inputs afterwards, select truncate or preserve as needed: use the default truncate if you only want to change the current sentence and discard the following content; use preserve if you want to keep the following rounds of questions but regenerate all assistant outputs and tool chains.
If you need to trigger from a script, you can use the above GET / POST /message-edit interfaces.
Applicable Scenarios and Notes¶
It is suitable for:
- Mainly using DeepSeek Harness in the Web UI, needing to edit prompts, reroll replies, or rerun from intermediate turns
- Wanting to retain the original session for reference instead of overwriting history
- Needing to view the branch tree and the differences before and after each edit
Things to note:
1. Does not modify workspace files. The README clearly states: it does not link to restore or modify workspace files, command external effects, or existing artifacts. If the agent has modified code in the repository, switching session versions will not roll back the files simultaneously. In the same category directory, dsh-turn-rewind is the plugin for the “conversation + workspace state rollback” direction; do not mix the expectations of the two plugins.
2. Does not modify the engine. The plugin does not modify the DSH engine, apiproxy, or official UI packages; the Host only uses the public sessions, agents, sessionPersistence, sessionQuery, workspaceRegistry, and webServer services.
3. History is append-only. Session events are append-only and deep-frozen, and will not be modified in-place.
4. Requires web profile. Without a web interface, the Timeline and title bar controls will not appear.
5. Permissions and license. The plugin runs with the permissions of the current dsh process. package.json / npm declare the MIT license, but there is no separate LICENSE file in the repository as of this writing; you should still check the source code yourself before installing.
6. DeepSeek Harness is still in developer preview, and the official README notes that there will be breaking compatibility changes. The plugin is built aligned with @deepseek-ai/*@0.1.0-rc.6, so you need to reconfirm compatibility after upgrading dsh.
Summary¶
dsh-message-edit turns “edit a prompt and run again” into a switchable session version tree: edits, regenerations, and retries all branch off before the target turn, the original session is retained, and the Timeline clearly displays the entire tree. It does not handle workspace file rollbacks, nor does it modify the engine, making it suitable as a session editing layer on the Web UI.
Directory page: https://deepseek-harness-plugin.com/zh-CN/plugins/dsh-message-edit/
GitHub: https://github.com/Moeblack/dsh-message-edit
npm: https://www.npmjs.com/package/dsh-message-edit