orangelightening/dsh-plugin-anti-rot

orangelightening★ 0TypeScript最后同步: 2026-08-18

在 GitHub 打开

DeepSeek Harness plugin: compresses verbose tool error payloads before they reach model context

README 摘要

dsh-plugin-anti-rot A DeepSeek Harness plugin developed to remove a common source of context rot in long-running agent sessions: verbose tool error payloads piling up in the context window. When a child process dies mid-traceback, its raw stack dump would otherwise spend the whole error — often dozens of noise lines — against the session's context budget, and repeated failures compound over hours of work. This plugin compresses those payloads before they reach model context and the session log. A failed call's text is reduced to its first maxLines message lines, indented at … stack-frame lines are dropped, and an elision marker names what was removed: How it works The plugin hooks the tools/post-execute waterfall and rewrites error text in place. It recognizes two failure signals and nothing else: - an isError result (infrastructure failures — spawn errors, aborts), or - a trailing non-zero [exit code: N] marker per the shell tools' shared rendering contract (failing commands are model-interpreted SUCCESS results, so the marker is the only failing-command signal). A clean exit leaves the result untouched. The exit marker is always re-appended as the final line of a compressed paylo…

在 GitHub 查看完整 README →
工具/开发context-rotcordisdeepseek-harnessdshdsh-pluginagent

分类