Skip to content

Anionex/dsh-turn-rewind

582Last commit Aug 14, 2026

dsh-turn-rewind DSH plugin

Turn Rewind provides a durable restore lifecycle for DSH sessions, anchoring recovery points to each user message. It offers two modes: restore files only or restore files and restart the conversation from before the selected message. The plugin includes a safety contract with preview, explicit confirmation, automatic rescue points, and post-restore verification.

How to install the dsh-turn-rewind DSH plugin

dsh plugin --profile web add @anionex/dsh-turn-rewind

Copying does not run this command. Review the repository and version before installing the dsh-turn-rewind DSH plugin.

dsh-turn-rewind DSH plugin data source

dsh-turn-rewind DSH plugin snapshot date: Aug 16, 2026

discovered

What the dsh-turn-rewind DSH plugin can do

  • Create restore points anchored to user messages in DSH sessions.
  • Preview file-level changes (added, modified, deleted) before applying restoration.
  • Restore files only, or restore files and restart the conversation from before the selected message.
  • Automatic rescue point creation before each restore, enabling rollback on failure.
  • Post-restore hash verification to ensure integrity.
  • Supports tracked files, untracked files (not excluded by .gitignore), symlinks, and executable permission bits.
  • Public service API (`ctx.changeLedger`) for other plugins to consume the snapshot/restore lifecycle.

Where the dsh-turn-rewind DSH plugin fits

  • Recover from unintended file modifications caused by an agent during a conversation.
  • Undo changes made in a specific turn and continue the conversation from that point.
  • Revert to a clean project state before a failed experiment without losing conversation history.
  • Branch conversation (native Branch) without affecting files, or restore files with/without conversation restart.
  • Enable other plugins to integrate durable snapshot and restore capabilities via the service API.

Who the dsh-turn-rewind DSH plugin is for

  • DSH users who want safe file recovery and backtracking during agent interactions.
  • Developers working with DSH Agent who need to revert workspace changes reliably.
  • Plugin developers who want to leverage the Change Ledger engine for their own snapshot/restore features.

dsh-turn-rewind DSH plugin limitations

  • Version 0.1: only supports normal Git worktrees; sparse checkouts, submodules, ignored files, special files, sockets, devices, named pipes, extended attributes, ACLs, ownership, timestamps, and hard-link topology are rejected.
  • Non-Git directories are not supported; the plugin requires a Git repository.
  • All size and user-point retention limits fail loudly: maxRestorePoints (50), maxFileBytes (16MB), maxSnapshotBytes (512MB), etc.
  • The restore action is blocked if any running Agent is using the same worktree (including the source session).
  • Does not modify Git internals (index, branch, HEAD, stash, commits); restored content appears as uncommitted changes.

dsh-turn-rewind DSH plugin: from the repository README

Quoted from the Anionex/dsh-turn-rewind README, the upstream source of the dsh-turn-rewind DSH plugin. Copyright remains with the original authors.

Message-anchored project-file recovery for [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness), with an option to restart from the restored request. **Turn Rewind** is the user-facing feature, repository, and Profile Bundle name. **Change Ledger** is the durable restore engine underneath it: the `ctx.changeLedger` service, on-disk format, and storage path keep that name because they describe the reusable snapshot and recovery layer rather than the Web action alone. Change Ledger gives a DSH session an explicit safety boundary around workspace mutations: ```text create restore point ↓ agent / user / external tools modify the worktree ↓ preview exact path-level drift ↓ review a full or selective restore plan ↓ press the final restore button in the rewind dialog ↓ create rescue point → restore → verify ``` It never commits, stashes, resets, switches branches, edits the Git index, or decides automatically that a change should be reverted. ## Preview Rewind appears as an icon-only third action under each user message, after its timestamp and native Copy action: ![Turn Rewind action under a user message](docs/assets/turn-rewi

Read the full READMERepository license: BSD-3-Clause

dsh-turn-rewind DSH plugin questions

How do I restore files after an agent messes up my project?

Open the Rewind action under the user message you want to roll back to. The dialog shows a preview of affected files. Choose "Restore files only" to revert the workspace without changing the conversation, or "Restore files and restart" to also create a new session starting from before that message. The plugin automatically creates a backup before applying changes, so you can always roll back.

Can I use Turn Rewind without a Git repository?

No. Turn Rewind requires a normal Git worktree. It does not support non-Git directories, sparse checkouts, submodules, or ignored files. If your project is not a Git repository, the plugin will not be able to create restore points.

Is my data safe when using Turn Rewind?

Yes, the plugin has a strict safety contract. Every restore is explicitly confirmed by the user (no automatic restores). It creates a rescue point before any mutation, and verifies hashes afterwards. If a restore fails, it automatically rolls back using the rescue point. The plugin also never modifies Git internals (index, branch, commits), so your Git history remains untouched.

How do I configure the plugin's storage limits?

You can override the default configuration in your DSH profile patch layer. Key settings include storageDir, maxRestorePoints (default 50), maxFileBytes (16MB), maxSnapshotBytes (512MB), and planTtlMs (900000). All size limits fail loudly, so you should set values appropriate for your project.

What file types are supported for restore points?

Turn Rewind supports tracked files (including currently missing tracked paths), untracked files not excluded by .gitignore, regular files (binary or text), symbolic links, and executable permission bits. It does not support ignored files, submodules, sparse checkouts, special files (sockets, devices, named pipes), extended attributes, ACLs, ownership, timestamps, or hard links.