dsh-context is an open source DeepSeek Harness plugin that makes AI agent context visible, showing token usage, compaction events, and tool schema costs.
By Meng Li
Published: 2026-10-04
URL: https://pythonlibraries.substack.com/p/deepseek-harness-plugin-makes-ai
If you regularly use AI agents for long-running tasks — say, asking Codex to refactor a mid-sized project, or having DeepSeek Harness run a research job that stretches over two or three days — you know the pattern.
The conversation starts smoothly. The agent remembers every detail and every constraint you mentioned. Then, around turn 20 or 30, replies get lazy. Things it was told earlier suddenly vanish. It starts making elementary mistakes.
You refresh, and the agent says it is doing context compaction.
After compaction, things get worse. You can feel that it has “lost its memory,” but you have no way to tell what, out of those hundred thousand words of context, was kept and what was thrown away.
Why did compaction fire when there was still room left in the window? And the most irritating question of all: is that huge pile of JSON schemas for your custom tools the real token hog?
There are no answers. For most users, the context window is a black box.
You know it has a limit, and that hitting the ceiling triggers some kind of compaction or pruning. What is actually inside, how it changes, and when it gets operated on — all of that is guesswork.
That situation is about to be broken by an open-source plugin called dsh-context.
It does not try to build a bigger context window or a better compression algorithm. It does something more basic, and more important: it makes an AI agent’s context fully visible.