
LingLambda/dsh-undo
42Last commit Aug 15, 2026
dsh-undo DSH plugin
dsh-undo provides undo/redo commands that rewind model context by real user turn and restore workspace files changed by tools in that turn. Commands are handled locally and never sent to the model. It uses durable session events for reliable undo/redo across restarts.
How to install the dsh-undo DSH plugin
dsh plugin --profile demo add dsh-undoCopying does not run this command. Review the repository and version before installing the dsh-undo DSH plugin.
dsh-undo DSH plugin data source
dsh-undo DSH plugin snapshot date: Aug 16, 2026
discovered
What the dsh-undo DSH plugin can do
- /undo rewinds the latest visible real user message and all subsequent surface messages.
- /undo <user-seq> rewinds from a specific visible user message, including all later turns.
- /redo restores the latest active rewind; repeated undo/redo use LIFO order.
- WebUI client adds an undo action to finalized user message bubbles.
- Records workspace files using a hidden Git directory before and after tool execution, restoring only files touched by tools in selected turns.
- Background jobs from undone turns are requested to terminate.
Where the dsh-undo DSH plugin fits
- Undo an accidental user message and the model's responses.
- Restore workspace files that were modified by a tool in a previous turn.
- Redo after an undo to get back to a previous state.
- Use the WebUI action to quickly undo a specific user turn.
- Recover from a tool that made unwanted changes to files.
Who the dsh-undo DSH plugin is for
- DeepSeek Harness users who want to undo model interactions and tool changes.
- Developers integrating multi-level undo/redo into their Harness-based applications.
dsh-undo DSH plugin limitations
- File restoration is limited to the detected Git workspace; files outside that root are never restored.
- Network requests, database writes, remote API calls, and already-exited processes cannot be undone.
- Background jobs started through nested tool dispatches or child agents may not be associated with the root user turn.
- New ordinary surface output invalidates active redo history.
- Requires a Harness version with support for durable surface/rewind and surface/restore events and the conversation.chat.user-actions slot.
dsh-undo DSH plugin: from the repository README
Quoted from the LingLambda/dsh-undo README, the upstream source of the dsh-undo DSH plugin. Copyright remains with the original authors.
English | [中文](README.zh.md) > [!WARNING] > **Forward-looking preview: this release is not usable with any currently published DeepSeek Harness version.** It depends on unreleased Harness support for durable `surface/rewind` / `surface/restore` events and the `conversation.chat.user-actions` WebUI slot. Installing it today will make `/undo` fail closed with an upgrade message. Publish this package only to preview and coordinate the future integration; do not present it as production-ready until the matching Harness release exists. look for <https://github.com/deepseek-ai/deepseek-harness/discussions/467/> Durable, multi-level undo/redo for [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) (`dsh`). It rewinds model context by real user turn and restores workspace files changed by tools in that turn. The commands are handled locally and are never sent to the model: - **`/undo`** rewinds the latest visible real user message and every surface message after it. - **`/undo <user-seq>`** rewinds from a specific visible user message, including all later turns. - **`/redo`** restores the latest active rewind. Repeated undo and redo operations use LIFO order. The WebUI
Read the full READMERepository license: MIT
dsh-undo DSH plugin questions
How do I install dsh-undo?
You can install it from npm by running `dsh plugin --profile demo add dsh-undo`. Alternatively, install from git with `dsh plugin --profile demo add github:LingLambda/dsh-undo#<sha>`. Make sure your Harness version supports the required events and slots.
How do I use the undo command?
Use `/undo` to undo the latest user turn. Use `/undo <user-seq>` to undo from a specific user message. Use `/redo` to restore the most recent rewind. The commands are typed in the chat and are handled locally.
Does dsh-undo restore files modified by tools?
Yes, it records the workspace tree before and after each top-level tool execution using a hidden Git directory. Undo restores only files touched by tools in the selected user turns. Redo restores the pre-undo tree. File restoration is limited to the detected Git workspace.
What happens if I undo a background job?
Background jobs returned by top-level tools are associated with their user turn. Undo requests termination for jobs started in the removed turns. Redo restores context and files but cannot restart terminated processes.
What are the Harness version requirements?
This plugin requires a Harness version that supports durable `surface/rewind` and `surface/restore` session events, and the `conversation.chat.user-actions` client slot. Older Harness releases will fail closed with an upgrade message.