Preface

DeepSeek Harness (dsh) treats models, tools, skills, sessions, and interfaces all as plugins. Modifying the environment often boils down to changing configurations: installing a plugin, switching a skin, or editing a few lines in cordis.patch.yml. The official repository summarizes this as Everything is a Plugin. The benefit is composability, but the cost is straightforward—an incompatible mount or a broken user plugin code could break the web interface, or even trigger startup errors like duplicate loader entry id.

These accidents are different from rolling back a conversation. Conversation rollbacks focus on models and repository files; what is missing here is another layer: the archive of configurations and the plugin tree itself. The community maintainer lire1131’s dsh-undo-plugin (installed package name is dsh-undo-savepoint) solves this problem: it automatically takes snapshots when installing plugins, changing skins, or modifying settings, and also supports manual checkpoints, as well as undo/redo/rollback to specified snapshots. When DSH itself fails to start, the repository also provides a set of PowerShell windows and command lines that do not depend on the Harness process.

Below is a collation cross-referenced from the community directory page, GitHub repository README, package.json, and changelog: what it covers, how to install it, daily usage, and what it should not be treated as.

What It Is

dsh-undo-plugin is a development and runtime plugin for DeepSeek Harness, maintained by lire1131, licensed under MIT, primarily written in JavaScript. The GitHub repository is lire131/dsh-undo-plugin. As of the query on 2026-08-18, the repository has 68 stars. The package name in package.json is dsh-undo-savepoint, with the current version 0.3.5 (2026-08-17). It requires Node.js ≥ 20, and declares dsh.runtime: "host" and platform: web for the web client.

The problem it solves can be summed up in one sentence: Take snapshots of DSH’s configuration files and user plugin code, so you can roll back to before the changes if you break something. According to the README, the snapshot objects are these 6 types of files: cordis.patch.yml, package.json, cordis.yml, pnpm-workspace.yaml (under the profile), as well as settings.yaml and .env under $DSH_HOME (default home directory ~/.dsh). Changelog 0.3.2 also added .credentials.yaml to the scope. Starting from version 0.2.0, snapshots also cover the user plugin code tree (junctions under node_modules and local files referenced by name: './xxx' in cordis.patch.yml), so you can undo even if only the plugin source code is broken without changing the configuration.

Two points of attribution need to be clarified first:
- DeepSeek Harness itself is an open-source agent framework by DeepSeek; the plugin introduced here is a community plugin. The DeepSeek Harness Plugin Directory that hosts it is an independent site, and its About page clearly states that it has no official affiliation with DeepSeek / Horizon Robotics, and does not host plugin code.
- It is not conversation rollback. There are other community plugins such as dsh-turn-rewind (rollback of conversations and workspace files) and LingLambda/dsh-undo (model context undo, whose README notes dependency on unreleased Harness capabilities). dsh-undo-plugin manages Harness configurations and plugin code, not the session text itself.

Core Features

Separate Manual and Auto-Save Libraries

Snapshots are automatically generated after configuration changes (the README notes approximately 1.5 seconds of debouncing), and there is also a baseline snapshot taken at startup. Manual saves go into the manual library and will not be automatically cleaned up; auto-snapshots, startup baselines, and “undo regret saves” go into the auto library, which retains up to 20 recent snapshots by default. The legacy flat directory structure will be migrated to the new structure at startup, while reading remains compatible.

Default paths (all can be modified in settings):

Library Default Location Content
Manual Library <snapshot-root>/manual/ Manually saved snapshots, not automatically cleaned up
Auto Library <snapshot-root>/auto/ Auto snapshots, startup baselines, undo regret saves
Legacy Library <snapshot-root>/ root directory Compatible for reading, migrated at startup

The default snapshot root is $DSH_HOME/undo-snapshots. Starting from version 0.3.3, snapshots are isolated by current profile, in the format <snapshot-root>/<profile>/{auto,manual}. dsh web falls back to the web profile; offline tools cannot see startup parameters, so you need to use the environment variable DSH_UNDO_PROFILE or the profileName setting in the configuration.

Undo, Redo, and Roll Back to Any Version

There are three entry points: WebUI, chat, and offline CLI. The WebUI session header has undo/restore/snapshot buttons; starting from version 0.3.4, the three buttons have been changed to icons, and the snapshot button will immediately create a manual snapshot. The adjacent status badge shows the number of saved snapshots and the latest time, and clicking the badge opens the snapshot panel. In the panel, you can view differences, roll back, delete, clean up, export/import ZIP files, and enter safe mode.

The default shortcuts are Ctrl+Alt+Z (undo) and Ctrl+Alt+Y (redo, only available if no new operations were performed after undoing). You can also tell the assistant “undo the last step”, “save snapshot”, or “roll back to “.

