DeepSeek Harness plugin runtime with Better Harness token and failure inspection
Discovered from README cross-links · today
Run local Claude Code plugins through a native Go harness with recorded
What they did
The author extended Pero's native Go harness and ACP agent so local Claude Code plugins run inside a DeepSeek Harness. Plugin manifests, skills and commands, agents, lifecycle hooks, MCP/LSP configuration and supported JavaScript workflows are loaded through the existing permission, cancellation and child-budget owners. ToolSearch queries were made exact, with full schemas kept in durable metadata and compact receipts, and children only discover authorized tools. Bash gained an explicit workdir and bounded termination, plus recoverable task handles, ignore-aware search cursors, shared tool-output budgets and Session-owned full-text readback. The runtime now records actual Session JSONL, tool outcomes, failed and repeated calls, masked validation candidates, schema exposure, request bytes and committed provider usage, and exports Better Harness Inspector reports. Provider transport failures keep fixed safe DNS/timeout/EOF/reset/refusal diagnostics without copying URLs or arbitrary cause text. Explicit JSON Chat and stateless Responses protocol selection was added, with Responses preserving call/item IDs, assistant phase and encrypted reasoning through restoration, and no automatic replay or protocol fallback. Validation covered provider race suites, vet, Bazel targets, Gazelle diff, a native binary build, a real sol Responses acceptance of 6 requests and 6 paired Read/Bash/Write calls, a five-phase fixture across a process restart, and a four-task DeepSeek cohort passing all 41 official tests in 67 requests and 592,107 recorded tokens. All 89 Terminal-Bench 2.0 tasks were being run with the custom 32-request cap removed and a pinned DeepSeek binary.
How it went
The merged tree passes the Harness Go, standalone Harness Bazel and DSH AST jobs, and the complete local pero-runtime library suite passes 109 tests with one existing ignored test. Real sol Responses acceptance completed 6 requests and 6 paired tool calls, with the original nine tests passing independently and Claude-format skills plus pre/post hooks running. The four-task DeepSeek cohort passed all 41 official tests. Full Terminal-Bench 2.0 completion is still pending, the repository gate remains failed, and no full Claude parity or aggregate leaderboard score is claimed.
Worth knowing
The provider's Chat tool route returns 503 and terra returns 403 without a usable completion; hosted Responses tools and streaming are outside the implemented subset. Token comparisons come from stochastic samples and do not prove causal savings. Diagnostic execution has no OS sandbox and is not a leaderboard submission. Usage coverage has explicit gaps for legacy rejected summaries and failed or interrupted requests, and recorded tokens are not an invoice. A PyPI server trial exposed a managed-job lifetime mismatch where Session shutdown kills the server before verification. Several CI jobs, including Scientific Viewer and generated contracts, still fail.
Wiring
The harness is a Go runtime plus an ACP agent that owns plugin loading, permissions, cancellation and child budgets. Plugin manifests, skills/commands, agents, hooks and MCP/LSP config are read from local Claude Code plugin directories and executed inside the harness process tree. ToolSearch resolves named queries exactly against durable schema metadata, and children receive only authorized tool surfaces. Bash runs with an explicit workdir and bounded termination; long-running jobs are tied to their agent/session lifetime, so persistent services need an independent environment owner. Session state is written as JSONL and read back through Session-owned full-text storage. Provider transport is selected explicitly between JSON Chat and stateless Responses, with Responses restoring call/item IDs, assistant phase and encrypted reasoning; there is no automatic replay or protocol fallback. Diagnostics are fixed safe strings for DNS, timeout, EOF, reset and refusal, with URLs and arbitrary cause text stripped. Better Harness Inspector consumes the exported reports for token and failure review. Validation runs through the Go test suite, race suites, vet, Bazel targets, Gazelle diff and a native binary build, with real provider acceptance and Terminal-Bench cohorts run against a pinned DeepSeek binary.
Try it yourself
In this repo, extend the native Go harness and ACP agent so it can load local Claude Code plugins: parse plugin manifests, skills/commands, agents, lifecycle hooks, MCP/LSP config and supported JavaScript workflows, routing them through the existing permission, cancellation and child-budget owners. Make named ToolSearch queries exact, keep full schemas in durable metadata with compact receipts, and restrict child tool discovery to authorized tools. Add explicit Bash workdir and bounded termination, recoverable task handles, ignore-aware search cursors, shared tool-output budgets and Session-owned full-text readback. Record Session JSONL, tool outcomes, failed and repeated calls, masked validation candidates, schema exposure, request bytes and committed provider usage, and export Better Harness Inspector reports. Add explicit JSON Chat and stateless Responses protocol selection with no automatic replay or fallback, preserving call/item IDs, assistant phase and encrypted reasoning through restoration. Then run the provider race suite, vet, Bazel targets, Gazelle diff and a real provider acceptance with paired Read/Bash/Write calls.