dsh-tokenslash: A Pruning Plugin That Cuts Per-Turn Prompt Overhead in DeepSeek Harness
jessenreinhart/dsh-tokenslash
TokenSlash trims unused tool schemas and bloated system prompts in DeepSeek Harness, cutting up to 85% of prompt overhead and routing subagent tasks to cheaper models.
dsh-tokenslash targets the way DeepSeek Harness injects every registered tool description and plugin guideline into the system prompt on each turn. A lightweight triage model decides which tools the current prompt actually needs and keeps only those, dropping the roughly 18,000-token per-turn baseline to about 3,000 tokens, with official benchmarks showing about 85% savings across four turns. Three modes, normal, extreme and off, cover everyday development and maximum savings alike, follow-ups such as continue inherit the previous tool set, and a failed triage drops nothing.
How to Install
dsh plugin --profile web add github:jessenreinhart/dsh-tokenslash- Category
- Models & Reasoning
- Platform
- DSH Plugin
- Author
- jessenreinhart
- Distribution
- Plugin
dsh-tokenslash Key Features
dsh-tokenslash Repo Summary
What Does It Do?
TokenSlash is a DSH plugin for DeepSeek Harness that trims the bloated tool schemas and system prompt sections sent on every turn down to only what the current prompt actually needs. It solves the problem of DSH injecting every registered tool description and plugin guideline into the system prompt, which burns a large fixed token budget on each turn. The plugin uses a lightweight triage model to detect required tools, keeps only those, and can route subagent work to cheaper models.
Core Features
- Prompt overhead reduction: drops the roughly 18,000-token per-turn baseline to about 3,000 tokens, with official benchmarks showing about 85% savings across a four-turn session.
- Three pruning modes: normal always keeps core developer tools such as read, write, edit, glob, grep and pwsh, extreme keeps only the tools detected for the immediate prompt, and off disables pruning entirely.
- Context-aware continuity: prompts like continue, resume or follow-ups automatically inherit the active tool set, so pruning never breaks an ongoing workflow.
- Sub-second triage with fail-open safety: triage completes in about 500ms, and if triage fails nothing is dropped.
- Subagent model tiering: lightweight subagent tasks are automatically routed to cheaper models to lower overall cost.
How to Use This Plugin?
Once enabled in DSH, TokenSlash works out of the box with safe defaults and needs no extra setup to start pruning. You pick one of three modes in the plugin settings: normal for everyday development, which preserves core file and command tools; extreme when you want maximum savings; and off when you need fully vanilla behavior. Triage results refresh with each turn, and follow-up prompts such as continue reuse the current tool set, so you never have to re-declare which tools you need.
How to Troubleshoot This Plugin?
If tools are pruned unexpectedly or triage seems inactive, first check whether the mode is set to extreme, then verify the triage service is reachable. The plugin ships with fail-open behavior, so a failed triage drops nothing; when something looks wrong, follow the official instructions to repair the triage path and normal behavior returns.
This page is an independent rewrite of the plugin's official README — for authoritative documentation and the latest changes, refer to the source: jessenreinhart/dsh-tokenslash. The plugin is third-party code that runs on your machine once installed; inclusion does not imply endorsement — please review the source before installing.
