DSH (DeepSeek Harness) TUI mode is the core entry point for developers to debug and interact with agentic systems. When handling multi-agent collaboration or complex task decomposition, the internal chains of thought and tool-calling processes of subagents are often buried in low-level logs, making them hard to observe or intervene at the interaction layer. The dsh-tui-subagents plugin adds a subagent session view to DSH TUI, turning previously invisible execution traces into a visualized streaming interface and providing real-time interaction for “resumable” subagents.
Plugin Positioning and Features¶
This is a subagent session view plugin for DeepSeek Harness TUI. By listening to DSH’s internal session/event event stream, it renders subagent thinking streams, tool calls (tool/call/tool/result), and response content to the terminal in real time.
Core capabilities include:
- Real-time trace view: Enter fullscreen view with
/subagentsand follow the subagent’s thinking process scrolling in real time. Streaming rendering uses 50ms frame-aligned throttling to ensure visual smoothness. - Interaction control: For subagents marked as “resumable,” you can directly send a message (
ikey) to steer behavior, or interrupt the current turn (xkey, requiring two confirmations within 3 seconds). One-shot subagents remain read-only, consistent with the official web client behavior. - View switching: Supports switching between a list view (showing all subagents in the current session) and a fullscreen trace view, with the ability to expand or collapse thinking content.
- Architectural transparency: The plugin operates without changes to the mechanism layer, fully reusing DSH’s existing host services (in-process cordis), and does not degrade the TUI interface.
Installation¶
This plugin has not been published to npm yet and must be installed by packaging from source. Run the following commands to add the plugin to a specified profile:
git clone https://github.com/FUSU123fusu/dsh-tui-subagents.git
cd dsh-tui-subagents
npm pack
dsh plugin --profile <你的profile> add file:dsh-tui-subagents-0.1.0.tgz
Usage¶
Listing and Entering Subagents¶
Enter the following commands in DSH TUI:
/subagents # 列出当前会话的所有子 Agent
/subagents a1b2 # 直接按 ID 前缀进入指定子 Agent 的轨迹视图
Trace View Operations¶
After entering the trace view, you can use the following shortcuts:
- Enter / Esc: Enter view / return to list (press Esc to exit on the list page).
- ↑ / ↓: Scroll to view (exits real-time follow mode).
- e: Expand or collapse the subagent’s thinking process.
- i: Send a message to a “resumable” subagent, queuing it for its next turn.
- x: Interrupt the current turn of a running subagent (requires two confirmations within 3 seconds).
- G: Jump to the end and restore real-time follow mode.
- ← / →: Cycle through sibling subagents.
- r: Refresh the list in list view.
Principles and Compatibility¶
The plugin obtains subagent data by listening to the session/event event tree. For live subagents, it reads a live session snapshot; for archived subagents, it uses sessionPersistence.inspect() for non-destructive reads.
At the UI layer, it registers a fullscreen scene through the TUI tuiScenes interface. If the host environment does not support scenes (such as some headless scenarios), the interface automatically degrades to a text list consistent with the built-in /agents command.
Notes¶
- Installation method: Currently only supports local package installation; no npm package is available yet.
- Permission isolation: The plugin runs with the permissions of the current DSH process. It is recommended to review the source code and license before installing.
- Mechanism dependency: Core features depend on the
ctx.subagents.followupandctx.subagents.interruptinterfaces in the DSH core.
Summary¶
dsh-tui-subagents completes the observation and interaction loop for subagents in DSH TUI. Developers can monitor subagent runtime status and intervene in control from within the terminal without leaving the TUI or checking log files, making it suitable for scenarios that require fine-grained debugging of multi-agent collaboration workflows.