According to the README, the undo semantics are not “return to the latest auto snapshot”: auto snapshots are generated after the change, so restoring the latest snapshot is often a no-op. A real undo will find the most recent snapshot that differs from the current content. If all snapshots are identical, it will prompt that there are no changes to undo. After restoring cordis.patch.yml, the plugin will check and rewrite its own mount entry to avoid uninstalling itself. Starting from version 0.3.4, if any session is in an open turn (the agent is running), undo/redo/restore and safe mode switching will be rejected to avoid interrupting the running session when rebuilding the plugin tree.

Key Redaction and Local Vault

Starting from version 0.3.2, sensitive mode redact is enabled by default: when taking snapshots of .env and .credentials.yaml, their values are replaced with ***REDACTED***, while key names, quotes, comments, and structure are retained. Exported ZIP files can be shared externally without exposing real keys, while the real values are stored in a local content-addressed vault. Rolling back on the same machine will restore the original values, while rolling back on another machine will get placeholders and prompt you to fill them in manually. You can also switch to keep to retain the plaintext legacy behavior. Both sides of the difference preview will be redacted. The README still reminds: there may be copies of configurations in snapshots, so do not share them externally.

Safe Mode and Crash Attribution

When DSH fails to start completely, safe mode will first create a manual snapshot and back up cordis.patch.yml, then trim the patch layer to only retain the undo system to ensure the process can start; it will restore the original configuration when exiting. Entries are available in the WebUI panel, the chat tool undo_safe_mode, the offline CLI safe-mode, and the external GUI.

Crash attribution uses boot-state.json to record each startup result and the “last normal startup time”. When the last exit was abnormal, the WebUI/GUI will provide the last good snapshot ID and one-click rollback, so you don’t have to guess which snapshot to revert to. For rollbacks involving plugin code or mounts, the prompt will remind you “changes will take effect after restarting DSH”.

Offline First Aid: Usable Even When DSH Is Down

The plugin comes with a PowerShell GUI and CLI in its installation directory, which does not depend on the current dsh process. The documentation examples are oriented towards Windows (PowerShell 5.1 and 7). After installation, the directory name is the package name dsh-undo-savepoint, not the repository name dsh-undo-plugin. For method A (dsh plugin add), the tools are usually located at:

$DSH_HOME/profiles/web/node_modules/dsh-undo-savepoint/tools/

When DSH_HOME is not set, the default is .dsh under the user directory. The repository provides tools/make-desktop-shortcut.bat to create a “DSH Undo Manager” shortcut on the desktop.

Cross-Machine Migration Pre-Check

Snapshots can be exported/imported as ZIP files. docs/migration.md states: configuration files will be written back to the target machine as-is; plugin code will not be pushed to a machine without this plugin (if the directory does not exist, the entire entry will be skipped). The real pitfall is that the restored cordis.patch.yml still references plugins that are not installed on the target machine, causing the loader to report MODULE_NOT_FOUND at startup. Starting from version 0.3.1, before restoring, the plugin will scan the plugins referenced by the target snapshot and prompt for entries that cannot be resolved locally, suggesting that you install the missing plugins first or use safe mode. The essence of cross-machine recovery is to turn B’s configuration into what A’s was at that time, so B needs to have the corresponding plugins first.

Installation and Activation

Prerequisite: DeepSeek Harness (@deepseek-ai/dsh) is already running on the local machine, and Node.js ≥ 20 is installed.

The installation command given on the community directory page (as per the original page text) is:

dsh plugin add github:lire1131/dsh-undo-plugin

The repository README recommends specifying the web profile and pinning to the master branch:

dsh plugin --profile web add github:lire1131/dsh-undo-plugin#master

The directory page also reminds: the plugin runs with the permissions of the current dsh process, and may execute code during installation. You should check the source code repository and license before installing. For reproducible installations, pin the reference to a commit. As of 2026-08-18, the commit corresponding to version 0.3.5 at the top of master is ab9abee78ba0b3f96acea3a3593251c0be9208f9:

dsh plugin add github:lire1131/dsh-undo-plugin#ab9abee78ba0b3f96acea3a3593251c0be9208f9

After installation, restart DSH. The snapshot directory, auto-save toggle, debounce delay, retention count, and other settings can be modified in the “Snapshots” section of the WebUI settings. Starting from version 0.3.5, home directory resolution is consistent with the official launcher: DSH_HOME takes precedence, otherwise falls back to ~/.dsh. Third-party clients with custom home directories will no longer write settings to one directory and read runtime configurations from another.

The repository also provides a local mount method via clone + junction (edit cordis.patch.yml to insert id: dsh-undo-savepoint). Daily use only requires standard directory commands; local mounting is suitable for environments where you are modifying the source code or did not use dsh plugin add, following the steps in “Method B” of the README.

Typical Usage

The following operations are from the repository README and can be used as-is.

