dsh-harness-trace: Rendering the Entire Harness-LLM Interaction into a Readable Timeline

Preface

When building agents or plugins in DSH, the content actually sent to the model is often more than just the user’s single sentence: system prompts, plugin injections, skill loading, tool calls, and command execution all stack into the same request. If you can only see the final reply afterwards, it’s hard to reconstruct “what context was brought into this turn, which files were read at which step, and what web searches were performed.” Manually flipping through logs or scattered screenshots also lacks a timeline view organized by turn and step.

Below we introduce the community plugin Harness Interaction Tracing (@oihai/dsh-harness-trace, maintainer: oihai, SkillHub category: Memory). It continuously monitors the entire process of the local DeepSeek Harness calling the LLM, aggregates verifiable facts into Markdown in chronological order, and stores them in the corresponding workspace of the session, while also providing a review page and configurable options. All data comes from the Harness’s own event contract, and the README explicitly states that it does not depend on any other plugin.

What Is This

dsh-harness-trace is a read-only observation plugin: it listens to Harness events without modifying request content; the llm/stream listener passes all chunks through as-is. The target users are developers who want to locally study the actual interaction between the harness and the model.

The DeepSeek Harness ecosystem adopts the “everything is a plugin” approach; SkillHub is an independent community directory, with no official affiliation with DeepSeek / 幻方 (Hunyuan).

What Was Tracked

The plugin categorizes multiple event streams, then assembles them chronologically into a single timeline following “turn → step”, and appends a session overview, file access summary, network activity summary, and skill loading summary. The correspondences in the README are as follows.

Content Source
Full prompt (raw messages sent to the model, system prompts, plugin injections) llm/stream frozen request + session/event’s system/message, developer/message
Who contributed each part of the prompt (origin of each segment) system-prompt/assemble
User input, model replies, reasoning process session/event
Tool calls and results (including failures) session/event’s tool/call, tool/result
Local file reads/writes Categorized and summarized from tool calls such as read / write / edit / glob / grep
Web search and fetching Categorized and summarized from web_search / web_fetch
Skill loading, command execution Categorized and summarized from skill, pwsh / bash, etc.
Token usage and finish reason assistant/message’s usage, llm/stream’s finish

Note: The system prompt only records the one that actually enters the request, without being reassembled on the plugin side.

Output Location and Naming

One session corresponds to one Markdown file; subsequent turns are continuously appended (rewritten as a whole).

  1. Default directory: <workspace>/harness-trace/ within the workspace corresponding to that session. When the workspace is not writable, it falls back to ~/.dsh/harness-trace/out/.
  2. Naming convention: sequence number + timestamp, e.g. 0001-20261010-040951.md.
  3. Customization: Output-related items such as the output subdirectory name can be adjusted in settings.

UI Entries

After installation, the README lists four entries, each with an independent toggle and adjustable position order:

  1. Sidebar panel — Review page: session list on the left, timeline expanded by turn / step on the right; can toggle viewing the Markdown source, manual write, and auto-refresh.
  2. Settings → Harness Interaction Tracing — All configuration items; the config file path can be viewed at the bottom of the review page or in the settings page.
  3. “Trace” tab within the session — Only the current session.
  4. Quick button in the session header — Displays tracing status, with one-click pause / start and write.

UI changes take effect immediately; you can also directly edit the config file.

Configuration Notes

The following all come from the README; do not extend fields that don’t appear in the materials.

Collection items (toggleable individually): system prompt, prompt assembly sources, full request sent to the model, user input, model replies, reasoning process, tool calls, tool results, file reads/writes, networking, skills, command execution, token usage.

Detail level: summary / standard / full; additionally a per-entry body cap (characters).

Raw request: write only when changed / every time / do not record; maximum number of messages; total budget (overflow folded into one line).

Deduplication: When the system prompt and prompt assembly appear redundantly within the same step, the duplicate body is omitted (turning this off will significantly increase file size).

Tracking scope: all / selected only / except selected; can check specific sessions and workspaces; can exclude sub-agent sessions.

Output: subdirectory name, write timing (every turn / every step / manual only), merge delay.

Entry positions: toggles and order for the four entries.

Installation and Development

The fetched materials do not provide a fixed installation command like dsh plugin add …; the README only describes the development installation method:

Installed as a link: points to the workspace source code, so modifying workspace files modifies the plugin (after the host makes partial changes, a reload is required to take effect).

Before use, please verify the currently recommended installation method on the SkillHub directory page or the GitHub repository. The plugin runs with the permissions of the current dsh process; before installing, you should inspect the source code and the MIT license yourself.

Typical Usage (Reproducible Process)

  1. After installing and enabling the plugin in the Desktop environment, open Settings → Harness Interaction Tracing, and check the collection items, detail level, and tracking scope as needed.
  2. Conduct sessions normally in Harness; when you need to view in real time, open the sidebar review page or the “Trace” tab within the session, and use the timeline to browse turns and steps.
  3. When you need to persist for archiving, use the quick button in the session header to control pause / start and write, or rely on the configured write timing (every turn / every step / manual only).
  4. Open a file like 0001-YYYYMMDD-HHMMSS.md under harness-trace/ (or your configured subdirectory) in the session workspace, and perform offline analysis against the summaries and session overview in the Markdown.

Browser Communication (Desktop)

The plugin’s self-built top-level channel is not served in the Desktop combination. Therefore the host registers a precise Fetch route /api/harness-trace on the shared /api channel; the browser-side call method is:

connection.rpc.call('/api', 'harness-trace', { method, payload })

The README notes: this plugin has only been tested in the desktop version.

Applicable Scenarios and Cautions

Suitable for: locally debugging DSH plugin and skill combinations, verifying prompt assembly and the origin of each segment, reviewing the order of the tool chain (files, commands, networking) within the same turn; scenarios that need to consolidate the interaction process into Markdown within the workspace.

Cautions:

  • Read-only monitoring, does not tamper with model requests; however, if you enable collection of files, commands, networking, etc., the output file will contain sensitive paths and content from the session, so please control the workspace and tracking scope yourself.
  • Excluding sub-agent sessions and narrowing the tracking scope can reduce size and exposure.
  • Turning off deduplication or choosing the “full” detail level will significantly increase the Markdown size.
  • In environments other than Desktop or without /api/harness-trace provided, review page and other UI capabilities may be unavailable; the actual host governs.

Conclusion

dsh-harness-trace strings together the facts from the Harness event contract into a “turn → step” timeline and writes it to the session workspace, facilitating local research against actual prompts, tools, and token behavior. For further documentation and issues see GitHub; the community index is at the SkillHub directory page:

  • https://www.skillhub.cn/plugins/oihai/dsh-harness-trace
  • https://github.com/oihai/dsh-harness-trace
羽毛球分组比赛记分
小程序二维码

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

Xiaoye