dsh-session-tree: Turn DSH Sidebar into a Nested Session Tree

Preface

When running tasks with subagents in DeepSeek Harness (DSH), the number of sessions grows rapidly: sub-tasks are nested under the main session, but the built-in left-side session list is often flat, making it hard to tell “who belongs to whom” at a glance. To continue a multi-turn follow-up in a specific subagent conversation, you have to search back and forth in the list for the ID.

orphiczhou/dsh-session-tree is a client-side DSH profile bundle published by the maintainer orphiczhou. It replaces the default sidebar with a tree view and groups sessions by workspaces reported by the Host. It also registers the Host tool tree_send to send messages to any continuable subagent session in the tree (including sibling nodes unreachable by the built-in send_message). It is MIT licensed, and the current package version is 1.0.4.

What is this

In short: the sidebar displays “every session + its nested subagent descendants.” Click a row to enter a multi-turn conversation; the Agent can send messages across the tree via tree_send.

DSH has no centralized plugin store; plugins are distributed as regular npm/Git packages, and the README serves as the installation instructions. This plugin is a client-side bundle, injecting the sidebar via a Cordis patch, and depends on @deepseek-ai/dsh-client-ui-sidebar and @deepseek-ai/dsh-client-ui-workspace.

Core Features

Below are the capabilities listed in the README, all verifiable in the interface or Host tool list after enabling.

Tree Sessions and Workspace Grouping

Feature Description
Tree view Nests child sessions with origin: 'subagent' under persistent parent sessions based on parentId, with unlimited depth (rendering indentation maxes at 8 levels).
Workspace grouping Sessions are attached under Host-reported workspaces; collapsed headers display name, path, and (when collapsed) session count; those without a workspace fall into Ungrouped, always placed at the end.
Lazy expansion Collapsed by default; the subtree is constructed only when a node is expanded, with 13 px indentation per level.
Bounded fan-out Renders a maximum of 300 child rows per level; excess shows N more omitted to avoid silent discarding.

Status, Search, and View Options

  • Quad-state status dot: Running (blue, pulsing), Completed Unread (green), Completed Read (gray), Awaiting Reply (orange); colors follow DSH theme tokens.
  • Search box: Filters by label or session ID; matches remain under their respective workspace headers.
  • Header … menu: Sort by Last Updated or Title (pinned sessions always first), archive display policy (Hide / Show / Only Archived), Expand All / Collapse All, Reload Titles.
  • Collapsed sidebar: When the sidebar is collapsed into an icon rail, a ≡ button is provided to expand it again.

Inline Actions and Navigation

  • Click ▶ to expand or collapse; if children exist, the child count is shown on the right.
  • Click the row body: Top-level sessions use the built-in openSession(sessionId); subagent rows use openSession({ parentSessionId, childSessionId, mode }). Continuable multi-turn subagents can be followed up; one-off subagents are read-only (consistent with DSH’s native behavior).
  • The ↗ on a subagent row opens it as a subagentchat resource in the right sidebar, leaving the left sidebar position unchanged.
  • Header + creates a new session (compensating for the built-in browser entry being shadowed).
  • Row … (visible on hover): Pin / Unpin, Rename (Enter to submit, Esc to cancel, blur to submit), Fork (normal sessions only), Archive / Unarchive.

tree_send and SessionTree Inspect

The built-in send_message authorizes based on the “current live sender,” allowing only direct parent-child adjacency; sibling subagents cannot send to each other. tree_send authorizes based on the target session’s persistent parent address, allowing messages to be delivered to any continuable subagent in the tree.

Parameter Required Meaning
target Yes The session ID of the continuable subagent to send a message to.
message Yes The message body.

The plugin also registers a read-only Cordis Inspect provider SessionTree: via cordis_inspect_query, one can read the sidebar’s actually rendered row order, hierarchy, indentation, and styling, allowing Agents to self-check the UI without manual screen reading.

tree_send is only registered when the Host has tools, subagents, and sessionQuery services simultaneously; otherwise, the bundle still loads but simply does not provide this tool.

Installation and Enabling

First install, then confirm the bundle is enabled on the Plugins page.

Graphical Interface

  1. Open the Plugins page in the sidebar.
  2. Select Add plugin.
  3. Paste the repository URL into the spec and confirm:
https://github.com/orphiczhou/dsh-session-tree

Once the bundle is added to the current profile, the left sidebar will switch to the tree view without needing a restart.

Command Line

Run in the terminal (owner/repo is GitHub shorthand, equivalent to a full clone URL; --profile <name> specifies a non-default profile):

dsh plugin add orphiczhou/dsh-session-tree

This command installs the repository via pnpm within the profile directory and registers an entry in dsh.profile.bundles. This package is pure ESM with no build step; pnpm ≥ 10 will not require an additional allowlist for build scripts.

Local Path

If you have a local directory, use the absolute path:

dsh plugin --profile <name> add /absolute/path/to/dsh-session-tree

Verification

  • Open a profile with this bundle enabled: The left sidebar title should be Sessions (or 会话树 in Chinese UI), indicating this plugin rather than the built-in browser list.
  • Expand rows with a child count to see nested subagent rows.
  • If the interface remains the built-in list: Check that the row named session-tree is enabled on the Plugins page; if still ineffective, consult the Troubleshooting section of the repository.
  • Optional: Ask the Agent to list Host tools; tree_send should appear (provided the above services are present).

Typical Usage

Expand and Open Conversations

  1. Use ▶ to expand sessions with children to view nested subagents.
  2. Click a target row to enter that session; if you need to view the subagent in parallel on the right, click the row’s ↗.
  3. Use + in the Header to start a new top-level session; use the search box to locate by title or ID.

Batch Organize View

  1. Header … → Select Order by (Last updated or Title).
  2. Toggle the Archived sessions display policy as needed.
  3. Use Expand all / Collapse all after tasks end; use Reload titles to re-fetch from the Host when titles are stale.

Agent Sends Messages to Sibling Subagents

When orchestration requires a subagent to notify another continuable subagent at the same level, call the tree_send tool on a Host that has it, passing target (target session ID) and message. Do not rely on send_message for sibling communication.

Use Inspect to Verify Sidebar Rendering

When debugging the UI or writing automation, use cordis_inspect_query to query the SessionTree provider to obtain the current sidebar’s actual DOM structure and styling, instead of asking the user to verbally describe screen content.

Use Cases and Notes

Who it’s for

  • DSH users who frequently spawn subagents and need to clearly see parent-child relationships and mixed usage across multiple workspaces.
  • Orchestration scenarios requiring the Agent side to send messages to any continuable subagent (including siblings) within the tree.
  • Developers wanting Agents to read the sidebar’s actual layout via Cordis inspect.

Notes before installation

  • Plugins run with the current DSH process privileges; before installing, you should read the source code and MIT license at the GitHub repository to ensure compliance with your security and compliance requirements.
  • DSH plugins are maintained by the community; the SkillHub directory page is an independent ecosystem index, with no official affiliation to DeepSeek / High-Flyer, and is not an in-app store.
  • Stars and versions are subject to the repository and package; functional boundaries are subject to the README. Do not assume undocumented configuration options.

Conclusion

dsh-session-tree transforms the left sidebar from a flat list into a lazy-loadable session tree grouped by workspace, and adds tree_send and SessionTree inspect, facilitating navigation and communication for both humans and machines within complex subagent topologies.

  • Directory Page: https://www.skillhub.cn/plugins/orphiczhou/dsh-session-tree
  • Source Code and Full Documentation: https://github.com/orphiczhou/dsh-session-tree
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye