Introduction

DeepSeek Harness (referred to as dsh) is DeepSeek’s open-source intelligent agent runtime. Its core concept is “everything is a plugin”: models, tools, sessions, sandboxes, and even the web interface itself can be added or removed via plugins. It is currently in the developer preview stage, and the interfaces will continue to evolve. Community members have compiled a plugin directory, the SkillHub Plugin Library, to facilitate searching and installing commands by category. This directory is an independent site and has no official affiliation with DeepSeek or High-Flyer; the listed items need to be verified against the source code by users themselves.

After using dsh for a while, it’s inevitable to encounter accidents like: installing a plugin that corrupted cordis.patch.yml, having AI modify plugin source code causing startup failure, accidentally changing .env leading to authentication failure, or even DSH crashing and becoming inaccessible. Git can save some parts, but configurations are scattered across the profile directory and home directory, and the plugin code tree might not be under version control. If you want to be able to “undo mistakes and recover when things won’t start,” you might consider the community plugin dsh-undo-savepoint.

What is This

dsh-undo-savepoint is a undo/rollback/snapshot system designed for dsh, maintained by lire1131. The repository address is lire1131/dsh-undo-savepoint. It is categorized under admin-security (management and security) in the SkillHub Plugin Library. The license is MIT, and the runtime requirement is Node.js ≥ 20; the version number in package.json is 0.4.1. As of 2026-08-25, both GitHub and the SkillHub API show approximately 125 stars and 4 forks.

Its functionality can be summarized into three layers:

  1. In-session snapshots and undo: Automatically or manually snapshots critical startup configurations (cordis.patch.yml, package.json, settings.yaml, .env, etc.) and user plugin code trees for dsh. Supports undo, redo, and rollback to any historical version.
  2. Key security: Sensitive fields like .env and credential files are automatically redacted when snapshotting; exported ZIPs do not reveal plaintext. Actual values are stored in a local vault, allowing complete restoration during local rollback.
  3. Out-of-session emergency recovery: When DSH fails to start completely, you can still operate the timeline, rollback, safe mode, and diagnostics via an offline WebUI, GUI window, or CLI—without relying on the dsh process running.

It does not add tools to models or alter the agent’s reasoning logic; its core purpose is protecting your dsh environment and plugin ecosystem from being crippled by a single misoperation.

Core Features and Highlights

The repository README and SkillHub directory description are consistent, with the main capabilities as follows.

1. One-click rollback for configuration + plugin code. Snapshots cover cordis.patch.yml, package.json, pnpm-lock.yaml under the profile directory, as well as settings.yaml, .env, .credentials.yaml under $DSH_HOME, and include the user plugin code tree. Any corrupted part can be undone; supports undo/redo/rollback to a specified version, with entry points including WebUI panel, conversational commands, and offline CLI.

2. Message-level undo. Records workspace file changes by AI message (or 60-second batches). You can open the “Conversation Undo” panel at the top of the conversation to rollback “what this message changed.” It does not depend on git nor touch session storage; you can configure “tracked workspace directories” in settings.

3. Key redaction + local vault. Sensitive fields like .env in snapshots retain their structure with values redacted; exported ZIPs have zero leakage. During local rollback, real values are restored from the vault.

4. One-click safe mode (SAFE MODE). When DSH fails to start, it can disable all user plugins except this one, ensuring startup; it also automatically snapshots and backs up dual-level patches (profile / home). After exiting safe mode, you can troubleshoot problematic plugins one by one.

5. Crash attribution and session repair. On abnormal exit, a banner prompts with the “last good snapshot” and provides a one-click rollback; crash reasons are classified by log signatures (e.g., session-corrupt, bundle-check, patch-tree). undo_scan can scan and fix some session.jsonl.zstd layout issues; when DSH fails to start, you can use the offline dsh-undo.ps1 scan --fix (requires Node ≥ 22.15).

6. Snapshot timeline (Time Machine). Snapshots are grouped by date, supporting notes/tags, file-level diff (highlighting added/deleted lines), and one-click rollback after browsing files. It also includes scheduled snapshots, orphan blob cleanup (undo_compact), and ZIP export/import (with optional AES-256-GCM encryption).

7. Out-of-session emergency toolchain. Works even when DSH is down: pure local undo-server WebUI (127.0.0.1), GUI window, PowerShell/shell CLI, and desktop shortcuts automatically created after plugin loading. Available on Windows, macOS, and Linux.

8. Multi-profile and custom home directory. Recognizes the current profile from startup parameters, with snapshots isolated per profile; DSH_HOME resolution is consistent with the official launcher, so third-party clients no longer encounter “split home directories.”

Installation and Enabling

Prerequisites: dsh (@deepseek-ai/dsh) and Node.js (≥ 20) are installed.

The recommended installation command from the GitHub README is as follows, executed in the terminal:

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

The dsh CLI will resolve the plugin from GitHub and install it into the current profile. Plugins installed from GitHub may execute code during installation and will run with the permissions of the current dsh process. Before installation, review the repository source code and MIT license; only install sources you trust. To ensure reproducible installation, you can pin the commit hash. When verifying via the SkillHub API, the latest commit on the master branch is 7d21c941a06ef46508e96aa0bd33e5af65488d8b, which can be specified as:

dsh plugin --profile web add github:lire1131/dsh-undo-savepoint#7d21c941a06ef46508e96aa0bd33e5af65488d8b

