A panoramic console for multiple Agent sessions
When you push several tasks in DeepSeek Harness (DSH) at once, the bottleneck isn't model speed — it's that you can only watch one session. Code is being edited in A, research is running in B, subagents are working underneath — but you have to open each one and switch back and forth, guessing which is stuck and which is close to filling its context.
Subagents are a black box too: which parent session they hang off and how much work they've done is invisible in the stock UI. And compaction happens silently — halfway through an edit, early conversation gets replaced by a summary, and the first things lost are exactly what a successor needs: file paths, commands, error messages.
These are gaps in DSH's native UI, not configuration mistakes. I built a plugin to close them: Session Matrix (dsh-session-matrix) — a panoramic console that lets you watch multiple sessions running in parallel, see the parent/child Agent graph at a glance, and hand work off before the details are lost.
What installing it adds
Nothing is injected into your conversation flow. You get one new sidebar entry, "会话矩阵工作台", with two tabs: Workspace and Agent graph.
Workspace: four native panes you can actually type in
The workspace opens up to four session panes in a 2×2 grid. The point is not just "side by side" — every pane is a real native DSH conversation instance. Message stream, tool-call rows, approval buttons, Chat/Trajectory switching, and the composer at the bottom are all native, so you can type and send messages right there. It is not a wall of read-only screenshots.
A session only ever occupies one pane — no duplicates. Dividers drag and the ratio is remembered; each pane has a zoom slider with four steps (55/70/85/100%), remembered per session.
The one exception is subagents: their panes are read-only, marked with a "只读 · 子代理" badge, viewable but not directly promptable. That matches DSH's own rules.
Agent graph: see who hangs off whom
The second view is a four-column directed graph: workbench → project → session → subagent.
The edges are not guesses — they come only from the real parentSession field in each session header. Parent-child relationships are actual data, not "they look like the same project, draw a line." Node color shows distance to the compaction point (normal / warning / critical); node size shows cumulative usage, so the heavy ones stand out.
Select any node and three panels below re-scope to its subtree: prompt composition (what the model sees right now), cumulative usage and cost (what this session has burned in total), and a per-session matrix — so you can see at a glance who is spending the most and who is near the limit.
One distinction worth calling out: "context occupancy" and "cumulative usage" are different things. The former is how many tokens are in the model's view right now — a snapshot that rolls forward as the session runs. The latter is the total read/written over the session's life, monotonically increasing, including cache reads and writes. The UI labels both clearly so you don't mix them up.
Compaction warning: the official formula, not a made-up percentage
For context monitoring I did not invent thresholds. The compaction point mirrors DSH's own dsh-compaction-basic plugin:
messageBudget = contextWindow − reservedCompletionTokens
pressureBudget = messageBudget − policy.headroomTokens # headroom defaults to 4096
For a 1,048,576 window with 256,000 reserved, that is 788,480 tokens (75.2%). The warning line sits at 80% of the point, the critical line at 92%. Occupancy uses the provider-reported prompt size, not a character estimate.
To be precise: this is a warning before compaction — it does not expand the context window or stop compaction from happening.
Handoff protocol: let the agent write the handoff before compaction
Losing details to compaction is better routed around than fought. The top-right "通用交接提示词" button copies a prompt you send into a target session. The agent then self-checks the session title, extracts state, snapshots files to disk, and writes a structured HANDOFF-<timestamp>.md with seven sections: goal, progress, key files, rejected approaches, and open questions. Paste the takeover message into a fresh session and carry on.
The button only copies — it does not send anything or modify any session. The protocol tells the agent not to write API keys, passwords, or cookies. If the target session is not open in a pane, a notice offers a "载入窗格" button and the target pane flashes three times so you paste into the right place.
Cost: CNY estimates with explicit peak/off-peak buckets
Cost is shown as an estimate in CNY, using DeepSeek's official price list, peak hours at 2× (weekdays 09:00–12:00 and 14:00–18:00 Beijing time, excluding holidays), with cache hits broken out. This is an estimate, not a bill.
A common misconception: this plugin does not depend on dsh-context. It studied that plugin's design and credits it publicly, but works fine without it — cost is rebuilt from session logs using per-request timestamps for peak/off-peak bucketing, and the numbers reconcile. Both plugins can be installed together.
Install
dsh plugin --profile web add dsh-session-matrix
Or search dsh-session-matrix in the plugin manager. No build step, no restart needed.
Zero runtime dependencies — the whole plugin is two JS files plus an SVG icon, with no build step. Requires DSH >= 0.2.2-rc.1 and Node ^22.19 or >=24. Verified on Windows 11 with DSH 0.2.2-rc.x; macOS and Linux are not yet tested.
MIT licensed. Repo: github.com/Wanqiu12345/dsh-session-matrix
Closing
If you run several DSH sessions in parallel, give it a try. I'd like to know whether the four-pane workspace or the handoff flow turns out to be more useful in practice.




Top comments (0)