<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Trace Visualization on RockB</title><link>https://baeseokjae.github.io/tags/trace-visualization/</link><description>Recent content in Trace Visualization on RockB</description><image><title>RockB</title><url>https://baeseokjae.github.io/images/og-default.png</url><link>https://baeseokjae.github.io/images/og-default.png</link></image><generator>Hugo</generator><language>en-us</language><lastBuildDate>Sat, 19 Sep 2026 16:01:28 +0000</lastBuildDate><atom:link href="https://baeseokjae.github.io/tags/trace-visualization/index.xml" rel="self" type="application/rss+xml"/><item><title>dsh Trace Compare: Visualizing DeepSeek Harness Agent Exploration with dsh-maze</title><link>https://baeseokjae.github.io/posts/deepseek-harness-trace-compare-agent-exploration/</link><pubDate>Sat, 19 Sep 2026 16:01:28 +0000</pubDate><guid>https://baeseokjae.github.io/posts/deepseek-harness-trace-compare-agent-exploration/</guid><description>Visualize DeepSeek Harness agent exploration with dsh-maze: see main path, detours, and backtracks on one timeline, compare 2-5 model runs, and debug recovery chains with LLM-free evidence.</description><content:encoded><![CDATA[<p>The <strong>dsh trace compare agent exploration</strong> use case is the fastest way to see why a DeepSeek Harness agent does what it does: install the dsh-maze plugin (formerly dsh-trace-compare), load a session log or follow a live run, and you get the agent&rsquo;s full exploration maze — main path, failed detours, and backtracking points — rendered on a single timeline with deterministic, LLM-free analysis you can drill back to the raw commands and outputs. It turns an invisible black-box trajectory into something you can actually read, compare across models, and fix.</p>
<h2 id="why-visualize-an-agents-exploration-instead-of-just-its-answer">Why visualize an agent&rsquo;s exploration instead of just its answer</h2>
<p>Most agent teams can inspect the final output but cannot reliably replay the trajectory behind it. As Arize&rsquo;s guidance on building better agents points out, teams &ldquo;can inspect the final answer but can&rsquo;t reliably replay the agent&rsquo;s trajectory — that&rsquo;s the gap trace visualization fills.&rdquo; When an agent wanders, takes five detours, or re-tries the same failing tool call three times, none of that shows up in the finished answer. The waste is invisible.</p>
<p>Visualizing exploration solves a different problem than reading output. The final answer tells you <em>what</em> the agent produced; the trace tells you <em>how</em> it got there — which tool it reached for, what errored, where it backtracked, and how many wasted round-trips it burned before succeeding. For anyone studying how tool surface, context, profiles, or the agent loop affect results, the trajectory is the actual object of study.</p>
<p>The repeatable loop is straightforward: trace the run, create targeted evals, inspect failed spans, decide whether the agent or the evaluator is wrong, then improve the prompt, tools, context, rubric, or evaluator — and run again. None of that works without a trace you can actually read.</p>
<h2 id="what-dsh-trace-compare--dsh-maze-is-and-where-it-comes-from">What dsh-trace-compare / dsh-maze is and where it comes from</h2>
<ul>
<li><strong>dsh-trace-compare</strong> was the original plugin name. On the Plugin Hub it resolves to version 0.7.0, with 0.6.x and 0.5.x in its history. It visualizes the agent&rsquo;s exploration maze — main path, detours, and backtracks — on one timeline.</li>
<li><strong>dsh-maze</strong> is the newer name (from v1.0.0) for the same project, maintained under <code>lamost423/dsh-maze</code>. It adds the multi-session comparison, replay, and the honest-verdict engine.</li>
</ul>
<p>Both belong to the DeepSeek Harness ecosystem. DeepSeek Harness (dsh) is an open-source agent harness built on the Cordis plugin system — &ldquo;everything is a plugin.&rdquo; Models, tools, skills, sessions, storage, loops, scheduling, and even the UI are all plugins that can be swapped or recomposed. In that philosophy, trace tooling composes <em>into</em> the harness as a plugin rather than living only as an external tool.</p>
<p>The project sits at the intersection of two documented truths:</p>
<ol>
<li><strong>Every run is traceable.</strong> DeepSeek Harness records every run in an append-only session log — system prompts, reasoning, tool calls and results, subagent scheduling, and every context injection. The Trajectory view inspects records by source, and resume, fork, search, and replay all operate on the same event stream.</li>
<li><strong>Trace visibility is a differentiator.</strong> DeepSeek&rsquo;s own material positions trace visibility as a reason harness researchers pick the harness over ready-made coding agents like Codex or Claude Code, which are engineering tools first and study subjects second.</li>
</ol>
<h2 id="installing-trace-compare-into-deepseek-harness-host-compatibility-caveat">Installing Trace Compare into DeepSeek Harness (host-compatibility caveat)</h2>
<p>The install command is a single <code>npx</code> line. From the Plugin Hub listing:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>npx -y @deepseek-ai/dsh plugin --profile web add dsh-trace-compare@0.7.0
</span></span></code></pre></div><p>Or, for newer hosts on the 0.1.2 host line (DSH Desktop 2.x), the maintained name is dsh-maze:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>npx -y @deepseek-ai/dsh plugin --profile web add dsh-maze@2.0.0
</span></span></code></pre></div><h3 id="the-host-compatibility-gotcha">The host-compatibility gotcha</h3>
<p>The plugin version you choose depends on the host, not just &ldquo;latest.&rdquo; The compatibility split is explicit:</p>
<table>
  <thead>
      <tr>
          <th>Host line</th>
          <th>Example</th>
          <th>Plugin version required</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>host 0.1.2 line</td>
          <td>DSH Desktop 2.x</td>
          <td>dsh-maze 2.x</td>
      </tr>
      <tr>
          <td>Older hosts</td>
          <td>earlier DSH versions</td>
          <td>dsh-maze 1.1.0 (pinned)</td>
      </tr>
  </tbody>