The hash will change with repository updates; it’s safer to confirm again on GitHub before installation.

After installation, restart DSH for it to take effect; undo/redo/snapshot buttons will appear in the conversation header, and a new “Snapshots” section will be added to settings.

If you prefer not to use dsh plugin add, the README also provides a manual mounting method via local clone + junction (Windows example): clone the repository to the local plugin directory, create a junction to DSH’s node_modules, and then append the following to <DSH_HOME>\profiles\web\cordis.patch.yml:

- insert:
    - id: dsh-undo-savepoint
      name: dsh-undo-savepoint

After saving, the host section can be hot-reloaded; for complete stability, it’s recommended to restart DSH.

Typical Usage Examples

Daily Operations Within DSH

  • Undo: Header “Undo” button / Ctrl+Alt+Z / tell the AI “undo the last step.”
  • Redo: “Redo” button / Ctrl+Alt+Y (only if no new operations after undo).
  • Manual save: Panel “Manual save” / tell the AI “save a snapshot.”
  • Rollback to a specified version: Click “Rollback to this version” in the panel; or tell the AI “rollback to \<id>“; or CLI restore -Id <id>.
  • Message-level undo: At the top of the conversation, use “Conversation Undo” to select a message batch and rollback its file changes.

Snapshot parameters (auto-save toggle, debounce, retention count, sensitive mode, tracked workspace directories, etc.) can be adjusted in Settings → General → Snapshot Settings.

Out-of-session WebUI (Works Even When DSH Is Down)

Navigate to the plugin installation directory under tools/, and execute:

node tools/undo-server.mjs

Or double-click launch-undo.bat (Windows), .command (macOS), or .sh (Linux). This will start a pure local server with a built-in webpage, providing timeline, rollback, comparison, safe mode, and diagnostics. After plugin loading, a “dsh-undo-savepoint” desktop shortcut is also created.

Offline CLI Examples (Windows PowerShell)

powershell -NoProfile -ExecutionPolicy Bypass -File "tools\dsh-undo-savepoint.ps1" list
powershell -NoProfile -ExecutionPolicy Bypass -File "tools\dsh-undo-savepoint.ps1" snapshot -Label "Before modifying plugin"
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" safe-mode -Label on

When restoring involves changes to package.json / pnpm-lock.yaml, if you need to actually rebuild node_modules, you can add the -SyncDeps parameter.

Crash Emergency Quick Reference

Scenario Suggested Action
Configuration / plugin corrupted WebUI / conversation / CLI: undo or restore -Id <id>
DSH fails to start completely Out-of-session tools → Safe Mode → restart DSH
Uncertain which version to rollback to after abnormal exit Banner shows last-good snapshot, one-click rollback
Corrupted session file undo_scan or offline dsh-undo.ps1 scan --fix
Missing plugins after cross-machine recovery Recovery report will pre-check and prompt; install plugins first or enter safe mode

Common incident: DSH startup error like duplicate loader entry id → Open “DSH Undo Manager,” select the snapshot before the issue occurred → rollback → restart DSH. Usually, no reinstallation is needed, and no sessions are lost.

Applicable Scenarios and Precautions

This is particularly suitable for:

  • Dsh power users who frequently test and install community plugins, or modify cordis.patch.yml;
  • Developers who let AI directly modify plugin source code and worry about a single yield accident breaking the environment;
  • Teams that need to migrate dsh configurations across multiple machines while ensuring no key leakage during export;
  • Anyone who has already experienced DSH crashes or session corruption and wants “a last line of defense.”

A few notes when using it:

First, the plugin runs with the permissions of the current dsh process and can read/write configurations and snapshot directories under $DSH_HOME. Before installation, review the source repository and MIT license; the community directory is not an official app store, and listing does not imply official endorsement.

Second, snapshots contain copies of configurations like .env, and the local vault stores actual keys—do not casually share snapshot ZIPs. Exported versions are redacted, but local storage should still be securely managed.

Third, the undo semantics differ from “restore latest saved state”: auto snapshots are generated after changes, and actual undo rolls back to the latest snapshot with different content from the current state; if all are the same, it will prompt “no changes to undo.” After restoring cordis.patch.yml, the plugin will automatically check and re-insert its own mount entry to avoid undoing itself.

Fourth, when restoring involves dependency changes, by default it only reports that node_modules might be out of sync; to actually rebuild, explicitly add -SyncDeps (CLI) or the corresponding REST/conversation parameters.

Fifth, the complete repair capability of out-of-session undo_scan is more comprehensive on Node ≥ 22.15; on Node 20, some functions will be downgraded to prompts. Starting from v0.4.0, the core logic is extracted into a pure Node zero-dependency module, with a three-platform CI matrix covering windows / ubuntu / macos × node[20,22].

Conclusion

dsh-undo-savepoint provides dsh with a “time machine”: snapshots for rolling back when installing plugins, modifying configurations, or altering plugin code; key redaction, safe mode, and out-of-session WebUI/CLI cover extreme cases where “DSH fails to start.” For developers who frequently tinker with the plugin ecosystem, this is a self-rescue tool worth installing first in the admin-security category.

Installation command as per GitHub README:

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

Directory detail page: https://www.skillhub.cn/plugins/lire1131/dsh-undo-savepoint

GitHub repository: https://github.com/lire1131/dsh-undo-savepoint