When developing agents in DeepSeek-Harness (DSH), conversation history is usually presented as a linear list. Once a conversation continues, tracing or modifying past paths becomes difficult. The dsh-session-tree-extension plugin provides an append-only, multi-branch conversation tree structure, allowing you to fork at any historical node, clone conversations, and browse the entire lineage in a merged WebUI graph.

The plugin is maintained by robiteame and is designed to add conversation tree capabilities to DSH. It uses an append-only design: all nodes are immutable, and branching or jumping only moves the cursor without modifying existing branches.

Core Features

The plugin provides the following core capabilities:

  • Append-only, multi-branch conversation tree: All history is stored as immutable nodes.
  • Fork from any historical node: Create a new branch at any point in the history.
  • Clone a conversation: Copy the current conversation into a new independent session.
  • WebUI browsing: Browse the complete lineage through a merged graph.
  • Three commands: /tree, /fork, and /clone.

Installation and Activation

Install the plugin using the following command:

dsh plugin --profile <profile> add @robiteame/dsh-session-tree

After installation, restart the corresponding profile. The configuration layer adds three components (pi-agent-session-tree, tool-session-tree, and ui-session-tree), which provide domain services, commands, and a browser panel respectively. You can verify the installation with the following command:

dsh --profile <profile> --dump-config

Typical Usage

The plugin defines three commands for managing the conversation tree:

  • /tree: Opens the right-side panel and displays a merged graph of the current session’s lineage. In this view, ancestor nodes, fork points, and clone nodes are shown in a Git-style view, including connected nodes such as user messages, assistant replies, and tool calls. Clicking a node binds to it; clicking another session node jumps to that session.
  • /fork: Forks from any historical node. The new branch appears in the graph and is shown as a collapsible inline menu below the source session’s line. The original conversation remains unchanged.
  • /clone: Copies the current conversation into a new independent session. The source conversation remains read-only, while the cloned session can be continued independently.

Applicable Scenarios and Considerations

The plugin requires the following environment:

  • DeepSeek-Harness 0.1.5-rc.2 or a compatible 0.1.5 build.
  • Cordis ^4.0.2.

At runtime, the plugin detects the branch selection API. Depending on the environment, it supports three modes:

  1. Native mode: In a DSH checkout with a specific patch, it uses the native API directly to jump and fork.
  2. Stock mode: In standard DSH, it simulates switching through the official append API and stores branch state locally.
  3. Projection mode: If even simulation mode is unavailable, it only moves the panel and projection without modifying history.

In all modes, the plugin does not modify Harness core files. The license is MIT.

Summary

dsh-session-tree-extension provides DSH with visual conversation tree management capabilities, suitable for development scenarios that require frequent debugging of historical branches or iterative conversation refinement. Through immutable nodes and a clear command interface, it simplifies the management process for multi-branch conversations.