This article introduces the DeepSeek Harness (DSH) Agent loop change review plugin: dsh-build-diff.
DSH’s philosophy is “everything is a plugin.” When developing agents in the Web GUI, developers usually need to manually review the specific changes an Agent makes to workspace files in each loop. dsh-build-diff solves this problem. Each time the Agent completes a drive cycle from running to idle, the plugin automatically snapshots the current session workspace, detects file and code changes, and provides review and rollback capabilities.
This plugin is an official dual-side plugin (host half + browser half), with zero runtime dependencies and no modifications to the DSH source code.
Core Features¶
After installation and activation, the plugin provides the following capabilities in the DSH Web GUI:
- Right sidebar review: Lists all changed files by round in the right sidebar, with inline line-level diffs (supports two-column line numbers,
+/-highlighting, and collapses long unchanged contexts as “N lines unchanged”). - One-click rollback: Supports one-click rollback of all changes in a round, or file-by-file rollback. Rollback restores files to the exact content before the loop started, including reverting newly created files and restoring deleted files.
- Review bubble: After each round ends, a review bubble is rendered directly above the assistant message’s “Copy / Good answer / Problematic answer” button row. The bubble displays a change summary (e.g., “Edited N files · +X -Y”) and provides “Undo” and “Review” actions.
- Round switching: Use a dropdown menu to switch between and view previous rounds of changes in this workspace.
- Auxiliary actions: Supports copying the unified diff text and marking items as reviewed.
Installation and Activation¶
Before installing dsh-build-diff, make sure the prerequisite dependency dsh-better-sidebar is already installed (version must be ^0.12.1 or higher). The review interface exists as a tab in that plugin’s VS Code-style right sidebar workspace.
1. Install the Prerequisite Plugin¶
dsh plugin --profile web add dsh-better-sidebar
2. Install dsh-build-diff¶
Install from npm (available after release):
dsh plugin --profile web add @kelearns/dsh-build-diff
For local development and debugging, you can use a local path:
dsh plugin --profile web add link:/path/to/dsh-build-diff
For manual installation, copy the plugin directory to ~/.dsh/profiles/node_modules/@kelearns/dsh-build-diff/, append the configuration item to ~/.dsh/profiles/web/cordis.patch.yml, and then restart DSH.
Notes and Limitations¶
The plugin runs with DSH process permissions and involves writing files back, so please note the following technical details:
- Loop tracking start point: The plugin only tracks loops that start after the plugin is activated. If a loop was already running when DSH started, changes at the beginning of that loop will be missed.
- Large files and binary files: For files exceeding
contentCapBytes(default 1 MB) or binary files, the plugin still detects and counts them, but cannot generate diff content, and rollback is not supported. - Rollback logic: Rollback writes files back exactly to their content before the loop started. If a file was updated in a later loop, rolling back an earlier loop will overwrite changes made in the newer loop.
- Rollback idempotence: Rollback operations are executed idempotently per record, and there is no redo support.
- Scope: Sub-agents or background-task agents within the same workspace also produce change records (shared workspace root).
- Scan limit: Snapshot scanning has a file count limit, defaulting to 50,000 files.
Summary¶
dsh-build-diff provides visual Agent change review and rollback capabilities in the DSH Web GUI. Through the right sidebar and message bubbles, developers can clearly track file modifications in each round and quickly roll them back when necessary.