dsh-step-trace: Recording Each Step of the Agent and Replay for Debugging

Preface

When running multi-step tasks in DeepSeek Harness (DSH), model responses and tool calls often form a long chain. When issues arise, it is difficult to answer “which step went off track” or “what differed between the two retries” by relying solely on terminal scrolling or scattered logs. Manually copying context for comparison is also time-consuming and lacks per-step timing information.

Below is an introduction to the community plugin dsh-step-trace: it appends the steps of each session to a local replay file and provides panels in the CLI and Settings page to view inputs and outputs step-by-step, fork and re-run sessions, and compare divergence points between two sessions.

What is this

dsh-step-trace was published by maintainer hj01857655, and the npm package name is also dsh-step-trace. The package description is: Record every step taken by the agent, and support forward and backward step-by-step viewing to locate error stages.

The standalone repository hj01857655/dsh-step-trace has been marked as Archived in the community catalog. The source code was once merged into the monorepo hj01857655/dsh-plugins; starting from 2026-10-20, only the remaining two packages are kept in the monorepo workspace, and seven packages including dsh-step-trace have been removed from the repository. However, it is still installable from npm, and the installation method remains unchanged (see the monorepo README).

The SkillHub directory page categorizes this plugin as an installable online tool, with the currently displayed version being v0.5.1; the latest version on npm is 0.6.1 (released on 2026-10-16). License: MIT.

Core Features

The following capabilities are derived from the npm package README. Upon installation and activation, the plugin integrates on the DSH host side.

Recording and Storage

  • Each model response and tool call is recorded as a trace step.
  • Data is written to .replay/.jsonl under the workspace: separated by session, append-only.

Step-by-step Viewing and Branching

  • You can browse forward or backward by step to view the complete input and output of that step; each step includes a timestamp and duration.
  • You can branch a new session from any step to explore “what would have happened if another path had been chosen at that time.”
  • Divergence detection: For two sessions of the same task, find the first inconsistent step to understand why retry results differ.

Statistics and Interface

  • Session-level statistics: total steps, total duration, average step latency, slowest step.
  • Panel: The “Step trace” page within Settings; the host registers GET /api/step-trace.panel, rebuilding data from replay files for each request. Headless hosts without a web interface can skip this route.
  • The panel includes: a time-sorted session list (step count, total duration), a step-by-step viewer, a step duration timeline, and a dual-session divergence comparison view.

Installation and Activation

The official recommendation is to install from npm (requires DSH’s web profile):

dsh plugin --profile web add dsh-step-trace

The README also provides a method to install from the GitHub source (the standalone repository is archived; if the command fails, switch to npm):

dsh plugin --profile web add github:hj01857655/dsh-step-trace

Before installation, it is recommended to read the source code and the MIT license on npm or in historical commits. The plugin runs with the current dsh process permissions and will read and write session data under the workspace .replay/.

Typical Usage

CLI

The plugin provides a command-line entry that can be used independently outside of DSH. Common subcommands are as follows:

dsh-step-trace list              # List recorded sessions
dsh-step-trace trace <id>        # Display all steps of a session
dsh-step-trace step <id> <n>     # View details of the Nth step
dsh-step-trace diverge <a> <b>   # Find the first divergent step between two sessions

Replace <id> with the session identifier from the list output; <n> is the step number starting from 1.

Settings Panel

Open the Step trace page in DSH Settings: browse sessions, view step-by-step I/O, look at the timeline, or compare two sessions side-by-side in the divergence view. This is suitable for scenarios where you are not accustomed to a pure CLI but need to see the complete payload of a specific step.

Applicable Scenarios and Cautions

Who it is for

  • Debugging multi-step Agents: locating the first erroneous tool call or abnormal model output.
  • Comparing two runs (e.g., after changing a prompt or switching models), using diverge or the panel to find the fork point.
  • Need session-level duration distribution rather than just total wall time.

Cautions

  • Replay files are located in the project directory .replay/, containing model and tool inputs and outputs. Please pay attention to sensitive information and version control (do not accidentally commit keys).
  • The panel depends on the web profile and host routes; pure headless environments rely mainly on the CLI and .jsonl.
  • The community directory SkillHub and GitHub repository are not DeepSeek / High-Flyer official app stores; the DSH ecosystem advocates “everything is a plugin,” please audit the code yourself before installing third-party packages.

Conclusion

dsh-step-trace translates “what happened at each step, how long it took, and when two paths separated” into queryable replays and CLI/panels, making it suitable as a post-incident troubleshooting tool for DSH multi-step tasks.

  • Directory Page: https://www.skillhub.cn/plugins/hj01857655/dsh-step-trace
  • Original GitHub Identifier: https://github.com/hj01857655/dsh-step-trace (Archived; the current npm homepage points to the monorepo history path)
  • npm: https://www.npmjs.com/package/dsh-step-trace
  • Maintainer Monorepo: https://github.com/hj01857655/dsh-plugins
羽毛球分组比赛记分
小程序二维码

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

Xiaoye