Introduction

When debugging an Agent in the DeepSeek Harness web interface, the full trajectory often contains many intermediate steps, such as tool calls, steering, workflow runs, and context injection, making the interface cluttered. This post introduces a plugin that can collapse these intermediate trajectories while always preserving the Agent’s final output.

Plugin Overview

Name: awesomehou/dsh-trajectory-collapse
Maintainer: AwesomeHou
Positioning: Permanent plugin for the DeepSeek Harness web interface
Core value: Collapse Agent trajectories while always preserving the Agent’s final output.

Core Features

  1. Collapse Agent trajectories round by round
    The plugin injects an Expand trace / Collapse trace button at the top of each completed Agent output. Collapsing is by round; you can independently control the collapse state for each output’s trajectory.

  2. Always preserve the final output
    Even after collapsing, the user message and the final assistant output remain visible; only the intermediate trajectories are hidden.

  3. Supports multiple trajectory types
    Supported collapsible types include: tool-call, assistant-step, steering, workflow, context, and unknown rows.

  4. Default collapsing settings
    The default collapse behavior can be configured in settings. Go to Settings -> General and select Collapse agent trace by default after final output to enable it. This option is selected by default.

Installation and Enablement

This is a permanent plugin and must be installed to the web profile.

  1. Run the installation command in the DeepSeek Harness web profile directory:
   dsh plugin --profile web add <path to this repository>

Restart Harness after installation.

  1. Other installation methods:
    - Command line: Simply ask the Agent to install it for you, for example:
     Help me install this plugin: https://github.com/AwesomeHou/dsh-trajectory-collapse
  • Plugin marketplace: First install the plugin marketplace (https://github.com/AwesomeHou/dsh-plugin-marketplace), then search for and install it from the marketplace.

Typical Usage

  1. Enable default collapsing:
    Go to Settings -> General and select Collapse agent trace by default after final output. Once the Agent finishes output, the trajectory is automatically collapsed.

  2. Manual collapse/expand:
    In the chat interface, click the small button at the top of the trajectory (Expand trace / Collapse trace) to manually control the trajectory display for a specific round.

Applicable Scenarios and Notes

  • Applicable scenario: Suitable for developers who need to view long trajectories in the DeepSeek Harness web interface but want to keep the interface clean.
  • Notes:
  • The plugin runs with the permissions of the current DSH process.
  • We recommend reviewing its source code and license (MIT) before installation.
  • This is a permanent plugin and must be installed to the web profile.

Conclusion

By providing round-by-round collapse control, this plugin addresses the clutter caused by long trajectories. For more details and source code, see its directory page or GitHub repository.