Blog · Tutorial
Trajectory tracing: the killer feature rivals hide
August 14, 2026 · dshbase
One feature of DeepSeek Harness keeps coming up as its biggest differentiator: every run is traceable. When an agent fails or loops, you can see the exact step it went wrong — information that OpenAI and Anthropic encrypt away from you.
What trajectory tracing actually is
DSH stores sessions as an append-only event log. Every system prompt, user message, reasoning step, tool call and result, permission change, context injection, compression, and sub-agent schedule becomes an event. The model's next-turn history is re-derived from that log, not from a black box. The trajectory view lets you inspect each run by source.
See what's in the log for the full breakdown.
Why this matters: rivals encrypt it away
US models (OpenAI, Anthropic) treat this as hidden internal state — you can't see the intermediate reasoning, tool calls, or where a task derailed. You get a final answer and, if it failed, a vague error. DSH gives you the whole trail. For debugging and research, that's a genuine advantage.
How to use it to debug
- Find the derailment point — open the trajectory view and walk the events in order; the failure is almost always a specific tool call or permission decision, not the final line.
- Check tool results — a wrong answer is often a tool returning bad data, not a model error. Trace the tool's output.
- Review permission changes — if the agent did something unexpected, the permission events show when and why it was allowed.
How to use it to cut token waste
The trajectory log is also a cost profiler. Each event shows what went into context:
- Spot re-sent context — if the same large block appears repeatedly, it's being re-injected (and re-billed).
- Find unnecessary tool round-trips — long chains of read/search calls that could collapse into one (that's what PTC mode is for).
- Check compression — see when context gets compressed and whether it's dropping useful history.
Combine this with a cache-friendly harness design (minimal tools, append-only sessions) and you get the 99.93% cache hit rate playbook.
The takeaway
Trajectory tracing turns an opaque agent into an inspectable one. For anyone running agents seriously — debugging failures or optimizing cost — it's not a nice-to-have; it's the reason to pick a harness that doesn't hide its work.
Related: session log observability · the modes guide.