In DeepSeek Harness (DSH), modifications made by the Agent to the workspace are often difficult to revert directly. If the Agent goes down a wrong path or encounters errors, a mechanism is needed to “roll back” the state to a previous checkpoint and continue exploration from an older node. The dsh-plugin-time-machine plugin is designed for this purpose, capable of coordinating DSH session forking and safe workspace checkpointing.
Core Features¶
- Workspace Recovery: Supports previewing target files, conflicts, and external side effects. Upon confirmation, the system reverts to an older checkpoint. Normal newly added files are cleaned up during a full recovery, while ignored files are retained by default.
- Preserve Exploration Paths: Checkpoints form a persistent DAG (Directed Acyclic Graph). When forking from an older node, the original failure branches and evidence of errors are preserved.
- Session Alignment: When rolling back, the plugin requests DSH to create a session branch from the corresponding message boundary while restoring files. The original session history remains preserved.
- Record Failure Clues: Summaries of failed tools are utilized in reflection prompts for the new branch, helping the Agent avoid known errors.
- Non-Git Directory Support: In the absence of a Git repository, the plugin uses a manifest and content hashes to save snapshots.
Installation and Activation¶
Before installation, ensure that DeepSeek Harness and pnpm are installed. The Node.js version must satisfy ^22.19.0 || >=24.0.0, and the DSH version must be the web profile within the range >=0.1.5-rc.2 <0.2.0.
Execute the following command to install the plugin:
dsh plugin --profile web add github:GeoSyntax/dsh-plugin-time-machine#v0.2.0
Restart DSH after installation or update. The plugin is automatically added to the profile configuration via cordis.patch.yml.
Typical Usage¶
- Start the DSH Web interface in the project directory:
dsh web
- Enter the following commands in the session to view the checkpoint list and branch relationships:
/tm-list
/tm-tree
- Open the dashboard page:
http://127.0.0.1:3088. This page supports Chinese/English switching and is used to view checkpoint details, file changes, and recovery previews. The DSH Web interface itself runs athttp://127.0.0.1:3080by default; these are two distinct pages.
Scenarios and Notes¶
- Safe Mode Limitations: In the default
safemode, the plugin will refuse to overwrite when encountering unverifiable user modifications, staged area changes, or protected ignored files. You must review the preview before restoring. - Workspace Sharing: Currently, forks within the same DSH host share the workspace and do not provide independent worktrees or containers. Caution is required when parallel sessions modify the same directory.
- Side Effect Limitations: File rollback cannot undo database transactions, network requests, or cloud resource changes. The plugin can only record and warn about such side effects.
- Recovery Type Distinction: Full recovery and selective file recovery are distinct operations. If you only need to restore certain files, use the selective recovery feature.
- Plugin Nature: This is a non-official community plugin.
Conclusion¶
Through DAG branching and failure reflection mechanisms, this plugin provides DSH with time-travel-like capabilities. For more details, please refer to the GitHub Repository or the SkillHub Plugin Directory.