Introduction¶
In DSH (DeepSeek Harness), the most common requirement when debugging agents is not to chat endlessly, but to “try another path again”. The native conversation list is a flat line: when you want to open a new branch, you usually have to create a new conversation from scratch, re-paste the context, or manually scroll through history. dsh-branch-tree solves this—it transforms the conversation list in the left workspace into a tree. Parent sessions are expandable folder rows, and branches are indented child rows hanging beneath them.
It is maintained by YB313 (Yige Bao). The category is Workflow. The GitHub repository currently has 1 star. License is MIT. Current version is v1.3.1. It only provides a client.js loaded on the web client side, with no build steps.
What is this¶
In a nutshell: dsh-branch-tree is a web plugin for DSH that transforms the conversation list into a tree and provides a “Derived Branch” capability, where branches can choose how much memory to inherit from the parent session.
It does not merge: Dragging only changes the tree structure; it does not concatenate dialogue. Modifications to the parent session after the branch is created will not be synchronized into the branch.
Core Features¶
Three Inheritance Modes¶
When creating a branch, you can choose from three modes, determining the fork point and what is inherited:
| Mode | Fork Point | What Branch Inherits |
|---|---|---|
Panoramic Inheritance (full, default) |
The last real conversation of the parent session | All dialogue up to that point, copied verbatim into the branch session |
Compressed Inheritance (inherit) |
Empty session | The compressed summary of the parent session so far, written as the branch’s own first message; no original history is included |
Opening Inheritance (opening) |
End of the first round of the parent session | Only the initial requirement message is inherited, excluding subsequent dialogue |
The default is panoramic. The reason is that the purpose of a branch is to try things afterwards: summaries are lossy, and exactly the details that make a branch useful—rejected schemes, requirements said only once, the original wording of constraints—are lost.
A few implementation caveats are also noted in the README:
- Fork point filter injection block: Host-injected content (runtime context, skill directory, time context, memory preamble) does not count as dialogue and is filtered out when counting turns. The cut falls on the last reply actually said by the assistant.
- Shell detection: The host might “successfully” create a branch with 0 events. The plugin checks the inherited event count of the child session. If it is 0, it forks once without boundaries; if it is still 0, it marks
emptyForkon the row and does not pretend success. - Compressed inheritance does not pollute the parent session: The summary is generated in a one-off temporary scratch session, so the parent session itself does not insert a prompt. The summary is written into the branch as a seed message, marked with
<!-- dsh-branch-tree:seed ... -->. - Compressed fallback: If the model times out or answers without a summary section, it automatically reverts to a mechanical summary (truncated conversation log, ≤12k characters).
Clear Boundaries¶
- No merging of dialogue. Dragging a session only re-mounts the tree structure (it may create a sub-workspace directory if the host supports
workspaces.create). The two sessions will not be concatenated, summarized together, or merged. - No linkage with the parent session. Edits to the parent session after the branch exists will not be synchronized into the existing branch.
- No copying of md files. Each branch reads the same batch of md files in real-time. If the parent session changes the requirement, it takes effect the next time the branch reads the file.
Local State¶
Tree structure, collapse state, current session prompt, branch task status, branch count visibility, and archive/hide markers are all stored in localStorage under the prefix dsh.branch-tree.. Clearing it only resets the view; it does not touch any session data.
Installation and Enablement¶
DSH loads plugins in the form of profile packages, and the official documentation provides two paths. Choose one:
# Local checkout (this is the one used for development in the README)
dsh plugin --profile web add /absolute/path/to/dsh-branch-tree
# GitHub tag tarball (no local git required)
dsh plugin --profile web add https://github.com/YB313/dsh-branch-tree/archive/refs/tags/v1.3.1.tar.gz
After installation, restart the web GUI (or refresh the page), and look at the left workspace again. To uninstall:
dsh plugin --profile web remove dsh-branch-tree
Note: It has not been published to npm; currently, only the GitHub tarball and local path are available. This plugin is a web client plugin and requires a profile with web capabilities. The host-side dependencies are the five packages declared by dsh.client.inject: @deepseek-ai/dsh-client-ui-sidebar, @deepseek-ai/dsh-client-ui-conversation, @deepseek-ai/dsh-client-ui-primitives, @deepseek-ai/dsh-api-session-controller, and @deepseek-ai/dsh-api-workspace-files.
Typical Usage¶
-
Right-click on a session row to select + Derived Branch… (on a branch row, select + Sub-branch…), name it, select an inheritance mode, and create.
-
Click on a folder row to expand or collapse its branches.
-
Drag to adjust ownership: Dragging a session onto a folder row re-mounts it; dragging it onto the workspace title moves it. Dragging does not merge content.
-
The Branch Tree panel supports search, viewing the task status of each branch, renaming, archiving/unarchiving, “Move out of tree”, and diagnostics.
-
Branch artifacts fall under
diagram/<parent_session>/<branch>/by default.
The tree takes over the native sidebar conversation entry. If the host mount point throws an exception, the plugin will set dsh.branch-tree.takeover to off, allowing the native list to continue working; you can manually change it back to on in localStorage and try again.
Use Cases and Notes¶
Suitable for people debugging agents on the web: those who want to open a new path without changing the parent session, or who want to keep the hierarchy of multi-round experiments (“try it straight, then try it twisted”) visible in the sidebar. The README states it has been validated on the DSH developer preview version; the host is still changing, so it is recommended to verify the install command together with the version you are using.
It is worth noting that the plugin runs with the permissions of the current dsh process and can read/write sessions and workspace files within its scope. It is necessary to read the client.js source code and the MIT license in full before installing. The GitHub repository has 1 star and is essentially a personal maintenance project; you must evaluate the upgrade and compatibility risks yourself.
Summary¶
dsh-branch-tree does a very narrow and specific thing: it turns the sidebar from a list into a tree, adds an entry for derived branches with controllable memory span, and clearly delineates the boundaries of “no merge, no linkage, no file copying”. If you think the concept of branches is worth making explicit, you can try it; if you just want a flat chat, the native list is sufficient.
Directory page: https://www.skillhub.cn/plugins/YB313/dsh-branch-tree
GitHub: https://github.com/YB313/dsh-branch-tree