MathieuPortmann/dsh-tool-result-pruner-plus

Drop-in replacement for DSH's tool-result pruner whose cut results start with a notice saying what is missing and exactly how to read it back.

The stock pruner keeps the first 4096 and last 1024 characters of an oversized tool result and puts a bare marker between them, which is how a small model ends up concluding that something is absent, re-running the same command (cut the same way) or reasoning from an amputated file. This replacement makes the cut state explicit at the top of the result: how large the original was, which character ranges you can see, which are missing, what produced it, and the exact recovery read (offset and limit) computed from the line numbers on both sides of the cut so the recovery read is not itself pruned. For read results it names the missing line range and warns against concluding absence; for other tools it suggests ranged extraction or writing output to a file. A result that was already cut is labelled as such rather than being described with counts it no longer has.

Agent Capabilities ★ 0
View on GitHub ↗

Install

dsh plugin --profile web add github:MathieuPortmann/dsh-tool-result-pruner-plus

Installing the package is not enough. The pruner sits inside each agent preset's compaction group, so in your profile's cordis.patch.yml you must change the row's name from @deepseek-ai/dsh-compaction-tool-result-pruner to dsh-tool-result-pruner-plus while keeping its config block, then verify with dsh --profile web --dump-config | grep -A1 'id: tool-result-pruner' and restart. Reverting means restoring the stock name. The author states maintenance is best-effort and welcomes forks.

Compatibility

Replaces a stock compaction component, so it is coupled to the pruning contract of the Harness version you run: if a release changes the event shape or the config keys, results fall back to the stock cut rather than breaking. That fallback is deliberate — one malformed event skips only that result. The notice is sized to fit between head and tail, shortening the head to a floor of 1024 characters when needed.

Details

Alternatives

MathieuPortmann/dsh-agent-flight-recorder · MathieuPortmann/dsh-reliability-guards · IAMLieutenant/dsh-tool-user-memory

More plugins in Agent Capabilities

Browse more in Agent Capabilities

Guides for Agent Capabilities plugins