</table>
<p>If you are on an older host, do not grab the newest plugin — pin dsh-maze 1.1.0. If you are on the 0.1.2 host line, use dsh-maze 2.x. On the original trace-compare naming, resolving to 0.7.0 covers the same practical surface. The practical migration path is: identify your host line first, then choose the matching plugin, then install.</p>
<p>After install, the runtime surface is web. Launch the harness with <code>npx @deepseek-ai/dsh web</code> (opens the Web UI at http://127.0.0.1:3080 by default), and the plugin&rsquo;s tabs appear. Provenance is verified from the release source and the registry is updated.</p>
<h2 id="reading-the-exploration-maze-main-path-detours-and-backtracks-on-one-timeline">Reading the exploration maze: main path, detours, and backtracks on one timeline</h2>
<p>Open either the live &ldquo;realtime maze&rdquo; tab (which grows as the current session runs) or the sidebar &ldquo;execution maze&rdquo; (which takes uploaded session logs), and you get the core visualization: the agent&rsquo;s actual working process drawn as a maze.</p>
<p>Three elements carry most of the meaning:</p>
<ul>
<li><strong>Main path</strong> — the sequence of steps that ended up contributing to the finished result. This is the spine of the run.</li>
<li><strong>Detours</strong> — side branches the agent explored that did not make it into the final path. These are the wasted or exploratory moves.</li>
<li><strong>Backtracks</strong> — points where the agent reversed course, left a branch, and returned to an earlier position. These are the recovery points.</li>
</ul>
<p>All three render on one timeline, so you can see at a glance whether a run was clean (short main path, few detours) or thrashy (long main path, many dead-end branches, repeated backtracks).</p>
<p>The value of one timeline is that it answers the question &ldquo;how much did this agent explore to get here?&rdquo; in seconds. A two-hour model with a clean maze beats a thirty-minute model that burned twenty failed branches — and now you can actually tell which is which before judging the answer.</p>
<h2 id="the-data-tracks-tool-call-density-token-pulses-context-pressure">The data tracks: tool-call density, token pulses, context pressure</h2>
<p>The exploration maze is not just a path drawing. dsh-maze overlays data tracks that explain <em>why</em> the path looks the way it does:</p>
<ul>
<li><strong>Tool-call density</strong> — how often the agent invoked tools per unit of work. High density with detours suggests the agent was reaching for many tools; low density with a straight line suggests it resolved most steps from context or reasoning.</li>
<li><strong>Token pulses</strong> — bars distinguishing cached background tokens from uncached input, reasoning, and output tokens. You can literally see when the agent &ldquo;thought hard&rdquo; (a reasoning spike) versus when it streamed output.</li>
<li><strong>Context pressure curve</strong> — a running curve with 70% and 90% threshold lines plus compression markers. When the pressure crosses a threshold, the harness compresses context; compression events are flagged right on the timeline.</li>
</ul>
<p>These tracks let you connect cost and context behavior to specific maze events. A backtrack right before a context-pressure compression, for example, tells you the agent may have hit a wall, compressed, and restarted — a distinct failure signature from a clean detour. The context-pressure feature also matters for one of the most common agent problems in 2026: silently degraded performance when long context forces mid-run compression. Seeing the compression markers on the timeline is the difference between &ldquo;the agent randomly got worse&rdquo; and &ldquo;the agent compressed context at step 40 and never fully recovered.&rdquo;</p>
<h2 id="execution-analysis-and-failure-recovery-chains-with-drill-down-to-raw-evidence">Execution analysis and failure-recovery chains (with drill-down to raw evidence)</h2>
<p>Beyond the maze, dsh-maze performs execution analysis that classifies how the agent recovered from failures. The core concept is the <strong>failure-recovery chain</strong>, classified into a small set of patterns:</p>
<table>
  <thead>
      <tr>
          <th>Recovery type</th>
          <th>What it looks like</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>Retry-as-is</td>
          <td>Same tool, same parameters, tried again</td>
      </tr>
      <tr>
          <td>Change-param</td>
          <td>Same tool, different parameters</td>
      </tr>
      <tr>
          <td>Change-tool</td>
          <td>Switched to a different tool</td>
      </tr>
      <tr>
          <td>Not recovered</td>
          <td>The failure was never resolved before the run ended</td>
      </tr>
  </tbody>
</table>
<p>Two additional analysis surfaces:</p>
<ul>
<li><strong>Tool result matrix</strong> — a grid of which tools returned success, error, or empty results, so you can spot chronically failing tools at a glance.</li>
<li><strong>Duration P50/P95 scatter</strong> — per-step latency distribution, revealing slow tools or slow steps that inflate run time.</li>
</ul>
<p>The crucial honesty property: <strong>every conclusion drills back to the original command and returned content.</strong> Nothing is shown as an unexplained score. If the analysis says &ldquo;change-param recovery,&rdquo; you can click through to the actual failing command and the error it returned. That evidential chain is what separates useful trace analysis from a dashboard of vibes.</p>
<h2 id="comparing-2-5-agent-runs-on-different-models-round-alignment-anchors-detour-inventory">Comparing 2-5 agent runs on different models (round alignment, anchors, detour inventory)</h2>
<p>Single-run analysis points at a problem. Multi-run comparison makes it benchmark-style: run the same task 2-5 times on different models and align them on one axis.</p>
<p>The comparison surface provides:</p>
<ul>
<li><strong>Round alignment</strong> — automatic alignment of corresponding work rounds across runs, so you compare step-for-step rather than wall-clock-vs-wall-clock.</li>
<li><strong>Manual anchors</strong> — you can pin anchor points (e.g., &ldquo;the point where the agent first fetched the docs&rdquo;) so that alignment lines up on the moments you care about.</li>
<li><strong>Per-round detour inventory</strong> — for each round, a list of the detours each model took, making wasted exploration comparable.</li>
</ul>
<p>This is the &ldquo;dsh trace compare&rdquo; in practice: put Model A and Model B on the same task, and you instantly see that A plowed straight through while B took four detours and two backtracks. Add a third model and you start seeing systematic behavior — maybe every model that lacks a particular tool bounces between two workarounds, which is a tool-surface problem, not a model-quality problem.</p>
<h2 id="how-session-logs-make-every-run-replayable-and-verifiable">How session logs make every run replayable and verifiable</h2>
<p>DeepSeek Harness records every run in an <strong>append-only session log</strong>. Everything the model sees is in there: system prompts, reasoning, tool calls and results, subagent scheduling, and every context injection. Nothing is cherry-picked afterwards; the record exists before you decide what to analyze.</p>
<p>That log foundation powers dsh-maze&rsquo;s inputs. It supports <strong>plain .jsonl and .jsonl.zstd</strong> session logs, auto-detected by content. The zstd logs decompress browser-side via the native <code>DecompressionStream</code> or the fzstd fallback — no server-side decode step needed.</p>
<p>Two more properties make logs genuinely verifiable rather than merely inspectable:</p>
<ul>
<li><strong>Replay up to 300x.</strong> You can replay a run at up to 300× speed, with idle folding so silent stretches collapse instead of stretching the timeline. This makes &ldquo;watch the whole session&rdquo; feasible even for long runs.</li>
<li><strong>Deterministic, LLM-free aggregation.</strong> All numbers in the analysis are computed deterministically from the log. The analysis engine makes no LLM calls, so the verdicts cannot hallucinate; a number is either in the log or it is not.</li>
</ul>
<p>This matters for trust. Many trace tools summarize trajectories with an LLM, which means the summary can be wrong in the same way the agent&rsquo;s output can be wrong. dsh-maze deliberately avoids that: the evidence is the log, and the analysis is arithmetic on the log.</p>
<h2 id="limitations-and-honest-verdict-rules-llm-free-determinism-missing-data-fallbacks">Limitations and honest-verdict rules (LLM-free determinism, missing-data fallbacks)</h2>
<p>The honesty posture is explicit, and it is worth listing the rules because they tell you where the tool can be trusted and where it cannot:</p>
<ul>
<li><strong>Never judge by output length.</strong> A long stream of output is not good work; the tool deliberately refuses to score quality by token volume.</li>
<li><strong>Error features are scanned only at head/tail windows.</strong> Rather than over-indexing on an error buried mid-run, error features are evaluated only at the head and tail windows of each step, a conservative choice that avoids false positives.</li>
<li><strong>Three-layered single-tool judgment</strong> — <code>isError</code> flag → failure signature → tool classification. A call is only labeled a failure if it clears successively stricter layers.</li>
<li><strong>&ldquo;Blind retry&rdquo; as behavioral detection</strong> — consecutive same-tool plus similar-parameter calls with at least one failure. This is inspired by AgentLens&rsquo;s deterministic detection of SWE-agent trajectory waste, and it is deliberately <em>not</em> an LLM judgment about intent.</li>
<li><strong>Honest fallback for missing data.</strong> When usage or token data is absent from the log, the tool falls back instead of fabricating. No invented numbers.</li>
</ul>
<p>What this buys you is reproducibility: two people analyzing the same log get the same verdict. The LLM-free determinism is the differentiator.</p>
<h2 id="when-trace-visualization-belongs-in-your-harness-observability-as-a-plugin">When trace visualization belongs in your harness (observability as a plugin)</h2>
<p>The final design question is where observability should live. The Arize guidance is direct: &ldquo;Make observability part of the harness; trace every step (data fetched, tool calls, LLM calls, intermediate outputs) before writing serious evals.&rdquo;</p>
<p>dsh-maze embodies the opposite philosophy to bolting on an external viewer: it is a <strong>plugin in the harness itself</strong>, following the everything-is-a-plugin model. The trace tool has the same standing as any other capability — installed, composable, and swappable like the models, tools, and sessions it observes.</p>
<p>That has a practical consequence for teams evaluating DeepSeek Harness. If your research question is about the agent loop — how tool surface, context windows, profiles, or scheduling change results — trace visualization is not a nice-to-have; it is the instrument. The harness&rsquo;s built-in append-only session log plus a maze-style viewer turns an agent run from a one-way black box into a repeatable experiment you can align, replay, and diff against other models.</p>
<h2 id="faq--common-pitfalls">FAQ / common pitfalls</h2>
<p><strong>How do I install dsh-trace-compare / dsh-maze?</strong>
Run <code>npx -y @deepseek-ai/dsh plugin --profile web add dsh-maze@&lt;version&gt;</code> (the original name was <code>dsh-trace-compare@0.7.0</code>). Do not guess the version — check your host line first (see the compatibility table above).</p>
<p><strong>What&rsquo;s the difference between dsh-trace-compare and dsh-maze?</strong>
Same project, renamed. dsh-trace-compare was the original name (resolving to 0.7.0); dsh-maze is the name from v1.0.0 onward, adding multi-run comparison, replay, and the deterministic verdict engine.</p>
<p><strong>Which plugin version do I need?</strong>
It depends on the host. Host 0.1.2 line (DSH Desktop 2.x) uses dsh-maze 2.x; older hosts pin dsh-maze 1.1.0. Choosing the wrong one is the most common install failure.</p>
<p><strong>What session log formats does it accept?</strong>
Plain <code>.jsonl</code> and <code>.jsonl.zstd</code>, auto-detected by content. Zstd decompresses browser-side (native DecompressionStream or fzstd).</p>
<p><strong>Are the analysis verdicts computed by an LLM?</strong>
No. Every number is a deterministic aggregation of the log; the engine makes no LLM calls. If it says a recovery was a &ldquo;change-param,&rdquo; the evidence is in the underlying command and result, and you can drill down to it.</p>
<p><strong>Should trace visualization replace eval suites?</strong>
No — it complements evals. Trace first, build targeted evals from the failures you see, then debug and refine the prompt, tools, context, or evaluator. The loop keeps running.</p>
]]></content:encoded></item></channel></rss>