Skip to content

bwndlct/dsh-session-audit

40Last commit Aug 14, 2026

dsh-session-audit DSH plugin

dsh-session-audit analyzes a single DSH session's event log to produce a readable audit report. It profiles steps, tool calls, failures, repeated actions, token usage, and verification commands like test/build/lint. The report is returned as a tool result and stays local.

How to install the dsh-session-audit DSH plugin

dsh plugin --profile web add dsh-session-audit

Copying does not run this command. Review the repository and version before installing the dsh-session-audit DSH plugin.

dsh-session-audit DSH plugin data source

dsh-session-audit DSH plugin snapshot date: Aug 16, 2026

discovered

What the dsh-session-audit DSH plugin can do

  • Session metrics: duration, turns, steps, tool call counts and distribution, success/failure splits.
  • Token usage: input, output, cache read buckets, shown as Unavailable if provider doesn't report.
  • Deterministic audit signals: consecutive failures, high failure rate, repeated tool calls, repeated file reads.
  • Verification command recognition: identifies test, lint, typecheck, build commands in shell tool calls and reports observed results.
  • Three output formats: text (default), Markdown, JSON with stable schemaVersion.
  • Works on current or historical sessions via session ID; supports listing recent sessions.
  • Robust to empty sessions, malformed events, orphan results, and trailing crash frames.

Where the dsh-session-audit DSH plugin fits

  • Understand how an agent spent its time during a session.
  • Identify where and why tool calls failed.
  • Check if the agent performed verification commands (test, lint, build) and their results.
  • Detect repeated tool calls that may indicate inefficiency.
  • Review token consumption for a specific session.

Who the dsh-session-audit DSH plugin is for

  • DSH users who want to analyze agent session behavior.
  • Developers debugging agent workflows or tool call failures.

dsh-session-audit DSH plugin limitations

  • Verification command recognition is pattern-based; validators in custom script names are not detected.
  • Sub-agent sessions must be audited separately by ID; no cross-session aggregation.
  • Reasoning tokens are shown only when reported by provider; step-by-step values may not be reconstructable.
  • No time-series or context growth analysis in current version.

dsh-session-audit DSH plugin: from the repository README

Quoted from the bwndlct/dsh-session-audit README, the upstream source of the dsh-session-audit DSH plugin. Copyright remains with the original authors.

看清你的 DeepSeek Harness Agent 这次到底是怎么干活的。 对一个 DSH Session 做 Steps / Tool Calls / 失败 / 重复动作 / Token / 验证命令(test/build/lint)的执行审计,通过一次 `session_audit` 工具调用输出一份可读的审计报告。 **简体中文** | [English](README.en.md) ```text DSH Session Audit ────────────────────────────────────────────── Session ID session-d2309fa2-47d3-484a-8357-236e0acdd9aa Model glm-5.3 Provider zai-coding-cn Duration 51m 42s Started 2026-08-14T09:08:08.384Z Execution Turns 4 Steps 121 Assistant msgs 120 Turn endings completed×1, interrupted×1, error×1 Tools Total calls 150 Succeeded 143 Failed 6 Unresolved 1 Failure rate 4.0% Top tools bash 83 (1 failed) write 26 edit 21 (4 failed) read 12 Tokens Input 349,428 Output 80,415 Cache read 9,243,520 Total 9,673,363 Execution signals ⚠ 3 consecutive failed tool calls detected ⚠ `bash` called 83 times ℹ session has a turn that never closed Verification ✓ pnpm run typecheck [typecheck] ✓ npm test [test] (2 attempts, 2 ok) ``` *(来自本机真实会话的报告)* ## 为什么需要 DSH 的

Read the full READMERepository license: MIT

dsh-session-audit DSH plugin questions

How do I install dsh-session-audit?

You need DSH 0.1.0-rc.6 or later. Run `dsh plugin --profile web add dsh-session-audit` (or the GitHub/local link variants). Then manually add the package to the `dsh.profile.bundles` array in `~/.dsh/profiles/web/package.json` and restart `dsh web`. Verify with `dsh --profile web --dump-config | grep -A2 session-audit`.

How do I audit the current session?

Simply tell the agent in natural language, like 'audit the current session'. You can also specify format: 'use markdown format to audit the current session'. If you have the commands service mounted (e.g., web profile), you can use the slash command `/session-audit [text|markdown|json]`.

What information does the audit report include?

The report includes session duration, turn/step counts, tool call totals and per-tool distribution, success/failure counts, token usage (input, output, cache read), and deterministic audit signals such as consecutive failures, repeated tool calls, repeated file reads, and verification command results. It also lists any non-normal turn endings.

Does this plugin send data to the internet?

No. dsh-session-audit is fully local. It reads session logs from your local DSH home directory and the live session registry. It makes no network requests, calls no LLM APIs, and sends no telemetry. The audit report is returned as a tool result within your session.

Can I audit a session that happened earlier?

Yes. Use the `session_id` parameter to specify the target session ID. You can also use the slash command `/audit-list` to list recent persistent sessions, then audit one by ID. The tool reads from the persistent session log directory (`~/.dsh/sessions`).