AI Agent Hub
Back to plugins
⚙️

dsh-funnel

Workflow Updated 2026.08.25

Run the following command in DeepSeek Harness:

dsh plugin install YuanyuanMa03/dsh-funnel

Paste the following prompt into your AI chat to install this plugin:

Run dsh plugin install YuanyuanMa03/dsh-funnel inside DeepSeek Harness to install the plugin; the full source is available at https://github.com/YuanyuanMa03/dsh-funnel and it works out of the box with zero configuration.

About this plugin

Every tool result is appended to the conversation and re-sent on every subsequent model request. A 500-line test run, a large file read, a web scrape — all of it rides along for the rest of the session, burning tokens, filling the window, and burying the one assertion error that actually matters. Existing truncation and compaction layers either only cover shell, fire only after the budget is blown, or perform a blind head-tail cut without preserving error lines.

dsh-funnel cures results at the moment they enter context: it keeps the head, the tail, and every error or warning line, then spills the middle to local disk with a path pointer. In a real headless session a 2001-line bash result reached the model as 370 characters — every later turn pays for 370 instead of 8,893. The spill file is not deletion; in testing the agent read the spill file on its own to recover an omitted middle line. Curation is pagination, not loss.

It fits developers running long agent workflows with heavy-output tools (tests, builds, scraping, batch file reads). Zero configuration, byte-identical passthrough under the threshold, error results never touched, and complementary to rather than replacing the official compaction layer.

Use Cases

  • Long test or build runs producing hundreds of lines need automatic curation before hitting the model
  • Multi-turn agent workflows heavily calling web fetch, bulk file reads, or search tools
  • Context window fills quickly as sessions deepen and attention dilutes across irrelevant lines

Best For

  • Developers running long agent workflows with frequent large-output tool calls
  • Engineers who want lower per-turn token cost and delayed compaction without code changes
  • Teams needing session logs that exactly match what the model actually saw for audit and debugging