1. WebUI: Undo After Breaking Settings

  1. After installation and restart, the session header should display undo, restore, snapshot buttons, and an auto-snapshot status badge.
  2. Make normal changes to plugins, skins, or settings, and wait for the auto-save to complete (the count or timestamp on the badge will update).
  3. To revert to the previous state, click the undo button, press Ctrl+Alt+Z, or tell the assistant “undo the last step”.
  4. If you just undid an action and there have been no new real changes, you can use the restore button or Ctrl+Alt+Y to redo it.
  5. To revert to an earlier version: click the badge to open the snapshot panel, select the desired entry, and choose “roll back to this version”.

Do not click undo while the agent is running. Starting from version 0.3.4, the guard will directly reject the operation and show a prompt.

2. Create a Manual Checkpoint Before High-Risk Changes

Before making major changes to cordis.patch.yml or installing plugins in bulk, first create a manual snapshot:
- WebUI: Click the snapshot button in the header, or select “Save Manually” in the panel
- Chat: Tell the assistant “save snapshot”
- CLI: Run snapshot

Manual snapshots will not be automatically cleaned up, making them ideal as “known working” anchor points.

3. Use Offline Tools When DSH Fails to Start

The README gives a typical example of a startup error duplicate loader entry id. Do not reinstall the entire Harness at this point:
1. Open the desktop “DSH Undo Manager”, or run:

powershell -NoProfile -ExecutionPolicy Bypass -File "tools\dsh-undo-savepoint-gui.ps1"
  1. Select the snapshot taken before the problem occurred and roll back, then restart DSH.
  2. If you cannot determine which snapshot to revert to: use the crash banner (last-good snapshot) in the GUI for one-click rollback; if it still fails to start, enable safe mode, then decide whether to uninstall the plugin or roll back further after restarting.

Common CLI commands (run from the plugin’s tools directory):

powershell -NoProfile -ExecutionPolicy Bypass -File "tools\dsh-undo-savepoint.ps1" list
powershell -NoProfile -ExecutionPolicy Bypass -File "tools\dsh-undo-savepoint.ps1" undo
powershell -NoProfile -ExecutionPolicy Bypass -File "tools\dsh-undo-savepoint.ps1" restore -Id <id> -Force
powershell -NoProfile -ExecutionPolicy Bypass -File "tools\dsh-undo-savepoint.ps1" snapshot -Label "reason"

Safe mode:

powershell -NoProfile -ExecutionPolicy Bypass -File "tools\dsh-undo-savepoint.ps1" safe-mode -Label on

The repository also provides tools\dsh-plugin.ps1 add <package-name>: automatically takes snapshots before and after installing plugins, and rolls back if the installation fails. The interface language defaults to the system UI, and you can force it to zh or en using the DSH_UNDO_LANG=zh or en environment variable.

4. Check Rollback Logs When “Configuration Suddenly Changes”

Rollbacks may have occurred in another session or via offline tools. Use undo_recent in chat or recent in the CLI to view recent undo/redo/restore records (timestamp, mode, target snapshot, and rolled-back files). Do not assume that someone manually modified the files first.

Applicable Scenarios and Notes

It is most suitable for:
- Frequently testing community plugins, changing skins, or modifying profile patches in DSH, needing a way to return to a “just working” state
- Locally modifying user plugin source code (junctions / name: './xxx') and fearing code-only accidents
- Needing a GUI/CLI that works on Windows even when DSH is down
- Using third-party clients with non-default DSH_HOME (version 0.3.5 has aligned home directory handling with the official launcher)

Important notes before use:
1. Permissions and Source. The plugin runs with the permissions of the current dsh process, and may execute code during installation. This is a community MIT project, not an official DeepSeek component. Open the GitHub repository to view the README, license, and recent commits before installing.
2. It Does Not Manage Conversations or Workspace Files. If the agent broke project code or you need to roll back a specific conversation turn, use plugins like dsh-turn-rewind instead of this configuration snapshot tool.
3. Snapshots Contain Sensitive Configurations. Exporting is relatively safe after default redaction, but keep mode and old snapshots will carry plaintext data. Do not share snapshot directories or ZIP files in chat groups.
4. Offline Tools Are PowerShell-Based. The README paths, shortcuts, and .bat files are written for Windows. The Node.js host plugin follows DSH’s platform, but the “window when DSH is down” will not work natively on macOS/Linux by default.
5. Find the Directory by Package Name After Installation. The installation command uses dsh-undo-plugin, but the actual disk directory is dsh-undo-savepoint.
6. Install the Plugin First Before Restoring Cross-Machine. The pre-check only provides prompts and does not block operations. If the target machine lacks plugins and fails to start, use safe mode to enter the system before installing the missing plugins.
7. Do Not Roll Back While a Session Is Active. Version 0.3.4 has added a rejection guard; perform operations only when the system is idle.

Summary

dsh-undo-plugin adds an undo stack for the configuration layer to DeepSeek Harness: auto/manual snapshots, WebUI and chat entry points, key redaction, as well as safe mode and offline tools that work even when DSH is down. The repository name and