dsh-session-audit
Session execution analytics and audit reports for DeepSeek Harness — see how your agent actually worked
Install
dsh plugin --profile web add dsh-session-audit dsh-session-audit
Stop skimming raw session logs: one call folds how your agent actually worked — where it failed, what it repeated, and whether it verified — into a readable report.
What problem it solves
DSH session logs are an append-only source of truth that faithfully record “what happened”. But reading a log with thousands of events does not directly answer the questions you actually care about — how long it ran, which tools it used most, where it failed, whether it repeated work, and whether it verified anything at the end.
dsh-session-audit folds a single session’s persisted event log into a readable execution audit in one session_audit call: duration and turn/step counts, tool-call distribution with a success/failure split, token usage, deterministic signals (consecutive failures, failure rate, hot tools, exact duplicate calls, repeated file reads), and verification-command detection that recognizes test/build/lint/typecheck commands inside shell calls and reports the actually observed results. It is a Step / Tool-call profiler and failure analyzer, not a token dashboard. Reports come in text, Markdown, or JSON (stable schemaVersion), and everything runs locally — no LLM calls, no network requests, nothing written to disk.
Key features
- Session metrics: duration, turns, steps, assistant messages, total tool calls, per-tool distribution, and success/failure split
- Token usage: input/output/cache buckets folded by turn:step, matching the official
session-statssemantics; shows Unavailable rather than estimating - Deterministic signals: consecutive failures, failure rate, hot tools, exact duplicate calls, repeated file reads — pure rules, no LLM scoring
- Verification detection: recognizes
npm test,pytest,cargo test,tsc,eslint, and reports the actually observed results - Three output formats: text (default), Markdown, and JSON with a stable
schemaVersion - Current or historical sessions: audit the live session by default, any persisted session by id, or list recent sessions
- Robust by design: empty sessions, malformed events, future event types, and orphan results are handled safely and noted in the report
Quick start
Install and restart dsh web, then ask the agent in plain language, or use a slash command:
Audit the current session
Audit session session-abc123
Audit the current session in markdown format
Slash commands (available when the commands service is mounted, e.g. the web profile): /session-audit [text|markdown|json] audits the current session (defaults to text), and /audit-list lists recent persisted sessions. Tool parameters: session_id (target session, defaults to current), format, list_sessions, and thresholds (optional rule-threshold overrides). The report stays local — it is returned as a tool result for you and the model to read, never written to disk.
Who it is for
- Users who want to review an agent’s execution and pinpoint failures and inefficiencies
- Teams that need quality and safety checks on agent output, with evidence of whether verification ran
- Heavy DSH users watching token and tool cost who want more than a number
Compiled from the project README · All rights belong to the original author
Report issue / Request removal